Repository navigation
[FIX] Preserve cache state and hit pins when insertion is refused - #563
Draft
WEIXILIN0307 wants to merge 2 commits into
Draft
WEIXILIN0307 wants to merge 2 commits into
WEIXILIN0307 wants to merge 2 commits into
Conversation
Signed-off-by: WEIXILIN <[email protected]>
…fusal Signed-off-by: WEIXILIN <[email protected]>
This was referenced Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Keep cache rows and pin ownership valid when the kernel refuses part of a batch. This is an independent correctness follow-up to the merged #557 admission check.
Problem
Insert changes cache membership before reporting refusal. Raising immediately loses dirty evicted weights/moments, leaves accepted keys mapped to uninitialized values, and leaks the hit pins acquired earlier in that failed request. On current main 2995c41, a trained-row reproducer loses 0.25 and reads wrong new-key values after the exception.
Changes
Scope / Out of Scope
Refusal handling only. Keep the same error and kernel-reported capacity decision. No old capacity estimate, new Storage API, normal-path kernel/copy, or service transaction guarantee is added.
Validation
11 local cases pass on SM120 with a freshly built current-main extension: the existing 3 refusal tests plus 8 recovery cases across SGD, Adam, FP16 and FP8 row-wise Adagrad, with/without an older prefetched owner. They compare complete row bytes, initialized accepted rows, pin counts and retry outputs. Baseline reproduction and failed-run evidence are retained. Full NGC/fabric/network-PS validation is not claimed.
Performance
The successful path is unchanged; extra compaction/copies execute only on refusal. No throughput gain is claimed. Shared receiver performance evidence remains separate from this safety fix.
Dependencies / Follow-ups
Independent main base 2995c41; follows merged #557 and does not depend on551/559. Integration551 and the Cache stack preview consume this fix through an explicit prerequisite base. Keep Draft for maintainer review; do not close #459.
Detailed reproducible evidence: PR_VALIDATION_MATRIX.md; PERFORMANCE_REPORT.md.