Archived
core: only the package's layer range steers, and the table stays out of the budget
The loader stored a norm for every direction in the file, and the plugin declares
an op wherever a layer's scale is nonzero, so `layer_range` (4..44, the package's
own selection) reached only the range checks and the log line: the engine steered
all 47 directions -- 94 hc_project instances in the declared graph where the
sources and the docs say 41. The scale is zeroed outside the range now, which is
what RadControlVector documents ("a zero scale means this layer is not steered")
and what llama.cpp's patch does (its tensor is absent outside the range).
cvec_test asserts it for the default and for a JSON-stated range; --debug-graph
shows 41 a rank.
The direction table is also taken back out of the VRAM budget
(VramFacts::held_out). It is allocated in declare(), before vram_budget_resolve
reads free VRAM, so without the term the pools are planned around bytes the
program never sees. On this box the split came out identical either way
(claimable 12.92 GiB in both), so the term is a guarantee by construction rather
than a fix for an observed miss -- and it keeps a deployment that merely offers a
vector on the same plan as one that does not.
This commit is contained in:
1 parent
071d204252
commit
ad7c962375
5 files changed
+28
-6
No files matched your search
@@ -93,8 +93,13 @@ static int resolve(Config& cfg, const std::vector<VramFacts>& per_rank, VramBudg
|
||||
|
||||
/* The only measured term: the driver, loaded code objects and anything else on the card (e.g.
|
||||
* a desktop compositor), so it is reported on its own line rather than folded into the
|
||||
* headroom. Read after declare(), once every kernel plugin's code object is resident. */
|
||||
b.already_held = std::max<int64_t>(b.capacity - freeb, 0);
|
||||
* headroom. Read after declare(), once every kernel plugin's code object is resident.
|
||||
*
|
||||
* `held_out` is taken back out: it is the engine's own allocation that the program does not
|
||||
* see (core/cvec.h's direction table), which the headroom already covers. */
|
||||
int64_t held_out = 0;
|
||||
for (const VramFacts& f : per_rank) held_out = std::max(held_out, f.held_out);
|
||||
b.already_held = std::max<int64_t>(b.capacity - freeb - held_out, 0);
|
||||
|
||||
/* What is left after the fixed terms. */
|
||||
b.drift = kDriverDrift;
|
||||
|
||||
Reference in new issue
Block a user