Repository navigation
strix-hip GDN: vector LDS staging in the chunk_delta_h spine (bit-identical, +1.6..2.2% 27B prefill) - #260
Merged
Conversation
…ntical, -40% kernel) gated_delta_rule_chunk_delta_h_vfused is the serial GDN spine, 5.7% of a 27B 18k prefill (s124) and 7.1% of Flash-Next's 6.6k (f78). It staged each chunk's W, U and K into LDS one bf16 per thread per iteration (3 x 32 dependent loop trips), and thread 0 computed all 65 decay expf alone. With only 48 CTAs (one per v-head) the staging was the critical path: splitting the v columns across 2x/4x more CTAs made the kernel 2.3x / 4x slower (s125), because each thread then had more loads to do. W and U now stage as uint4. K stages as uint4 rows when the key row base is 16-byte aligned, and keeps the element loop otherwise. Each thread computes one decay term. The bytes and the expf operands are identical, so the output is bit-identical: the harness hash of S, uc and the final state equals main's. strix s126 (27B geometry, one 2048-token chunk, interleaved x3): 6.0-6.7 ms -> 3.8-3.9 ms. The common FLA file serves both qwen3.8-27b and qwen3.8-flash-next on gfx1151. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 29, 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.
gfx1151 only (
kernels/strix-hip/common/gated_delta_rule_fla.cu, a strix-local file shared by qwen3.8-27b and qwen3.8-flash-next).gated_delta_rule_chunk_delta_h_vfused(the serial GDN spine: 5.7% of a 27B 18k prefill, 7.1% of Flash-Next 6.6k) staged each chunk's W/U/K into LDS one bf16 per thread per iteration, and thread 0 computed all 65 decayexpf. W/U now stage as uint4, and K as uint4 rows when the key row base is 16-byte aligned (element loop otherwise). Each thread computes one decay term.Bit-identical: the harness hash of S, uc and the final state equals main's, and greedy probes are IDENTICAL on strix (s127) and DevLab.
Splitting the v columns over more CTAs instead (also bit-identical) was 2–4× slower (s125), which is how the staging was identified as the critical path.
🤖 Generated with Claude Code