[QSA] Tag every raw-key ring row and validate it before pooling
The fused pre-indexer could read a stale or uncommitted raw-key ring row and pass its int64 tail to RoPE as a position (illegal address). The writer now tags each row with logical_position + 1; the reader checks the tag of every source row and, on a mismatch, masks the pooled load, the RoPE-tail read and the compressed-slot store. New guard site 11 (always fatal under warn). The KV pool size is unchanged. Co-Authored-By: Hinata <hinata@idihore.id> Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
@@ -301,6 +301,13 @@ class SchedulerOutput:
|
||||
# preventing stale NaN/data from corrupting attention or SSM computation.
|
||||
new_block_ids_to_zero: list[int] | None = None
|
||||
|
||||
# v2.2 ring-row tag fix: ring (CircularBufferSpec) blocks claimed during this
|
||||
# scheduling step. Independent of new_block_ids_to_zero and of
|
||||
# needs_kv_cache_zeroing: the worker clears only the rows' tag words, after
|
||||
# the zeroer and before any copy or forward of this step, i.e. before the
|
||||
# new owner's first read or write of the ring.
|
||||
new_ring_block_ids_to_clear: list[int] | None = None
|
||||
|
||||
# CoW copies to apply after zeroing new blocks and before forward.
|
||||
kv_cache_block_copies: list[KVCacheBlockCopy] | None = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user