You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HIP] [CK] Re-submit Relu2 Tier 2 MoE GEMM support (clean CK pin) - #6376
Re-submission of #5708 (Relu2 Tier 2 CK-Tile MoE GEMM support), which was reverted
because the CK submodule pin it introduced was not fetchable from CK's develop
branch (built on two local, un-upstreamed commits rather than an official commit).
Per reviewer guidance on #5708, this PR follows the 3-step recovery path:
This PR re-submits the original Relu2 Tier 2 code on top of that clean,
fetchable CK pin -- rebased onto current main to pick up the repin and
all intervening changes.
What's in this PR
Same Relu2 (gate-only, non-gated) CK-Tile two-stage MoE GEMM support as #5708:
aiter/fused_moe.py: Relu2 dispatch in get_2stage_cfgs / _fused_moe_impl,
including the gate_mode/bias/use_g1u1/doweight_stage1 guard rails specific
to the CK-Tile kFFN_gemm1_gate_only stage1 instance.
csrc/ck_tile_gemm_moe_2stages/*: CK-Tile instance generation and kernel
wiring for the Relu2 activation.
No functional changes versus #5708 beyond what was needed to rebase cleanly
onto current main (CK submodule pin, upstream file moves/renames, and a few
small fixes squashed into the branch's commit history -- e.g. gating enable_bias to Swiglu only, rejecting split_k=0 in the Relu2 non-split
dispatch branch, and rejecting unsupported scatter/activation-scale Relu2
CK-Tile paths).
CK submodule
Pinned to 96afae1d54fc79c26857de7e1683b0dde1ff3c6f (CK develop), confirmed
fetchable and containing both upstreamed commits from ROCm/rocm-libraries#13071.
Reject unsupported Relu2 capabilities before generic fallback
aiter/fused_moe.py:3730
These exclusions only skip the Relu2 CK-Tile branch; they do not reject the unsupported call. For example, a Relu2 call with has_stage2_scatter=True or activation scales falls through to the generic dispatch: with ksplit > 1 it selects a split CK-Tile path for which no Relu2 instance is generated, and otherwise it selects ck_moe_stage1, whose activation mapper rejects Relu2. This turns the intended guard rail into a later launch failure. Reject unsupported Relu2 capabilities before fallback, or route them to a backend that implements Relu2.
Restrict Relu2 to supported quantization triple
op_tests/test_moe_2stage.py:1255
This enables Relu2 for every quantization triple handled by the generic branch, although the new runtime path only supports _PER1X32_BF16_FP4. Running the natural sweep with -a relu2 and no -q therefore starts with QuantType.No, reaches the legacy CK stage1 path, and fails because that mapper does not support Relu2; the sweep never reaches the supported q6 case. Filter Relu2 out unless the triple is _PER1X32_BF16_FP4, or explicitly require q6 for Relu2 sweeps.
The 1012 nightly bundles an aiter whose MoE dispatch rejects MiniMax-M3
(ROCm/aiter#6376) and faults at TP4 warmup. Pin nightly_202610100929 by
digest and keep ATOM_PA_FLYDSL_PLAN, which its ATOM still reads.
1012 nightly 内置的 aiter 的 MoE 分发会拒绝 MiniMax-M3(ROCm/aiter#6376),
且在 TP4 预热时出现非法内存访问。改为按摘要固定 nightly_202610100929,
并保留该 ATOM 仍会读取的 ATOM_PA_FLYDSL_PLAN。
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Callers behind an EP dispatch pass the received token count as
num_local_tokens. Since #5804 the runtime then bounds the layout-v2
GEMM2 atomics by it, a compile-time choice the old mxfp4_moe.py had to
be taught by hand; on inline-sort rows the runtime instead drops the
tuned config for heuristic FlyDSL kernels that no AOT compiled.
Each row is now replayed with num_local_tokens too. Of the old script's
use_valid_token_count kernels, the replay has every one the runtime
reaches; the 227 it lacks come from bias variants of Silu/SiTUv2 rows
(the runtime enables bias for Swiglu only since #6376), from inline-sort
rows the runtime abandons under num_local_tokens, and from a token=3
row that get_padded_M never selects.
Signed-off-by: zhimding <zhimding@amd.com>
@shantipriya-amd, we are reverting this through #6460 because it introduced a gfx950 MiniMax-M3-MXFP4 regression.
The failing runtime combination is SwiGLU + has_bias=false + split_k=1. The generated CK-Tile dispatchers do not cover the required non-split/no-bias path, so the new fail-loud guard reports it as unsupported. Please do not work around this by removing the guard.
Please continue the fix in a follow-up PR. Before re-landing, it should:
cover the required non-split/no-bias SwiGLU dispatch path;
remove the empty primary-dispatcher undefined behavior;
add a targeted test for (SwiGLU, has_bias=false, split_k=1);
pass MiniMax-M3-MXFP4 TP4/TP8 validation through ci:vllm.
This is a temporary rollback of the regression, not a rejection of the Relu2 support. We can re-land it once the missing dispatch coverage is fixed and validated.
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
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
Re-submission of #5708 (Relu2 Tier 2 CK-Tile MoE GEMM support), which was reverted
because the CK submodule pin it introduced was not fetchable from CK's
developbranch (built on two local, un-upstreamed commits rather than an official commit).
Per reviewer guidance on #5708, this PR follows the 3-step recovery path:
Add MoeRelu2 activation functorandFix half_t intrinsics) were submitted and merged upstream to CKdevelopvia [composablekernel] Add MoeRelu2 activation functor and fix half_t intrinsics rocm-libraries#13071.
developcommit containingboth changes (
96afae1d54fc79c26857de7e1683b0dde1ff3c6f) via [CK] Repin CK submodule to fetchable develop commit (relu2/half_t fix) #6178.fetchable CK pin -- rebased onto current
mainto pick up the repin andall intervening changes.
What's in this PR
Same Relu2 (gate-only, non-gated) CK-Tile two-stage MoE GEMM support as #5708:
aiter/fused_moe.py: Relu2 dispatch inget_2stage_cfgs/_fused_moe_impl,including the
gate_mode/bias/use_g1u1/doweight_stage1guard rails specificto the CK-Tile
kFFN_gemm1_gate_onlystage1 instance.csrc/ck_tile_gemm_moe_2stages/*: CK-Tile instance generation and kernelwiring for the Relu2 activation.
csrc/kernels/activation_kernels.cu,csrc/include/aiter_enum.h,csrc/include/rocm_ops.hpp: Relu2ActivationTypeplumbing.aiter/ops/quant.py,csrc/kernels/quant_mxfp4.cu,csrc/kernels/quant_mxfp6_gemm.cu: supporting quant-path changes.op_tests/test_moe_2stage.py: Relu2 test coverage.No functional changes versus #5708 beyond what was needed to rebase cleanly
onto current
main(CK submodule pin, upstream file moves/renames, and a fewsmall fixes squashed into the branch's commit history -- e.g. gating
enable_biastoSwigluonly, rejectingsplit_k=0in the Relu2 non-splitdispatch branch, and rejecting unsupported scatter/activation-scale Relu2
CK-Tile paths).
CK submodule
Pinned to
96afae1d54fc79c26857de7e1683b0dde1ff3c6f(CKdevelop), confirmedfetchable and containing both upstreamed commits from
ROCm/rocm-libraries#13071.
Related