Repository navigation
Give the single-row decode harness the real _decode_graphs helpers - #15182
Merged
Merged
Conversation
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This was referenced Oct 25, 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
tests/utils/test_single_row_cached_attention.pyerrors on all 64 cases on main since #15171 (K/V straight into the cache slot, opt-in CUDA-graph decode). That fails theCore (HF=...)legs on unrelated PRs, for example #15176 and #15178:The harness lifts
LlamaAttention_fast_forward_inferenceandQwen3Attention_fast_forward_inferenceout of their files withast, and refuses to run if they read a global it does not provide. #15171 moved the cache and scratch buffer setup intounsloth/models/_decode_graphs.py(alloc_decode_buffers,resize_decode_buffers) and added the captured-step branch that calls_decode_attention_core. The product is fine. The guard did what it is meant to do and asked for stand-ins.Change
_decode_graphs: the real module, loaded by file path. Its top level is torch and the standard library only.ENABLEDis forced toFalse, because graph replay is CUDA-only. The test keeps running the realalloc_decode_buffers/resize_decode_buffersinstead of a copy._decode_attention_core: a stand-in that raises if called. It is only reached from a captured decode step, which this CPU harness never enters, so reaching it would mean graph mode leaked in.Verification
64 errors. With this change:64 passed. It also passes withUNSLOTH_DECODE_CUDA_GRAPHS=1set._decode_graphs.alloc_decode_buffersgives 56 failures. The real helper is what the test exercises.