Repository navigation
spark-model: dump q/k post-norm/rope ops on chunked prefill too (ATLAS_OP_DUMP) - #99
Merged
Merged
Conversation
…h too (#95) Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2 of 3 tasks
AzeezIsh
added a commit
that referenced
this pull request
Sep 26, 2026
#69, #98); reiner queue Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This was referenced Sep 26, 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.
Tooling fix, found during #95.
Bug.
ATLAS_OP_DUMP'sk_post_norm,k_post_ropeandq_post_ropewere dumped only inprefill_attention_with_cache_skip, which runs only for chunk 0 (seq_len_start == 0,prefill_inner.rs:141). The dump file follows "last chunk wins", so in a chunked prefill it held chunk 0's last token while an unchunked run held the prompt's last token.Reiner job 354 compared a 53-token single chunk against 16-token chunks. These three ops read cos ~0.4 even though
attn_out_pre_gate(dumped on every chunk inpaged.rs) matched at 0.9994: the comparison was between token 52 and token 15. Every buffer is token-major, which the rope kernels' indexing and thedeinterleave_qg_splitlayout confirm. The slicing was fine; the dump fired in the wrong function.Fix. The same three dump ops are added at the matching points of
prefill_attention_paged(after k_norm, and after the rope chain), so chunks 1+ overwrite them and the file holds the global last token. The file format is unchanged. A structural test pins all three ops on both prefill paths.