kv: a group a rank keeps no cache for

rad_kv_group_zero(b, group): the group is declared as on every other rank --
the scheduler indexes groups by position and one block table serves every
rank -- and this rank carves nothing for it: its block count is the shared
table's, its costs are zero, its pool base is null, and issue refuses any op
on this rank that names it. For a rank the geometry gives no attention heads,
whose attention is a fill of zeros and never stores or reads a key. qwen4exp
declares its attention group so on such a rank. The arch test's contract
becomes the real one: same KV groups by position; ops are each rank's own.
This commit is contained in:
baKon authored and StillDeadcode committed 2026-10-06 11:23:06 +02:00
1 parent 7be92ec8f4
commit 3e629e7a27
9 files changed
+95 -18

No files matched your search

+6 -4
View File
@@ -760,10 +760,12 @@ int Ctx::issue_body(rad_op h, const RadOperand* opd, int n_opd, int64_t n) {
const uint32_t g = o.handle;
if ((size_t)g >= kv_.size() || !kv_[g].base)
return abort_step_msg(h, RAD_E_STATE,
fmt("operand %d names KV group %u, which has no pool bound. "
"The block manager allocates it at load and binds it "
"into the Ctx; a group with none is a startup bug, not "
"a runtime condition", i, g));
fmt("operand %d names KV group %u, which has no pool bound on "
"this rank. The block manager allocates it at load and "
"binds it into the Ctx; a group with none is a startup "
"bug -- or a group this rank declared with "
"rad_kv_group_zero and then issued against, which the "
"plugin must not do", i, g));
const KVPoolBinding& b = kv_[g];
/* A POSITION LOOKUP, not `o.offset - first_layer`. The subtraction is right only for a
* group whose layers are contiguous, and they need not be: with 15 attention layers