Repository navigation
perf(hip): Flash-Next hc_pre_down prefetches 16 weights per pass (bit-exact, C1 decode +9-27%) - #373
Merged
Merged
Conversation
…it-exact, 2.1-2.7x) hc_pre_down (Flash-Next hyper-connection stage 2, serial and short-T decode) did one 2-byte BF16 load per FMA. Each warp was latency-bound at ~52 GB/s on the 6.5 MB down_w stream; together with hc_pre_finish_x4 it is 27% of single-user decode GPU time (devlab rocprof 43677480400). Each lane now loads 16 of its lane-strided weights into registers, then runs the same FMAs in the same ascending-i order, so the per-lane sum and the shfl reduction are unchanged and the output is byte-identical. kbench_hc2 (devlab 43686225170) found 0 differing outputs. Ship grid, per call: 125 -> 46 us at T=1, 111 -> 53 us at T=2, 127 -> 57 us at T=4. A wider grid did not help (same kbench, 43681868396), so the launch is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
AzeezIsh
added a commit
that referenced
this pull request
Nov 16, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
hc_pre_downis Flash-Next's hyper-connection stage 2, run in serial and short-T decode from the strix-localhyper_connection.cu. Each lane now loads 16 of its lane-strided BF16 weights into registers, then runs the same FMAs in the same ascending-i order. The per-lane sum and the shfl reduction are unchanged, so the output is byte-identical.Why
The old loop did one 2-byte load per FMA, so each warp was latency-bound at ~52 GB/s on the 6.5 MB
down_wstream. Together withhc_pre_finish_x4it was 27% of single-user Flash-Next decode GPU time (rocprof 43677480400). A wider grid did not help (kbench 43681868396), so the launch is unchanged.Evidence (DevLab Strix runner)
kbench (
scripts/devlab/kbench_hc2, 43686225170): 0 differing outputs.End to end, Flash-Next NVFP4, C1 greedy decode, same wave (main 43695284596, this branch 43695287105):
09714ec21a48103770824dbe242c7689320cAll three replies are byte-identical between the builds; decode is +9–27%.
The h2h on the branch (43690712002) shows b8 C1 20.2 → 21.7 tok/s. C4 and C8 run the separate tiled kernel and are unchanged.
🤖 Generated with Claude Code