Archived
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:
1 parent
7be92ec8f4
commit
3e629e7a27
9 files changed
+95
-18
No files matched your search
@@ -926,6 +926,13 @@ int Builder::weight_shard_span_parts(rad_weight h, const int64_t* lo, const int6
|
||||
return RAD_OK;
|
||||
}
|
||||
|
||||
int Builder::kv_group_zero(rad_kvgroup h) {
|
||||
if (finished_) { err(RAD_E_STATE, "kv_group_zero after declare finished"); return RAD_E_STATE; }
|
||||
if (h == 0 || h >= prog_.kv_groups.size()) return RAD_E_INVAL;
|
||||
prog_.kv_groups[h].zero = true;
|
||||
return RAD_OK;
|
||||
}
|
||||
|
||||
int Builder::weight_shard_zero(rad_weight h) {
|
||||
if (finished_) { err(RAD_E_STATE, "weight_shard_zero after declare finished"); return RAD_E_STATE; }
|
||||
if (h == 0 || h >= prog_.weights.size()) return RAD_E_INVAL;
|
||||
@@ -1673,6 +1680,11 @@ int rad_weight_shard_zero(RadBuilder* b, rad_weight w) {
|
||||
return B(b)->weight_shard_zero(w);
|
||||
}
|
||||
|
||||
int rad_kv_group_zero(RadBuilder* b, rad_kvgroup g) {
|
||||
if (!b) return RAD_E_INVAL;
|
||||
return B(b)->kv_group_zero(g);
|
||||
}
|
||||
|
||||
int rad_decl_name_map(RadBuilder* b, const RadNameMap* m) {
|
||||
if (!b) return RAD_E_INVAL;
|
||||
return B(b)->decl_name_map(m);
|
||||
|
||||
Reference in new issue
Block a user