Repository navigation
Conversation
This was referenced Dec 4, 2026
This branch has not been deployed
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.
Summary
PR (2/3) in the Qwen4-35B bring-up stack (stacked on #455), focused on AMD Strix Halo (
strix-hip/ gfx1151).Adds the
kernels/strix-hip/qwen4-35b/target for the denseqwen4_expbackbone (hidden_size = 5120,hc_dim = 20480,num_experts = 0):kernels/strix-hip/qwen4-35b/nvfp4/): Rather than pointingkernel_source = "qwen3.8-flash-next"(which inherits the MoEqwen3.6-35b-a3bw4a16_gemm.cu), this target composes:qwen3.8-flash-next/nvfp4/HIP overrides:hyper_connection.cu(carries the 16 KB-LDShc_pre_down_tiledarm selected by feat(qwen4_exp): dense FFN backbone + H=5120 hyper-connection support (Qwen4-27B dense) #455 athc_dim = 20480),qsa_attn_tc2.cu,qwen4exp_decode_fuse.cu,ple.cu,qsa_indexer.cu,gated_delta_rule_wy17.cu.qwen3.6-27b/nvfp4/dense overrides:w4a16_gemm.cu(ships the dense-FFNw4a16_gemm_t_m128_k16prefill arm and DFlash/MTP verifyw4a16_rowgemv_m9/m17/reducekernels missing from Flash-Next's shadow) andgated_delta_rule.cu(48V/16K dense GDN spine).w4a16_gemv*,w8a16_gemm*,dense_gemm_bf16,dense_gemv_bf16*,gated_delta_rule_wynK=5..8,gdn_verify_fused_*) inherited directly fromkernels/strix-hip/common/.kernels/strix-hip/qwen4-35b/MODEL.toml):(model_type = "qwen4_exp", hidden_size = 5120)withmatch_names = ["qwen4-35b", "qwen4-27b"].[expected_absent.*]entries fromstrix-hip/qwen3.8-27b(q4k_mmq,q4k_quantize,dequant_nvfp4_bf16,nvfp4_mmq,w8a16_gemv_fused, densew4a16probes) withstrix-hip/qwen3.8-flash-next'sqwen4_expentries and[expected_absent.moe_persist_marker](required byatlas-kernelslib_tests).default_kv_dtype = "bf16",default_num_drafts = 1,tool_call_parser = "qwen3_coder", and reference-parity[behavior](verbatim_prompt = true,tool_call_steering = false,max_inter_tool_prose = 0,ban_tool_call_without_tools = true).crates/atlas-kernels/tests/qwen4_35b_resolution.rs): Pins(qwen4_exp, 5120)resolution onstrix-hip, non-collision withqwen3.8-flash-next(2560), andmoe_persist_markerabsence.Strix Halo (
gfx1151) Notes & Day-0 Checklistmain:strix-hipbuilds currently need PR strix-hip: fix main's AMD build (vision_encoder raw mma.sync since #397) #444 (fixes rawmma.syncPTX invision_encoder.cuintroduced by score: images in /v1/score, image packs with an FP8 store, NVMe tier and read-ahead (stacked on #332) #397). Rebase or merge strix-hip: fix main's AMD build (vision_encoder raw mma.sync since #397) #444 before compilingATLAS_MODELS=qwen4-35bon ROCm/HIP.hc_dim = 20480: With feat(qwen4_exp): dense FFN backbone + H=5120 hyper-connection support (Qwen4-27B dense) #455, decode falls back from single-passhc_pre_down(80 KB > 48 KB LDS) tohc_pre_down_tiled(16 KB LDS, bitwise identical, 40 barrier rounds per token). Once real weights run on Strix, profilehc_pre_down_tiledin decode — a 4H-capable split-K / register-staged HIP decode kernel (following PR22's 40-way K-split design) is the primary mHC decode optimization lever if it shows up hot.kv_heads = 4(if QSA ships):strix-hip/qwen3.8-flash-next/nvfp4/qsa_attn_tc2.cuandqsa_prefill_attn_tc2_okrequirenum_kv_heads == 2. Atkv_heads = 4(24Q / 4KV,gqa = 6), dispatch safely falls back toqsa_prefill_attn(non-WMMA). If the released Qwen4-35B checkpoint includes QSA indexer weights, generalizingqsa_attn_tc2.cuto launchgrid.x = num_kv_heads / 2(two KV heads per CTA) will recover WMMA QSA prefill on Strix with minimal code change.strix-hip/common/gated_delta_rule_wyn.cualready builds K=5..8 (wy5..wy8), so--num-drafts 4+ATLAS_QWEN4EXP_MTP_DEPTH=4+ATLAS_QWEN4EXP_EXACT_VERIFY=1+ATLAS_QWEN4EXP_BATCH_FAST=1is directly testable on Strix once weights drop (alongsidew4a16_rowgemv_m9/m17fromqwen3.6-27b/nvfp4/w4a16_gemm.cu).expected_absentaudit: Run onespark serveboot on gfx1151 (Linux DevLab / Framework Strix) to confirm zero undeclared unresolved probes and prune any dead entries fromMODEL.toml.model_typestring, layer count / GDN:full ratio,intermediate_size(14336 vs 17408), whether QSA/PLE ship, BA/QKVZ projection split, and MTP HC layout against the releasedconfig.json.Stack
feat/qwen4-35b-dense-core→main)feat/qwen4-35b-strix-hip→feat/qwen4-35b-dense-core)feat/qwen4-35b-gb10→feat/qwen4-35b-strix-hip)Verification
ATLAS_SKIP_BUILD=1):kernels/strix-hip/qwen4-35b/nvfp4/verified livecargo fmt --check— passcargo test -p atlas-kernels— pass (incl.no_model_shadow_drops_a_common_kernel,qwen4_35b_resolution,target_resolution)cargo clippy -p atlas-kernels --tests -- -D warnings— passRUSTDOCFLAGS="-D warnings" cargo doc --no-deps -p atlas-kernels— passhipccor tested on real Qwen4-35B weights (opened as draft).