Repository navigation
[MoE] Keep the CK-Tile split-k route for SwiGLU MXFP4 callers that leave gate_up_interleave unset (MiniMax-M3 TP8 regression from #6478) - #6620
Conversation
…ave gate_up_interleave unset #6478 made the CK-Tile split-k route (swiglu_mxfp4_bf16_cktile) require w1.gate_up_interleave is False. Callers that never set the attribute pass None, and with bf16/fp16 activations they now fall through to the "unshuffled weights" CK-Tile fallback, which runs with post_activation_layout="auto" instead of "standard". ATOM's MiniMax-M3-MXFP4 at TP8 (per-rank inter_dim 384 padded to 512) hits exactly this on every decode step: the MoE output is uncorrelated with the reference and generation runs to max tokens. Treat an untagged layout (None) with bf16/fp16 activations as before #6478. Tagged callers (True/False) are unchanged. Add a dispatch regression test for the untagged case on the MiniMax-M3 TP8 shape.
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
…agged-layout test A server-side trace of get_2stage_cfgs shows inter_dim=512 with intermediate_pad=0 for this call, not intermediate_pad=128.
Problem
Since #6478 (88d7db6), ATOM's
amd/MiniMax-M3-MXFP4TP8 accuracy job generates garbage on every decode step and each GSM8K request runs tomax_gen_toks=16384. The job then times out after ~35–54 min instead of passing in ~9 min. It has failed on every ATOM main run since aiter picked up 88d7db6: job 116798160693, 116822862840, 116835414847. The last pass (116770801850, aiter c118faf) scored GSM8K 0.9431. The other accuracy jobs in those runs still pass, apart from one unrelated 5-minute DeepSeek-R1-0528 MTP failure in one run.Root cause
#6478 changed
swiglu_mxfp4_bf16_cktileto requiregate_up_interleave is False. Callers that never setw1.gate_up_interleavepassNone; ATOM is one of them. With bf16/fp16 activations, these callers no longer take the CK-Tile split-k route withpost_activation_layout="standard". They fall through to the "unshuffled weights" CK-Tile fallback (post_activation_layout="auto") instead. The failing CI server log showsSwiGLU MXFP4 with unshuffled weights not supported by CK2stages codegen; routing to CK-Tile (ROCM-25478); the passing log does not.Only the TP8 shape reaches CK-Tile. A trace of
get_2stage_cfgsinside the TP8 server shows the per-rank MoE call as model_dim 6144,inter_dim=512,intermediate_pad=0, E=129, top-5. Every decode step (M ≤ 256, bf16 activations) goes to CK-Tile. At TP4 the call hasinter_dim=768, and FlyDSL handles every M, so a TP4 run on 88d7db6 stays healthy (GSM8K 64-sample 0.9375).Route chosen for the TP8 decode calls, recorded by the same server-side trace:
post_activation_layoutstandardauto(M ≤ 8) / unset (M ≥ 16)standardFix
Treat an untagged layout (
None) with bf16/fp16 activations the wayswiglu_mxfp4_bf16_cktiledid before #6478. Tagged callers (True/False) take exactly the same route as on main.Validation
All runs are on MI355X (gfx950).
End to end: ATOM main (ffd113b), MiniMax-M3-MXFP4, TP8, CI server flags and env. GSM8K 5-shot chat uses
--limit 64andmax_gen_toks=4096. The direct probe sends 8 GSM8K questions attemperature=0.Kernel:
op_tests/test_moe_2stage.py::test_fmoeon the traced TP8 call shape. The shape is 6144 / 512 / pad 0 / E=129 / top-5, SwiGLU limit 7, no bias, preshuffled MXFP4 weights,AQDType=fp4x2. Every aiter build runs the same harness, the 88d7db6 copy. The table giveslogits_diff= 1 − cosine similarity to the torch reference:With this PR the error goes back to the c118faf baseline. The ~0.07 baseline is the pre-existing value #6478 already noted for this shape.
Tests. The new
test_swiglu_mxfp4_untagged_layout_dispatchasserts the CK-Tile split-k route withpost_activation_layout="standard"for the traced TP8 call. It passes with this PR and fails on main (got 'auto'). The existingtest_swiglu_mxfp4_nonsplit_nobias_dispatchstill passes.blackandruff(0.16.0) are clean.