test(rocm): ReshapeAndCache->PagedAttention composition at real dims (issue #41) - #497
Draft
VikashLoomba wants to merge 1 commit into
Draft
test(rocm): ReshapeAndCache->PagedAttention composition at real dims (issue #41)#497VikashLoomba wants to merge 1 commit into
VikashLoomba wants to merge 1 commit into
Conversation
…udler#41) The in-tree paged-attention case hand-builds a contiguous KV cache; the real model path writes it with ReshapeAndCache and reads it back. This case is that composition at real model dims (Dh=256, Hq=8, Hkv=2, block_size 16) with a shuffled block table and non-sequential slot mapping — the layout a stride/scatter bug would live in and the contiguous case cannot see. Surfaced by the mudler#41 Qwen3.5-0.8B divergence investigation: every compositional piece of the ROCm attention path now validates in isolation, which is what localizes the residual divergence to bf16-softmax accumulation rather than a kernel defect. Evidence (4x gfx1100, ROCm 7.14, Release): the new case passes 7/7 vs the CPU oracle; full cross-device suite green. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: pi:kimi-k3 [pi]
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.
Row
BACKEND-ROCM— test-hardening only (one additive cross-device case). Issue #41.What changed
Adds a cross-device case for the KV-cache composition the in-tree suite doesn't cover: the existing paged-attention case hand-builds a contiguous cache, but the real model path writes KV via
ReshapeAndCacheand reads it back viaPagedAttention. This case is that composition at real Qwen3.5-0.8B dims (Dh=256, Hq=8, Hkv=2, block_size 16), a shuffled block table, and a non-sequential slot mapping — the layout a stride/scatter bug would live in and the contiguous case cannot see.Surfaced by the #41 Qwen3.5-0.8B divergence investigation: with this composition passing, every piece of the ROCm attention path validates in isolation, which is what localizes the residual divergence to bf16-softmax accumulation rather than a kernel defect (full causal chain in this #41 comment).
Evidence (4× gfx1100, ROCm 7.14, Release)
agent-preflight.sh --stagedgreen;check-commit-trailersgreenSpeed claims
Honest gaps