Repository navigation
Conversation
A bf16-activation x MXFP4-weight SiLU MoE (the small-batch route below AITER_BF16_FP8_MOE_BOUND, e.g. DeepSeek-V4.1 on gfx950) fell through to CK2stages, which has no A16W4 SiLU kernel and no clamp: the JIT build fails, and where it builds the swiglu_limit is dropped. Give SiLU on gate/up interleaved weights the same CK-Tile split-K route SwiGLU uses, forward swiglu_limit to cktile_moe_stage1, and let flydsl_silu_and_mul_interleaved take the limit instead of a fixed inf. op_tests/test_moe_a16w4_silu_limit.py runs a DeepSeek-V4.1-shaped MoE (model_dim 5120, inter_dim 2304) through fused_moe against the clamped torch reference. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Measured on MI355X (DeepSeek-V4.1-Flash TP4, DSpark EP4) with AITER_BF16_FP8_MOE_BOUND=0, as the AMD DeepSeek-V4 tests and cookbook set it: - the stage-1 LDS-DMA drain: GSM8K 0.885 unpatched vs 0.905 patched (200 questions), throughput within noise, and its race test passes unpatched; it stays upstream as ROCm/aiter#5561; - the bf16 SiLU route is never taken at bound 0; the fix is ROCm/aiter#5802; - the tuned FMoE CSV shows no end-to-end gain; it stays upstream as ROCm/aiter#5562. Co-Authored-By: Claude Opus 5.5 <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags & labels: |
|
No activity for 15 days, so this is now labelled |
|
Updated against main in a436a92. The SiLU A16W4 route and clamp are still missing upstream, so this PR remains needed. The merge preserves the newer SwiGLU tagged/untagged weight-layout rules while adding the interleaved SiLU route separately. Fresh gfx950 / ROCm 10 / PyTorch 2.11 / FlyDSL 0.4 validation:
The fork branch is updated. GitHub’s upstream workflow runs need maintainer approval before required CI can establish merge readiness. |
There was a problem hiding this comment.
🟡 Changes recommended
The change still has critical SiLU dispatch bugs that can select unsupported stage-2 shapes or misinterpret non-interleaved weights, and its regression test is not executed by CI and uses insufficient output validation.
4 open issues
Review effort: Lite
| or ( | ||
| activation == ActivationType.Silu | ||
| and dtype == dtypes.bf16 | ||
| and q_dtype_a in [dtypes.bf16, dtypes.fp16] | ||
| and gate_mode is GateMode.INTERLEAVE | ||
| ) |
| "standard" | ||
| if mxfp4_bf16_cktile and activation == ActivationType.Swiglu | ||
| else "auto" |
| diff = _cos_diff(ref.float(), out.float()) | ||
| assert diff < 1e-2, f"a16w4 SiLU with swiglu_limit: cos diff {diff:.3e}" |
| assert not out.isnan().any().item(), "a16w4 SiLU output contains NaN" | ||
| diff = _cos_diff(ref.float(), out.float()) | ||
| assert diff < 1e-2, f"a16w4 SiLU with swiglu_limit: cos diff {diff:.3e}" |
|
Closing because this is no longer needed by the current DeepSeek-V4.1 serving path. sgl-project/sglang#45480 now explicitly passes The earlier validation established that this patch supplies behavior missing from AITER. The subsequent downstream-history check establishes that our current V4.1 recipe no longer needs that behavior. This closure does not mean the BF16 SiLU dispatch/clamp issue is fixed upstream, or that BF16 and FP8 have been shown accuracy-equivalent. The branch and test evidence remain available if BF16 activation support becomes a concrete requirement again. The new review findings remain unresolved and would need attention before reviving the change. |


Summary
Route interleaved bf16-activation × MXFP4-weight SiLU MoE with bf16 output to CK-Tile’s split-K post-activation path. CK2stages has no matching A16W4 SiLU heuristic. Forward the caller’s
swiglu_limitthrough CK-Tile to the FlyDSL interleaved activation instead of dropping it.This is the small-batch DeepSeek-V4.1 path below
AITER_BF16_FP8_MOE_BOUND. The existing SwiGLU tagged/untagged weight-layout routing is preserved. SwiGLU continues to request the standard post-activation layout; the new SiLU route is limited toGateMode.INTERLEAVE.Validation
Against main
1dd826c42, on gfx950 / ROCm 10 / PyTorch 2.11 / FlyDSL 0.4:op_tests/test_moe_a16w4_silu_limit.py: both M=1 and M=32 end-to-end cases passed against the clamped reference, with a check that unclamped output differs.test_swiglu_mxfp4_nonsplit_nobias_dispatchandtest_swiglu_mxfp4_untagged_layout_dispatchregressions passed.New-head required CI remains pending upstream workflow approval.