Repository navigation
strix-hip Flash-Next: port the fused GDN decode kernels (cluster-free) + BATCH_SMALL above MAX_BATCH 1 (C4 +5.6%, C8 +4.7%) - #300
Merged
Conversation
…r gb10 cluster) qwen4exp_gdn_decode_fused (ATLAS_QWEN4EXP_DECODE_FUSE) and qwen4exp_gdn_decode_fused_rows (ATLAS_QWEN4EXP_BATCH_SMALL) group the three value heads of a key head into a thread-block cluster. The cluster barrier orders the shared q/k conv-window store after every block's read. gfx1151 has no clusters, and the gb10 file never built for strix-hip, so both switches silently kept the per-row four-kernel chain: - framework f130 / f159: BATCH_SMALL "neutral" was the fallback - framework f154: gated_delta_rule_decode_f32 ran 73,476 launches, 7.4% of a C8 step Here one block of 3 x 128 threads is the cluster: - sub-block s owns value head blockIdx.x * 3 + s - the cluster barrier is __syncthreads - every shared array a gb10 block owns is indexed by s; the helpers take it explicitly, since a device function's static __shared__ is one instance per block - each thread runs the gb10 thread's operations in the same order The launchers pick (nv / 3, rows) x 384 under cfg(atlas_hip). The verify / defer / commit cluster kernels stay gb10-only, and their lookups keep resolving to 0 as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…C4 +5.6%, C8 +4.7%) Now that the fused-rows GDN kernel exists on strix-hip, turn the small- kernel batching on wherever the exact lane already is (MAX_BATCH > 1). Framework f160 (main-298 vs this branch, AR, x2): C4 34.0 -> 35.9, C8 38.2 -> 40.0 tok/s, C1 12.8 = 12.8. Solo text identical 8/8, solo-vs-C8 identity 5/8 on both, 0 faults. Explicit values win. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
|
Follow-up, framework f161 (MAX_BATCH 1 recipe, FP8 GDN on, ×2): |
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.
qwen4exp_gdn_decode_fused(ATLAS_QWEN4EXP_DECODE_FUSE) andqwen4exp_gdn_decode_fused_rows(ATLAS_QWEN4EXP_BATCH_SMALL) group the three value heads of a key head into a thread-block cluster. The cluster barrier orders the shared q/k conv-window store after every block's read. gfx1151 has no clusters, andqwen4exp_decode_fuse.cunever built for strix-hip, so both switches silently kept the per-row four-kernel chain:gated_delta_rule_decode_f32ran 73,476 launches, 7.4% of a C8 stepPort (
kernels/strix-hip/qwen3.8-flash-next/nvfp4/qwen4exp_decode_fuse.cu):sowns value headblockIdx.x * 3 + s__syncthreadss(a device function's static__shared__is one instance per block, so the helpers take it explicitly)(nv / 3, rows) × 384undercfg(atlas_hip)moe_blend_hc_postcopied unchangedRecipe:
serve-amd.shsetsATLAS_QWEN4EXP_BATCH_SMALL=1above MAX_BATCH 1, next to BATCH_FAST. Explicit values win.A/B (framework f160, main-298 385d465 vs 11f49ad, Flash-Next NVFP4, MAX_BATCH 8, lane on, AR, Gufo protocol ×2):
🤖 Generated with Claude Code