Repository navigation
fix(strix-hip): /v1/score on gfx1151 — batched paged prefill kernels take #331's state_end - #365
Merged
Merged
Conversation
…331 prefix_bidir) #331 (87bc7da) added a per-stream state_end argument to the batched paged prefill attention launches (prefill_attn_batched.rs) and to gb10's prefill_paged_compute.cuh under PREFILL_STATE_END. strix-hip compiles the same inferspark_prefill_paged{,_fp8,_nvfp4}_batched.cu (symlinks, which define PREFILL_STATE_END) against its own prefill_paged_compute.cuh, and that header never gained the parameter. On gfx1151 every batched paged prefill launch therefore passes one pointer more than the kernel declares, and every argument after kv_lens is read shifted. /v1/score's merged one-pass forward goes through these kernels. Port the gb10 change to both strix-hip kernels (BR32 and _64): - the parameter; - s_end from state_end[b]; - the state-row KV block bound; - the mask (state rows see the state, question rows see every key). With PREFILL_STATE_END undefined (the sink and ricursive builds) s_end is the constant -1, and the causal path is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
|
Pre-merge gates (DevLab runner):
Post-merge build+serve on framework and the runner follows. |
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.
Problem
#331's prefix-bidirectional score mask (87bc7da) added a per-stream
state_endargument afterkv_lensto every batched paged prefill attention launch (prefill_attn_batched.rs). It also added the parameter to gb10'sprefill_paged_compute.cuhunderPREFILL_STATE_END.strix-hip compiles the same
inferspark_prefill_paged{,_fp8,_nvfp4}_batched.cu. They are symlinks to gb10 and#define PREFILL_STATE_END, but they build against strix-hip's ownprefill_paged_compute.cuh, which never gained the parameter. On gfx1151 each of these launches passes one pointer more than the kernel declares, so every argument afterkv_lensis read shifted./v1/score's merged one-pass forward runs through them.Fix
Port the gb10 change into both strix-hip kernels (BR32 and
_64):s_end = state_end[b];Builds without
PREFILL_STATE_END(sink, ricursive verify) gets_end = -1as a constant, so the causal path is unchanged.Evidence
DevLab Strix runner,
nvidia/Qwen3.8-27B-NVFP4,scripts/devlab/score_check.sh, MAX_BATCH 8. The test scores 8 yes/no facts as branches of one few-shot prefix, with options " Yes"/" No":prefix_bidirsanityMAX_BATCH 1 answers 422 on both ("a branch needs 2 sequences, one pass holds 1"), as designed.
Still running before merge
score_checkrepeat on both, with a completions-logprob reference, a moved-split reference and latency: 43493815372 (this branch), 43493821474 (main).🤖 Generated with Claude Code