Repository navigation
perf(hip): Flash-Next hc_pre_down stays single-pass at decode widths (bit-identical, ~+8% C8) - #384
Merged
Merged
Conversation
…(bit-identical) HIP cut the mHC low-rank down projection over to hc_pre_down_tiled from T=5 (kbench 42932386097, tiled 189 vs single-pass 319 us at T=8). #373 then made the single-pass hc_pre_down 2.7x faster and the cutover went stale: tiled was 205 us a call, 11.4% of strix Flash-Next C8 decode. Re-measured (kbench 43868021041, outputs memcmp-equal): T=5 59.6 vs 163.2 us, T=6 66.4 vs 166.4, T=8 76.3 vs 183.7. Decode widths now take hc_pre_down on every platform; tiled keeps T > HC_TT (prefill), unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
|
Framework f316 same-box C8 A/B (3 rounds x 8 x 256 tokens): main 47.4 / 49.3 / 49.7 vs branch 49.2 / 52.0 / 52.0 tok/s agg (+4.7%); per-stream shas identical across arms. Trimmed the comment (file was 501 lines, cap is 500). |
4 of 7 tasks
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.
What
On HIP, Flash-Next's mHC low-rank down projection switched from the single-pass
hc_pre_downtohc_pre_down_tiledat T ≥ 5. That came from kbench 42932386097: tiled 189 vs single-pass 319 µs at T=8. #373 then madehc_pre_down2.7x faster, and the cutover went stale.Tiled was 205 µs per call, 11.4% of strix Flash-Next C8 decode GPU time. Decode widths (T ≤
HC_TT) now takehc_pre_downon every platform. Tiled keeps T > 8 (prefill), unchanged.Both kernels compute each (t, r) as one lane-strided warp walk plus the same shuffle tree, so outputs are bit-identical.
Evidence (strix DevLab runner)
hc_pre_downper call (11.4% → 5.1% of GPU time); C8 profiled 45.9 vs 42.4 tok/s agg🤖 Generated with Claude Code