Repository navigation
Conversation
CK-Tile's 2-stage MXFP4 stage-2 (moe_cktile2stages_gemm2) reduces over inter_dim and indexes its e8m0 weight scales in groups of 8 blocks (8 * 32 = 256 elements). The host pads the scale group dimension up to a multiple of 8 groups (shuffle_scale), so when inter_dim is not a multiple of 256 the kernel reads the wrong groups. There is no error, no warning and no NaN: the model loads, serves, is measurably faster, and only the output is wrong. Measured rel L2 against torch_moe_stage1/2 through fused_moe: 18.19 at inter_dim=128, 10.41 at 384, 7.90 at 640, versus ~5e-3 at 256/512/768. Steer those shapes onto the FlyDSL a16w4 kernels, which are correct at any 128-aligned inter_dim. The guard is qualified by whether a FlyDSL branch can actually take the shape, so nothing is left without a backend -- fp16 activations have no FlyDSL mxfp4 kernel and keep their current routing. Swiglu re-routed onto a16w4 is validated in _fused_moe_impl alongside SiTUv2, since it inherits the same constraints; that turns a silently wrong result into an explicit NotImplementedError for shapes that are already broken today. Also initialise the shuffle_scale pad. The is_guinterleave=False branch allocated with torch.empty and never wrote the pad, so a kernel reading a whole 8-group tile consumed stale device memory (e8m0 0xFF is NaN). This does not fix the corruption on its own; it removes the nondeterminism from it. Add op_tests/flydsl_tests/test_moe_mxfp4_inter_dim_align.py. The dispatch test inspects only the MOEMetadata, so it holds on any toolchain; the numerics test runs the re-routed shapes end to end. Both fail without this change. Co-authored-by: Cursor <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags & labels: |
There was a problem hiding this comment.
🔵 Needs a closer look
It changes backend dispatch and shape validation for a correctness-critical GPU MoE path, so it warrants final human review despite targeted test coverage.
Pull request overview
Host-side mitigation for incorrect MXFP4 fused_moe results by preventing dispatch to CK-Tile 2-stage MoE when inter_dim % 256 != 0, and making scale padding deterministic to avoid shape-dependent reads of uninitialized device memory.
Changes:
- Add
cktile_mxfp4_okgating inget_2stage_cfgsto reroute affected MXFP4 shapes off CK-Tile and onto FlyDSL when a valid FlyDSL backend exists. - Validate the newly rerouted Swiglu shapes against the existing a16w4 FlyDSL constraints at the
fused_moecall site (raisingNotImplementedErrorinstead of silently returning wrong results). - Initialize padded scale buffers in
shuffle_scaleand add a targeted dispatch/numerics regression test.
File summaries
| File | Description |
|---|---|
| op_tests/flydsl_tests/test_moe_mxfp4_inter_dim_align.py | Adds dispatch and numerics regression coverage for the non-256-aligned inter_dim MXFP4 Swiglu case. |
| aiter/ops/shuffle.py | Initializes padded scale buffers to remove nondeterminism from kernels reading full padded tiles. |
| aiter/fused_moe.py | Adds dispatch guard (cktile_mxfp4_ok) and validates rerouted shapes against FlyDSL a16w4 constraints. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Picks up the revert of ROCm#4994 (ROCm#5227), which deletes op_tests/test_fused_moe_s1_fuse_fp8q.py. That file imports aiter.ops.flydsl.utils, a module that does not exist on main, so it failed at import on both MI35X and MI300X shard 5 and was the sole reason the Aiter Test Gate went red on this PR -- unrelated to the MXFP4 dispatch guard here. No conflicts. The guard in aiter/fused_moe.py, the shuffle_scale pad initialisation and the new dispatch/numerics test are unchanged; the only file main and this branch both touched is aiter/fused_moe.py, where the revert removes the stage-1 fp8-quant fusion and merges cleanly.
There was a problem hiding this comment.
🟡 Changes recommended
The new reroute/validation predicates should encode FlyDSL’s 128-alignment requirement for inter_dim to avoid steering unsupported shapes onto FlyDSL and failing at runtime.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
aiter/fused_moe.py:2784
- The CK-Tile MXFP4 reroute predicate (
cktile_mxfp4_ok) is based on_flydsl_can_take_over, but_flydsl_can_take_overcurrently does not encode FlyDSL’s K-axis alignment requirement. FlyDSL MXFP4 kernels generally require K (hereinter_dim) to be divisible by 128 (e.g.aiter/ops/flydsl/batched_gemm_mxfp4.py:298,331), so shapes withinter_dim % 256 != 0but alsointer_dim % 128 != 0could be steered off CK-Tile and then fail/behave incorrectly in FlyDSL. Consider constraining takeover tointer_dim % 128 == 0to match the intent described in the PR.
_flydsl_can_take_over = (
dtype in [dtypes.bf16, dtypes.fp16]
and q_type == QuantType.per_1x32
and q_dtype_a in (dtypes.bf16, dtypes.fp4x2, dtypes.fp8)
and is_shuffled
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
|
@yadaish — thank you for picking this one up. Whenever you have a moment, could I kindly ask for your review? CI is now fully green on the current head ( A short recap, in case it saves you a pass over the description:
One more reason I would be grateful for your time: there is a downstream vLLM change waiting on this one. vllm-project/vllm#55104 aligns the ROCm AITER W4A4 MoE intermediate size to 128 instead of 256, which gives 25 % smaller expert weights and +4.27 % output throughput on MiniMax-M3-MXFP4 (MI355X, TP8). It is deliberately kept as a draft, because without the guard in this PR that alignment change silently corrupts decode output — clean-corpus perplexity goes from 10.936 to 41.325. I will only take it out of draft once this one lands. Please let me know if you would like anything reworked, or the change split up differently — happy to adjust. |
_flydsl_can_take_over is meant to hold only for shapes a FlyDSL branch can actually accept, but it did not encode the K-axis alignment those kernels require. Both gemm1 ports assert 2*D_INTER % 256 == 0 -- a 128-aligned inter_dim -- in moe_2stage_a16wmix/gemm1.py and mxfp4_gemm1_kernels.py. An inter_dim that is neither 128- nor 256-aligned (192, 320) was therefore steered off CK-Tile into a kernel assertion, trading a silently wrong result for a crash rather than for a correct one. Add the alignment term to _flydsl_can_take_over and mirror it in _fused_moe_impl's _is_a16w4_swiglu_rerouted, so the impl-side validation keeps firing exactly when the shape is re-routed. Such a shape now stays on CK-Tile and keeps the wrong result this guard exists to avoid: no backend here computes it correctly, and the kernel-level fix tracked in ROCm#5233 is what closes it. The gap is deliberate and now pinned by a test rather than left implicit. Dispatch over inter_dim in {128, 192, 256, 320, 384, 512, 640, 768, 1024}, with the predicates lifted out of the source with ast so the check cannot drift from the code: 192 and 320 move from flydsl to cktile, the other seven values are unchanged, and _is_a16w4_swiglu_rerouted agrees with the dispatch decision on every value. Extend the dispatch test with NON_128_ALIGNED = [192, 320], expected to stay on CK-Tile. It compiles no kernel, so it runs on any FlyDSL toolchain. Raised by Copilot in review on ROCm#5232. Co-authored-by: Cursor <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
The changes are tightly scoped host-side safeguards with consistent validation and targeted regression tests, and they preserve existing routing for already-256-aligned shapes.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
@zufayu — you kindly assigned @yadaish as the reviewer here on Sep 4. Could I ask for your help Where the PR stands, so the ask is concrete:
Why I am nudging rather than simply waiting: this covers a silent-correctness bug Happy to split the change up or rework anything if that would make review easier. |
130 commits, no conflicts. Nine of them touch aiter/fused_moe.py, including the MXFP4 fused-MoE work in ROCm#5300, ROCm#4526 and ROCm#4985, so the three things this guard rests on were re-checked against the merge result: * tuned_fmoe.csv still carries no mxfp4 row with a non-256-aligned inter_dim, so the tuned path cannot hand an affected shape to CK-Tile behind the guard. * The CK-Tile stage-2 scale indexing is still unfixed (ROCm#5233 open), so the host-side guard is still needed. * Dispatch is unchanged: inter_dim 128/384/640 to FlyDSL, 192/320 and the 256-aligned values on CK-Tile, with _fused_moe_impl's validation firing on exactly the re-routed shapes.
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved routing, shape-safety, tuned-configuration, and CI-collection issues remain.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
op_tests/flydsl_tests/test_moe_mxfp4_inter_dim_align.py:113
- [verified] This new test file is not collected by the standard Aiter CI:
.github/scripts/split_tests.sh:53and.github/scripts/aiter_test.sh:30scan onlyop_testsat max depth 1, and no workflow referencesop_tests/flydsl_tests. As a result, both the dispatch and numerical regression tests can be skipped while CI remains green. Author must wire this subdirectory into a CI test target or move these tests under a collected target.
@_SKIP
- Files reviewed: 3/3 changed files
- Comments generated: 3
- Review effort level: Lite
Centralize the FlyDSL takeover constraints so bf16 INTERLEAVE layouts and model dimensions that violate the a16w4 tile-K requirement no longer get routed to an incompatible kernel. FP8 INTERLEAVE remains eligible because its registered kernel names select the interleaved variant. Discard unsafe tuned CK-Tile stage-2 rows before their early return. Add matching checks in _fused_moe_impl and cktile_moe_stage2 so unsupported, custom, online-tuned and direct-call paths fail explicitly instead of silently returning corrupt output. Move dispatch and safety coverage to an op_tests top-level file collected by standard Aiter CI, and add the pytest main entry point required by aiter_test.sh's direct-python runner. Keep the toolchain-dependent GPU numerics cases in flydsl_tests. Co-authored-by: Cursor <[email protected]>
|
Also addressed the suppressed CI-collection finding in |
There was a problem hiding this comment.
🟡 Changes recommended
Critical routing correctness issues remain, along with missing coverage for standard-layout scale initialization.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (2)
aiter/ops/shuffle.py:357
- The new initialization is not directly covered: the existing scale-padding test exercises
is_guinterleave=True, while the new numerics test routes through FlyDSL and can pass without ever reading these padded bytes. A regression back totorch.emptyin this standard-layout branch would therefore go unnoticed and reintroduce nondeterministic E8M0 values; add a standard-layout test that asserts padded columns/rows contain the neutral0x7Fvalue (and the multi-byte fallback where applicable).
if scale_padded.element_size() == 1:
scale_padded.view(torch.uint8).fill_(0x7F)
else:
scale_padded.fill_(1.0)
op_tests/flydsl_tests/test_moe_mxfp4_inter_dim_align.py:130
- This comment has a grammatical error: “the CK-Tile scale mis-indexing this test guards against produces” is not a valid sentence, which makes the test rationale unclear.
# this test guards against produces 0.7 or more.
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Lite
|
Also addressed both suppressed findings in |
There was a problem hiding this comment.
🔵 Needs a closer look
Unresolved routing paths can select incompatible layouts or bypass safe FlyDSL rerouting.
Review details
Suppressed comments (2)
aiter/fused_moe.py:3443
- Although
_can_reroute_mxfp4_to_flydslrejects the FP8 +GateMode.SEPARATEDpairing, this fallback still ignoresgate_mode. For the new matrix case(q_dtype_a=fp8, gate_mode=SEPARATED, inter_dim=384),use_mxfp4_flydslselects an_guiFP8 stage-1 kernel, which consumes GUGU weights rather than the supplied GGUU layout; the dispatch test therefore cannot enforce the stated safety contract. Apply the same exact activation/layout pairing to this non-_is_a16w4branch so unsupported calls remain on the guarded CK-Tile path.
use_mxfp4_flydsl = _is_a16w4 or (
dtype in [dtypes.bf16, dtypes.fp16]
and q_type == QuantType.per_1x32
and (
activation in (ActivationType.Swiglu, ActivationType.Situv2)
aiter/fused_moe.py:3431
- This reroute is still bypassed whenever
ksplit > 1: the later heuristic at lines 3530-3569 returnscktile_moe_stage2when(ksplit > 1 or swiglu_mxfp4_bf16_cktile), and that condition does not includecktile_mxfp4_ok. For a supported bf16/SEPARATED non-256 shape with split-K enabled (includingAITER_KSPLIT=2),_fused_moe_impltherefore reaches the new final guard and raises instead of selecting the safe a16w4 FlyDSL route. Gate that fallback with the safety flag or otherwise make the reroute take precedence.
_is_a16w4_swiglu_rerouted = (
not cktile_mxfp4_ok
and dtype in [dtypes.bf16, dtypes.fp16]
and q_type == QuantType.per_1x32
and activation == ActivationType.Swiglu
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
Use one activation/layout compatibility predicate in both the CK-Tile takeover decision and the generic MXFP4 FlyDSL branch. FP8 kernels are registered as INTERLEAVE-only, while bf16/fp4 kernels consume SEPARATED weights, so FP8 + SEPARATED can no longer re-enter FlyDSL after being rejected by the takeover check. Co-authored-by: Cursor <[email protected]>
Add a dispatch regression with AITER_KSPLIT=2. The safe FlyDSL branch returns before the later generic CK-Tile split-K fallback, so split-K does not bypass the non-256-aligned reroute. Co-authored-by: Cursor <[email protected]>
|
Addressed the latest review on head |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical and moderate routing-safety findings remain in aiter/fused_moe.py.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
aiter/fused_moe.py:3054
- This filter only recognizes the
cktile_prefix, but the repository has configured MXFP4 CK-Tile rows namedswiglu_mxfp4_bf16_cktile(for exampleaiter/configs/model_configs/gptoss_a16w4_tuned_fmoe.csv:2), and the heuristic below explicitly treats that family as the CK-Tile fallback. An unsafe tuned/custom row using that name therefore survives this check and can bypass the stage-2 safety guard; classify the alias as CK-Tile before returning configured metadata.
if cktile_mxfp4_unsafe and kn2.startswith("cktile_"):
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
Base CK-Tile takeover on the existing both-weights-shuffled signal rather than the aggregate OR flag. This prevents a shuffled W1 from routing an unshuffled W2 into the FlyDSL stage-2 preshuffled layout. Recognize the swiglu_mxfp4_bf16_cktile configured alias as CK-Tile stage 2 so unsafe custom rows are discarded with the regular cktile_* family. Extend dispatch coverage for one-sided shuffle state and both configured names. Co-authored-by: Cursor <[email protected]>
|
Also fixed the suppressed configured-alias finding in |
There was a problem hiding this comment.
🟡 Changes recommended
A critical FP16 output-corruption path remains unresolved, and newly rerouted FP4/FP8 layout families lack numerical regression coverage.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
op_tests/test_moe_mxfp4_inter_dim_dispatch.py:118
- The new takeover branches for
q_dtype_a=fp4x2/SEPARATED andq_dtype_a=fp8/INTERLEAVE are only checked by backend-name assertions here; no test runs those newly rerouted paths throughfused_moeand compares their output. A dispatch test would still pass if the activation/scale layout were wrong, which is especially risky for this silent-numerical-corruption fix. Add at least one numerical regression case for each new activation/layout family (or keep those families out of the takeover until they are validated).
def test_mxfp4_swiglu_takeover_matches_weight_layout(q_dtype_a, gate_mode, want):
meta = _dispatch(q_dtype_a=q_dtype_a, gate_mode=gate_mode)
assert _stage_backend(meta.stage2) == want
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Lite
The ported a16w4 stage-2 kernel stores BF16, so routing an FP16 output buffer through it corrupts the result. Restrict the CK-Tile takeover to BF16 output with BF16 activation and SEPARATED weights, which is the path covered by the numerical regression. FP4/FP8 activation families keep their pre-existing generic dispatch; unsafe FP8 INTERLEAVE no longer becomes newly eligible through the CK-Tile guard. Add an FP16-output regression and update the dispatch matrix. Co-authored-by: Cursor <[email protected]>
|
Addressed the suppressed numerical-coverage finding by narrowing the change rather than claiming untested coverage. In |
Co-authored-by: Cursor <[email protected]>
|
@yifehuan @coderfeli — could either of you help review this when convenient? This is a host-side correctness guard for non-256-aligned MXFP4 MoE. All required CI is green: 35 checks passed, including all 16 MI35X/MI300X shards. The targeted dispatch and safety suite ran on MI35X with 25/25 cases passing. The latest Copilot pass reported no new findings. The downstream vLLM change vllm-project/vllm#55104 remains blocked on this PR. |
…_dim % 256 != 0 ROCm#5232 kept CK-Tile stage2 away from non-256-aligned MXFP4 shapes, but the inline-sort two-stage path still accepts them. It must not: the intermediate scales are e8m0_shuffle'd in groups of 8 columns, so stage1 writes and stage2 read them on a stride that rounds scale-N up to a multiple of 8 (kas_c_k1_for), while the buffers sized on the exact inter_dim are short of that stride whenever inter_dim % 256 != 0. is_mxfp4_moe_shape_supported also pads inter_dim up to 256 before its allowlist lookup, so a 1152-wide call reports supported by matching the 1280 instance and then runs the kernel generated for 1280. DeepSeek-V4.1-Flash at TP2 shards moe_intermediate 2304 to 1152 and faults during CUDA graph capture: Memory access fault by GPU node-4 on address 0x7f84c9d33000. [aiter] Error in moe_sorting: CUDA error: an illegal memory access tuned_fmoe.csv carries 16 tuned rows at inter_dim=1152 for (expert=384, topk=6), so the shape is actively steered onto the faulting path. TP4 (640) only escapes because vLLM pads it to 640 from 576 and the resulting intermediate_pad already trips the padding check. Reject the shape at both existing gates, matching how expert_mask is handled: in get_2stage_cfgs so the tuned row is never selected, and in _mxfp4_inline_sort_unsupported so an invocation that reaches it falls back through the heuristic path. The heuristic path already runs these shapes on a4w4 FlyDSL kernels correctly, so no shape loses a4w4 and no weights grow. Co-authored-by: Claude Opus 5 Signed-off-by: Fangzhou Ai <[email protected]> Co-authored-by: Cursor <[email protected]> Signed-off-by: Fangzhou Ai <[email protected]> Co-authored-by: Cursor <[email protected]>
[fused_moe] Do not route MXFP4 MoE to CK-Tile when
inter_dim % 256 != 0Kernel-level defect report: #5233. This PR is the host-side mitigation. If the
CK-Tile stage-2 scale indexing is fixed there, the guard added here becomes dead and should be
dropped in favour of the kernel fix.
Problem
MXFP4 MoE (
QuantType.per_1x32,q_dtype_w = fp4x2) returns badly wrong results wheneverinter_dim % 256 != 0— e.g.inter_dim = 384, which is what amoe_intermediateof 3072gives at TP8. There is no error, no warning and no NaN; only the output is wrong.
rel L2 per stage against
torch_moe_stage1/torch_moe_stage2, token=32, model_dim=6144,E=256, topk=8, block_m=32, split_k=2, with stage 2 fed the reference stage-1 output so the two
stages are isolated:
The same pattern holds at E=129 topk=5.
Root cause
CK-Tile stage 2 reduces over
inter_dimand indexes its E8M0 weight scales in groups of 8blocks (8 x 32 = 256 elements). The host pads the scale group dimension up to a multiple of 8
(
shuffle_scale/e8m0_shuffle), so atinter_dim % 256 != 0the scale tensor handed to thekernel has a wider group stride than the kernel assumes and stage 2 consumes the wrong scales.
Stage 1 reduces over
model_dimand is unaffected.This is a kernel indexing bug, not just a read of uninitialised pad bytes: pre-filling the w2
scale pad with a known byte before
e8m0_shufflechanges the error but does not remove it(at 384, uninitialised -> nan,
0x7F-> 10.239,0x00-> 0.686; at 512 all three are 0.0038).Fix
Both changes are host-side. The CK-Tile HIP/CK source is not in this repository, so this PR
stops the broken shape from reaching the kernel rather than fixing the kernel.
aiter/fused_moe.py.get_2stage_cfgsgainscktile_mxfp4_ok, which gates the two CK-TileMXFP4 dispatch sites and routes the affected Swiglu shapes onto the same a16w4 FlyDSL kernels
SiTUv2 already uses. The guard also requires that a FlyDSL branch can actually accept the shape,
so
fp16activations — which have no FlyDSL mxfp4 kernel here — keep their current routinginstead of being left with no backend at all.
The takeover is limited to the numerically validated path: BF16 output, BF16 activation,
SEPARATED weights, both weights marked shuffled, 128-aligned
inter_dim, and 256-alignedmodel_dim. FP16 output and FP4/FP8 activation families are not made newly eligible by thisguard. If no safe FlyDSL route exists,
_fused_moe_implandcktile_moe_stage2raiseNotImplementedErrorbefore CK-Tile can return a corrupt result.Unsafe tuned, custom, and online-tuned CK-Tile stage-2 rows — including the
swiglu_mxfp4_bf16_cktilealias — are discarded before their early return and fall back to the same heuristic selection. The runtime check incktile_moe_stage2is the final guard for direct callers.
aiter/ops/shuffle.py. Theis_guinterleave=Falsebranch allocated the padded scale bufferwith
torch.emptyand never wrote the pad, so a kernel reading a whole 8-group tile consumedstale device memory (E8M0
0xFFis NaN). It now fills with0x7F(E8M0 1.0), matching theis_guinterleave=Truebranch. This removes the nondeterminism, not the corruption.Already-256-aligned shapes are unaffected
get_2stage_cfgsreturns a field-identicalMOEMetadataat inter_dim 256 / 512 / 768 — bothstage callables, every bound
functools.partialkeyword,block_m,ksplitand all flags —compared against the same function with
cktile_mxfp4_okforced toTrue.Dispatch tests cover the aligned and non-aligned
inter_dimmatrix, all six bf16/fp4/fp8activation and SEPARATED/INTERLEAVE layout pairs,
model_dim=1152, unsafe tuned CK-Tile metadata,the packed-activation runtime guard, an explicit
AITER_KSPLIT=2reroute, and standard-layoutscale padding. Aligned MXFP4 and non-FP4 calls remain allowed.
Cost of the re-route
The re-routed shapes land on the FlyDSL heuristic fallback, because
tuned_fmoe.csvhas no rowsfor a non-256-aligned
inter_dimon this path (fallback count in a serving run goes 48 -> 72).On MiniMax-M3-MXFP4, TP8, MI355X, against the same 512-padded baseline (
vllm bench serve,ISL 8192 / OSL 1024, concurrency 64, 2x2 interleaved paired runs):
The gap is tuning, not a kernel limitation: it closes by adding tuned rows for non-256-aligned
inter_dim, or by fixing the CK-Tile stage-2 scale indexing so the shape can stay on CK-Tile.Test plan
op_tests/test_moe_mxfp4_inter_dim_dispatch.pycontains the dispatch and safety cases. It is atthe
op_teststop level and has apytest.mainentry point, so the standard direct-python AiterCI runner executes it.
op_tests/flydsl_tests/test_moe_mxfp4_inter_dim_align.pykeeps the threeGPU numerics cases for FlyDSL toolchains that can compile the a16w4 port.
Reverting only the original dispatch guard fails the three dispatch and three numerics cases:
The aligned dispatch and CK-Tile runtime cases ensure the safety checks do not reject supported
shapes.
Limitations
not on a
mainbuild.main's FlyDSL a16w4 kernel source needs a newer flydsl than the 0.2.4in the test image:
aiter/ops/flydsl/kernels/moe_2stage_a16wmix/gemm1.pyfails codegen withTypeError: s_waitcnt() got an unexpected keyword argument 'lgkmcnt'. This is pre-existing andunrelated —
mainat0598b04fcwith zero patches fails the shippedtest_flydsl_moe_a16wfp4.pythe same way. Onmainthis change rests on the predicateequivalence above, the dispatch test (which needs no kernel), and inspection.
is_ep=True), or INTERLEAVEnumerics coverage.
inter_dimbelow 256 is covered by dispatch and safety tests but not by an end-to-end model run.executable on CK-Tile.
Downstream
vllm-project/vllm#55104 aligns the ROCm AITER W4A4 MoE intermediate size to 128 and depends on
this PR. It is kept as a draft until this one lands, because without this guard that alignment
change silently corrupts decode output (clean-corpus perplexity 10.936 -> 41.325).