Repository navigation
strix: SCALE 1.8.0 gfx1151 WMMA/FLA/DFlash2 kernel & MODEL.toml parity - #437
Merged
Merged
Conversation
…151 parity Switch the strix (SCALE) kernel tree from spilling CUDA prefill GEMMs to the zero-spill AMD-WMMA gfx1151 kernels in strix-hip/common (via a 4-line #if defined(__SCALE__) bitcast wrapper for clang-23's v16i16 WMMA builtin, leaving hipcc macro-identical) and symlink the missing FLA, DFlash2, DP4A, and W8A16 modules so strix/qwen3.8-27b boots strictly without --dangerously-allow-unresolved-kernel-lookups. Changes: - kernels/strix-hip/: add __SCALE__ atlas_wmma_bf16_w32 wrapper in 5 WMMA files (hipcc path unchanged, verified via hipcc --genco --offload-arch=gfx1151). - kernels/strix/common/ & qwen3.6-27b/nvfp4/: symlink AMD-WMMA w4a16/w8a16/FLA kernels plus DFlash2, DP4A, grammar_bitmask, and gb10 gated_delta_rule_wyn. - kernels/strix/qwen3.8-27b/MODEL.toml: parity with strix-hip/qwen3.8-27b (default_num_drafts=3, default_kv_dtype="bf16", [dflash], [expected_absent]). - serve-amd.sh: restore uniform ATLAS_FFN_SMALLM=0 default now that strix ships zero-spill AMD-WMMA m128 kernels. Stacked on #436 (fix/strix-scale18-ootb).
Contributor
Author
Fresh-checkout receipt (
|
Contributor
Author
|
Stack verification: see #436. |
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.
Stacked on #436 (
fix/strix-scale18-ootb).Summary
Brings the
kernels/strix/(SCALE 1.8.0) kernel tree andkernels/strix/qwen3.8-27b/MODEL.tomlto parity withstrix-hipongfx1151:kernels/strix-hip/+kernels/strix/):__builtin_amdgcn_wmma_f32_16x16x16_bf16_w32takingshort __attribute__((ext_vector_type(16)))instead of__bf16[16]. Add a 4-line#if defined(__SCALE__)atlas_wmma_bf16_w32helper using__builtin_bit_castin the 5 shared WMMA files (common/{w4a16_gemm,w8a16_gemm_t_m128,w8a16_gemm_n_m128,gated_delta_rule_fla}.cuandqwen3.6-27b/nvfp4/w4a16_gemm.cu). Onhipcc,#elsemacro-expands identically to the original builtin (verified withhipcc --genco --offload-arch=gfx1151on all 5 files).kernels/strix/common/w4a16_gemm.cuandkernels/strix/qwen3.6-27b/nvfp4/w4a16_gemm.cuto the zero-spill AMD-WMMA kernels, eliminating the 3,036 B/lane VGPR spills and ~11 min compile time of the old CUDAw4a16_gemm.cuunder SCALE 1.8.0.gfx1151modules (gated_delta_rule_fla.cu,w4a16_gemv_dp4a.cu,moe_expert_gemv_dp4a.cu,w8a16_gemm_{t,n}_m128.cu,w8a16_gemv_batch4.cu,dequant_fp8_bs128_bf16_v8.cu) andgb10/common/DFlash2 / GDN / grammar modules (gated_delta_rule_wyn.cu,gdn_verify_fused_{conv_kn,k2}.cu,dequant_nvfp4_bf16.cu,dense_gemv_{bf16_batchm,fp8w_batch2,fp8w_batchm}.cu,dflash*,grammar_bitmask.cu,quantize_bf16_to_fp8_blockscaled.cu,inferspark_prefill_paged_*sink*.cu).kernels/strix/qwen3.8-27b/MODEL.toml:default_num_drafts = 3,default_kv_dtype = "bf16",tool_call_steering = false,max_inter_tool_prose = 0,verbatim_prompt = true,[dflash](incoai/Qwen3.8-27B-DFlash2), and[expected_absent.*]sospark serveboots cleanly without--dangerously-allow-unresolved-kernel-lookups.serve-amd.sh:ATLAS_FFN_SMALLM="${ATLAS_FFN_SMALLM:-0}"default now thatstrixships zero-spill AMD-WMMAm128kernels.Measured Impact (vs parent #436
b283c8e44on Framework Desktopgfx1151, SCALE 1.8.0)Fresh-checkout receipt for pushed SHA
e57bc689awill be posted below once its clean rebuild finishes.Preview from identical pre-commit tree (
nvidia/Qwen3.8-27B-NVFP4, strict boot, zero env overrides):b283c8e44)e57bc689a)strix/qwen3.8-27b)--dangerously-allow-unresolved-kernel-lookups)391)fib(n))ALPHA-7492-ZETA)incoai/Qwen3.8-27B-DFlash2, γ=8)tok_step=6.29, 11/11 subgraphs)Follow-up PR (PR 3) will enable
cfg!(atlas_scale)for the now-shipped_f16a,w8a16_gemm_n_m128, andw4a16_gemv_dp4akernels inspark-model(unlocking DP4A decode + eliminating the 26stranspose_fp8boot step + further prefill speedup).