Skip to content

[MoE] Add MiniMax-M3 TP2 a16w4 decode rows for gfx950 - #6529

Merged
yzhou103 merged 12 commits into
ROCm:mainfrom
amd-bishwoadhikari:config/minimax-m3-mxfp4-fmoe-consolidated
Dec 2, 2026
Merged

yzhou103 merged 12 commits into
ROCm:mainfrom
amd-bishwoadhikari:config/minimax-m3-mxfp4-fmoe-consolidated

Conversation

@amd-bishwoadhikari

@amd-bishwoadhikari amd-bishwoadhikari commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds 8 tuned a16w4 FMOE rows for MiniMax-M3 TP2 decode on gfx950 (MI355X, 256 CUs). The rows go into minimax_m3_a16w4_tuned_fmoe.csv. The new file minimax_m3_a16w4_untuned_fmoe.csv holds the 46 shapes of that table. The PR also keeps calls with bias, interleaved gate/up weights or a differing block_size_M off the a16w4 FlyDSL rows, in fused_moe.py.

Motivation

The shape is model_dim=6144, inter_dim=1536, expert=129, topk=5 with bf16 activations and fp4 weights (per_1x32). It has no row on main, so it runs main's default 2-stage kernels. Each added row selects FlyDSL stage-1 and stage-2 kernels and was at least 3% faster than main in each of 3 paired repeats.

Changes

  • Adds 8 rows for tokens 1, 2, 4, 8, 16, 64, 128, 256. The 38 rows of main in the file stay unchanged.
  • Adds minimax_m3_a16w4_untuned_fmoe.csv with the 46 shapes of the tuned table (38 from main, 8 new), in the row order of the tuned file. The other MiniMax-M3 FMOE tables each have such a shape list; this one had none.
  • Adds a check to get_2stage_cfgs in aiter/fused_moe.py. A call with per-expert bias or interleaved gate/up weights now ignores a tuned flydsl_moe1_abf16_ row, for every activation, and keeps the route it had without a row. The a16w4 stage 1 launches with w_layout="standard" and no bias argument for every activation, and the row key holds neither property.
  • Adds a second check to get_2stage_cfgs. A call whose block_size_M differs from the row's block_m now ignores a tuned flydsl_moe1_abf16_wfp4_ row and uses CK-Tile, for every activation. moe_sorting runs with the caller's block_size_M, and the row key does not hold it. The FlyDSL stage 1 takes its tile from the kernel name, and stage 2 raised a sorting-layout error.
  • get_2stage_cfgs gains a trailing keyword block_size_M=None. _fused_moe_impl and fused_moe_2stages pass their block_size_M to the lookup.
  • Both checks apply to all 42 a16w4 FlyDSL rows of minimax_m3_a16w4_tuned_fmoe.csv: the 8 new rows and 34 rows of main. Silu and SiTUv2 rows are unchanged. a16w16 rows keep their ValueError.
  • Adds 18 dispatch test cases to op_tests/test_moe_mxfp4_inter_dim_dispatch.py: 8 for the first check and 10 for the block_size_M check.
  • The first version of this PR changed 12 rows. 4 are not in this version. The details are under Rows not included.
  • Open PR [FlyDSL] A4W4 compact MoE: MXFP4 prefill MoE for gfx950 (MiniMax-M3 TP2 / TP4 / TP8) #6330 adds rows with the same keys: 8 keys (tokens 1, 2, 4, 8, 16, 64, 128, 256).
  • The second PR to merge must drop the shared keys. The config loader raises an error on duplicate keys, and the collision test runs only nightly.
Rows not included
Reason Rows
token 32: not at least 3% faster than main in every one of the 3 repeats of the final run 1
3 rows of minimax_m3_fp4_tuned_fmoe.csv were tuned before the FlyDSL MoE changes of #7769 and #7773. At tokens 32 and 64 they raise the stage-2 error ratio from 1.2% to 4.8–4.9% 3

Performance (if applicable)

Hardware is one MI355X (gfx950, 256 CUs) GPU, taken through gpuq on a shared node. Before is main's current lookup for the same key: the default 2-stage kernels. After is this branch's table.
Times are device time per call in µs from gemm_moe_tune.py --run_config -i <shapes>: the mean of 3 paired repeats, 5 warm-up and 101 timed runs each.
Tokens above 128 and below 256 are padded to 256 and use the token-256 row (get_padded_M). The exact token 256 uses fp4 activations, which is a different key, so it is not part of this PR.

Hardware Workload/configuration Before After Change
MI355X (gfx950, 256 CUs) token 1 38.16 µs 32.51 µs 15% faster
MI355X (gfx950, 256 CUs) token 2 47.69 µs 41.44 µs 13% faster
MI355X (gfx950, 256 CUs) token 4 67.44 µs 60.78 µs 10% faster
MI355X (gfx950, 256 CUs) token 8 112.7 µs 104.9 µs 7% faster
MI355X (gfx950, 256 CUs) token 16 168.4 µs 157.9 µs 6% faster
MI355X (gfx950, 256 CUs) token 64 300.9 µs 288.8 µs 4% faster
MI355X (gfx950, 256 CUs) token 128 333.2 µs 315.6 µs 5% faster
MI355X (gfx950, 256 CUs) tokens 129–255 (row 256), geometric mean of 5 points 347.1 µs 331.4 µs 5% faster

Geometric mean over these points: 8% faster.

Tokens between the rows

These tokens are padded up to the next row. The slower token of the neighbour sample, token 9: 1.04x, is listed under PR Self-Review.

Token Before (µs) After (µs) Change
3 59.01 56.72 4% faster
6 93.10 89.48 4% faster
12 146.8 139.1 5% faster
48 280.6 272.9 3% faster
96 323.4 301.2 7% faster

Testing

  • Unit tests added or updated
  • Performance benchmarks run
  • Tested on MI250X
  • Tested on MI300X

The row measurements ran on MI355X only. The dispatch tests run on CPU, without a GPU. The block_size_M check was also run on MI355X with a driver outside the repo.

Documentation

  • Docstrings updated
  • User guide updated
  • Performance guide updated
  • No documentation change is needed, with the reason stated below

The checks add no flag or public API. get_2stage_cfgs gains one trailing keyword. The checks only change which route a biased, interleaved or differing-block_size_M call takes.

Dependencies

  • No new third-party dependencies added
  • New dependencies are listed and justified below

Breaking Changes

None for calls without bias, with the separated gate layout and without a block_size_M that differs from the row's block_m. Only gfx950 lookups with 256 CUs change, for these keys and for the tokens that pad up to them.
A call with per-expert bias or interleaved gate/up weights that matches an a16w4 FlyDSL row now keeps the route it had without a row, regardless of activation. Before, it used the FlyDSL kernel, which ignores the bias and reads W1 in the standard layout.
A Swiglu call with an explicit block_size_M that differs from the row's block_m (16 for all 42 rows) now uses CK-Tile. Before, it raised a FlyDSL stage-2 sorting-layout error. An override that CK-Tile has no kernel for, such as 128, now fails in the CK-Tile launcher.

PR Self-Review

Reviewed revision

e298b5a3d14e296698ee27b17953891abc06db9b

Behavior and intent

For MiniMax-M3 a16w4 decode at tokens 1, 2, 4, 8, 16, 64, 128, 256, the lookup now returns a FlyDSL stage-1 and stage-2 pair. Before, it returned main's default 2-stage kernels. Each row was at least 3% faster than main in each of 3 paired repeats. No row of main changes. For a Swiglu call with bias or interleaved weights, the lookup now ignores a tuned a16w4 FlyDSL row. Without that, the new rows would take such calls from CK-Tile, which supports both. A call whose block_size_M differs from the row's block_m also ignores the row, regardless of activation: cross-activation fallback matches on these rows are legitimate (the stage-1 wrapper compiles the caller's activation), so the layout check must cover every caller. Without that, FlyDSL stage 1 ran on a layout sorted for another tile size, and stage 2 raised an error. Direct calls of fused_moe_2stages follow the same rule, because its own lookup now receives the size.

Validation and unverified scope

  • Ran gemm_moe_tune.py --run_config -i <shapes> on main and on this branch: 3 paired repeats on MI355X (gfx950, 256 CUs), with the order of the pair alternating. Every kept row used its own kernels (selection line checked) and finished with status OK.
  • 3 rows were near the 3% bar. Their worst repeat took 0.95 or more of main's time. A second lease ran them again for 2 fresh paired repeats. A row stayed only if both were also at least 3% faster: 3 of 3 did.
  • The tuner compares every output with a reference. At atol and rtol of 0.01 the check prints failed! in 36 of 36 samples of main's default kernels. It does so in 34 of 36 samples of the added rows. A sample is one of the 12 points in one of 3 repeats. Main's kernels mismatch 21.0–27.5% of the elements, the added rows 4.9–6.6%. The recorded stage-2 error ratio of the rows is 4.9–6.5%. The limit of gemm_moe_tune.py is 10%.
  • Ran these tests at this head. Earlier runs on main's configs, and on the four MiniMax-M3 config PRs merged together, gave the same counts:
    • test_config_shape_collision.py: 33 passed.
    • test_csv_validation.py: 19 passed.
    • test_a16w16_tuned_config_lookup.py: 14 passed, 9 failed; the same 9 gfx1250 cases fail with main's configs.
    • test_opus_a16w16_policy_parity.py: 19 passed.
    • test_arch_resolution.py: 25 passed.
  • On an earlier revision, ran the whole op_tests/tuning_tests directory with main's configs and with the four PRs merged. Both runs give 38 failed and 370 passed, with 54 skipped. The failing and erroring tests are the same in both.
  • Ran pytest op_tests/test_moe_mxfp4_inter_dim_dispatch.py on CPU: 48 passed. Main's file has 25 cases. The 5 bias and interleave discard cases fail on the code without that check.
  • Seven single-term mutations of the block_size_M check each fail at least one case. They remove the branch and use the wrong size source. They also widen the prefix, drop the override from the lookup, read None as an override, and drop the size from the fused_moe_2stages lookup. An earlier per-term run on the bias and interleave check did the same.
  • Probed get_2stage_cfgs on CPU, with and without the check. The probe covers the 155 gfx950 rows of the MiniMax-M3, Kimi-K3 and Kimi-K2 FMOE tables that use an a16w4 FlyDSL stage-1 kernel. Each row's own key was called plain, with bias1, with bias2 and interleaved. Plain calls pick the same kernel in both.
  • In that probe the 42 Swiglu rows of minimax_m3_a16w4_tuned_fmoe.csv move from FlyDSL to CK-Tile for the three other calls. The 113 Silu and SiTUv2 rows do not change.
  • Ran op_tests/test_moe_2stage.py::test_fmoe on MI355X for the key of the added rows: E=129, topk=5, model_dim 6144, inter_dim 1536, Swiglu, bf16 activations, fp4 weights. Each case compares fused_moe with the torch reference of the test on three trees: main, this branch, and this branch without the check in fused_moe.py. The trees were built at fb0b937e3, the previous merge of main. fused_moe.py, moe_kernels.py and test_moe_2stage.py are identical at ce334d015.
  • The CLI of the test sets AITER_BF16_FP8_MOE_BOUND=0 for this quantization type. A small driver therefore calls test_fmoe directly with the variable unset, and records the stage-1 route of each call.
  • With bias in both stages at token 16, the route without the check is FlyDSL, and 84% of the outputs fall outside the tolerance. Main and this branch use CK-Tile and 34% fall outside; logits_diff is 2.0e-5 against 7.8e-4. Token 128 shows the same split.
  • With interleaved gate/up weights and bias at token 16, the route without the check is FlyDSL and logits_diff is 0.98. With the check it is CK-Tile at 6.9e-6, the same as main.
  • The existing test_swiglu_mxfp4_nonsplit_nobias_dispatch in op_tests/test_moe_2stage.py calls this key with the interleaved layout at tokens 128 to 512 and expects CK-Tile. Without the check, the added token-128 row is selected and its assertion fails. With the check, and on main, its dispatch assertions pass. This ran on CPU with get_gfx set to gfx950, without the GPU half of the test.
  • Without bias, the added rows still select FlyDSL on both branches. 12% of the outputs fall outside the tolerance, against 33% on main.
  • Ran block_size_M through test_fmoe at token 8 for the key of the added rows. A small driver wraps the fused_moe call of the test to add the override. The trees are the parent head 88d33e783, without and with the check, on the same base build. All rows are single runs.
  • On the parent head, block_size_M=32 raised FlyDSL stage2 sorting layout mismatch: moe_sorting uses block_m=32, ... expects sort_block_m=16. With the check it runs on CK-Tile with logits_diff 2.1e-5, against 7.1e-6 for the FlyDSL row.
  • Override 16 and no override keep the FlyDSL row without a warning. Override 64 runs on CK-Tile. Override 128 fails in the CK-Tile launcher with Unsupported block_m value for moe_geem1 heuristic dispatch: 128.
  • The squashed head and this head reproduce these selections and logits_diff values in later runs (7.1e-6, 7.1e-6, 2.1e-5, 2.1e-5 and the launcher error).
  • fused_moe_2stages passes its block_size_M to its own lookup. fused_moe still replaces that result with the metadata it resolved, and passes the effective size.
  • Ran the direct entry point on MI355X for the same key at tokens 16 and 8. A driver sorts with moe_sorting at the size and passes it as block_size_M. On 716c9e96c, size 32 selected the FlyDSL row and raised FlyDSL stage2 sorting layout mismatch.
  • With this head, size 32 runs on CK-Tile with logits_diff 2.0e-5 and 2.1e-5. Size 16 keeps the FlyDSL row at 7e-6 on both heads.
  • test_moe_shared_expert_m3_tuned_rows is a direct call at size 16 with the shared expert. It passes before and after the change: 4 of 4.
  • On GPU, test_a16w16_rejects_mismatched_block_size_m passes with and without the check. test_moe_a16w16_default_dispatch.py has the same 23 failing tests on both, because CK stage-2 modules did not build in the container.
  • With bias in stage 2 only, the route without the check stays within the tolerance of the reference (13% outside, against 12% without bias). In this test that bias changes the reference by 0.14% of its norm, below the run-to-run noise of the FlyDSL output (0.25%). The test therefore cannot show the stage-2 bias being dropped. The a16w4 stage-2 call passes no bias (aiter/ops/flydsl/moe_kernels.py:2305-2332), and neither does the stage-1 call (:1745-1778), so the check covers both.
  • The block_size_M check does not cover the 4 ASM 1-stage rows of the same file (tokens 1, 2, 4 and 8 at inter_dim 768). It leaves the Kimi-K3 SiTUv2 a16w4 rows unchanged. The Kimi a16wi4 rows were not examined. A direct call with shared-expert arguments and a differing size was not run.
  • Unverified: end-to-end serving, model accuracy, MI300X, other images, and tokens of 256 and above. Swiglu with inter_dim not a multiple of 256 and gate_up_interleave=True still reaches FlyDSL through the heuristic path, as a CPU probe shows. No tuned row is involved.
  • The tuner times kernels with the torch profiler (get_trace_perf in aiter/test_common.py). It sums device kernel time and leaves out launch gaps. Rows that launch several kernels may gain less end to end.
  • The default path depends on the CK of the image (96afae1d). Main pins f93c029e.
  • The image was lmsysorg/sglang-rocm:v0.5.23-rocm10-mi35x-20261117 (digest sha256:09b8237296024285e6286ffb54d75c3af6d59342bbbb3558dea56bed86798814; torch 2.11.0+rocm10.0.0, hipBLASLt 1.4), FlyDSL 0.5.0. The row measurements used aiter code at 593945921 and the configs of main at c28a838be. The block_size_M runs used the code of the parent head 88d33e783, the squashed head 716c9e96c and this head on a prebuilt main. This branch is now one commit on main 8eed98cce. fused_moe.py, moe_kernels.py and test_moe_2stage.py are identical between 88d33e783 and 3038edafa, the head before the squash. No tuned row or lookup of this key changed on main.
  • CI has not run on this revision.
GPU check of the bias and interleave fallbacks

Route of stage 1, logits_diff and share of outputs outside rtol and atol of 0.01, against the torch reference of test_fmoe.

Case main this branch this branch without the check
token 16, no bias CK-Tile, 2.0e-5, 33% FlyDSL, 7.0e-6, 12% FlyDSL, 7.0e-6, 12%
token 16, bias in both stages CK-Tile, 2.0e-5, 34% CK-Tile, 2.0e-5, 34% FlyDSL, 7.8e-4, 84%
token 128, bias in both stages not run CK-Tile, 2.0e-5, 33% FlyDSL, 7.8e-4, 84%
token 16, interleaved gate/up weights, bias CK-Tile, 6.9e-6, 12% CK-Tile, 6.9e-6, 12% FlyDSL, 9.8e-1, 100%
token 16, bias in stage 2 only not run CK-Tile, 2.0e-5, 34% FlyDSL, 7.2e-6, 13%
GPU check of the block_size_M override

test_fmoe at token 8 for the key of the added rows, with block_size_M added to the fused_moe call. logits_diff is against the torch reference of the test. Time is device time per call. Rows are single runs.

Tree block_size_M Stage 1 Result
parent head none FlyDSL row 7.1e-6, 112.6 µs
parent head 32 FlyDSL row ValueError: FlyDSL stage2 sorting layout mismatch
with the check none FlyDSL row 7.1e-6, 113.5 µs
with the check 16 FlyDSL row 7.1e-6
with the check 32 CK-Tile, one warning 2.1e-5, 131.7 µs
with the check 64 CK-Tile, one warning 2.1e-5, 162.6 µs
with the check 128 CK-Tile, one warning RuntimeError: Unsupported block_m value for moe_geem1 heuristic dispatch: 128

The squashed head gave 7.1e-6 (110.9 µs), 7.1e-6 (111.8 µs), 2.1e-5 (126.7 µs), 2.1e-5 (159.1 µs) and the same launcher error.

Direct fused_moe_2stages at tokens 16 and 8: the driver sorts with moe_sorting at the size and passes it as block_size_M. logits_diff is against the torch reference of test_fmoe.

Tree Size Stage 1 Result at token 16 and token 8
716c9e96c 16 FlyDSL row 7.0e-6 and 7.1e-6
716c9e96c 32 FlyDSL row ValueError: FlyDSL stage2 sorting layout mismatch, both tokens
this head 16 FlyDSL row 6.9e-6 and 7.1e-6
this head 32 CK-Tile, one warning 2.0e-5 and 2.1e-5

PR-specific question

Which exact workload keys consume these configuration changes, and what evidence shows that unrelated shapes keep their previous selection?

The key is (gfx950, 256 CUs, token, 6144, 1536, 129, 5, Swiglu, bf16, bf16, fp4x2, per_1x32, g1u1=1, doweight_stage1=0). token is the runtime token count rounded up to a power of two. With the default separated gate mode, fused_moe uses bf16 activations for Swiglu below GPTOSS_SWIGLU_MXFP4_BF16_BOUND (default 256). A row serves every token that rounds up to its token count, so runtime tokens below 256 reach this table. We sampled 20 runtime token counts. 5 of them now run the default, because their row was removed. Of the other 15, 8 were more than 3% faster than main and 6 were within 3%. 1 was more than 3% slower (worst 1.04x main's time). The slower one is token 9: 1.04x. The key holds the model dimensions, the expert count and both dtypes. Other models and the other minimax_m3_*_fmoe tables cannot match these rows. The checks in fused_moe.py act only on Swiglu calls with bias, interleaved weights or a block_size_M that differs from the row's block_m. For the 155 gfx950 rows that use an a16w4 FlyDSL stage-1 kernel, plain calls pick the same kernel with and without the bias check. A call without an override keeps its row under the block_size_M check, as the dispatch tests show.

Changed op tests

op_tests/test_moe_mxfp4_inter_dim_dispatch.py gains 18 dispatch test cases, 8 for the first check and 10 for the block_size_M check. Its existing tests cover the heuristic route, where no tuned row exists. None of them injects a tuned a16w4 FlyDSL row, so none sees a tuned row reach a call with bias or interleaved weights.
The tests inject one such row. They expect the row to stay for plain calls and to be dropped for bias1, bias2 and the interleaved layout. They also expect a SiTUv2 row and an a4w4 row to stay. The 5 drop cases fail without the check.
The block_size_M cases keep the row for no override and for an override equal to the row's block_m. They drop it for an override of 32, with one warning that names the override. They drop it once when bias and an override meet. A SiTUv2 row and an a4w4 row stay for a differing override. A spy test checks that _fused_moe_impl hands the override to the lookup. A direct-entry test calls fused_moe_2stages at sizes 32 and 16 and checks the stages its lookup selects.

🤖 Generated with Claude Code

Review updates at this revision

  • The bias/interleave check is no longer gated on Swiglu either (aiter/ops/flydsl/moe_kernels.py launches the a16w4 stage 1 with w_layout="standard" and no bias argument for every activation). test_fallback_cross_activation_match_validates_layout replays the SiLU case through the loaded fallback map at the token-1 key: a plain call keeps the row, an interleaved call discards it. The discard test gains SiTUv2-bias and SiLU-interleave cases pinned to the default route each call had without a row. The dispatch snapshot stays identical to golden on all four arches at this revision.

  • The block_size_M discard check applies to every activation; the earlier Swiglu-only gate is removed. A fallback purge of flydsl_moe1_ rows was tried and reverted: tests/moe_dispatch/snapshot.py --check showed it moved 64 tuned gfx950 keys to default heuristics, since tuned rows carry tile parameters only and the stage-1 wrapper compiles the caller's activation. At this revision the snapshot is identical to golden on all four arches (gfx942, gfx942_cu80, gfx950, gfx1201).

  • test_fallback_cross_activation_match_validates_block_size replays the reported scenario through the merged-config fallback map: a SiTUv2 call at the tuned Swiglu key (token 16, H 6144, I 1536, E 129, topk 5) keeps the row at block_size_M=16 and discards it at 32. The table loads through a test-local AITER_CONFIGS stub because get_config_file is LRU-cached with the env var read inside the body, which made an env override order-dependent.

  • MoeProblem.from_legacy_key and legacy_key mirror the block_size_M parameter through extras, keeping the MoE v2 signature-parity assertion and the legacy-key round trip intact; test_problem_round_trips_through_the_legacy_key gains a block_size_M case. tests/test_moev2_dispatch.py: 49 passed on CPU at this revision, and both CPU files together: 94 passed.

@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the gfx1201 ROCm runner
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 6529 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.

@amd-bishwoadhikari amd-bishwoadhikari changed the title [Config] [MoE] [gfx950] Add MiniMax-M3 TP=2 decode FMOE shapes [Config] [MoE] Add MiniMax-M3 TP2 a16w4 decode rows for gfx950 Nov 18, 2026
@amd-bishwoadhikari
amd-bishwoadhikari marked this pull request as ready for review November 18, 2026 22:04
@amd-bishwoadhikari
amd-bishwoadhikari requested review from a team and a balanced review from Copilot November 18, 2026 22:04
@aiter-bot

aiter-bot commented Nov 18, 2026 •

Copy link
Copy Markdown

WAITING ON AUTHOR

PR Self-Review

Revision 7cb03f9286f0 · mode shadow

Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision.

Questions to answer in the PR description

  1. What behavior does this PR change, and why is the existing behavior insufficient?
  2. What did you validate, and what remains unverified? Include commands, hardware/configuration and results.
  3. Which exact workload keys consume these configuration changes, and what evidence shows that unrelated shapes keep their previous selection?
  4. For every changed op_tests/ file, what behavior does it cover and why is it not redundant? Write None if no op test changed.

Edit the PR Self-Review section in the PR description. Include the current revision SHA; this comment refreshes automatically.

Missing or invalid answers

  • FAIL — Reviewed revision must contain at least the first 7 characters of the current head SHA

Shadow mode reports what would block but keeps the status successful. Set AITER_PR_SELF_REVIEW_MODE=enforce only after reviewing real false positives.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new tuning rows can select incompatible FlyDSL kernels that misinterpret interleaved weights or silently drop supplied biases, producing incorrect results instead of preserving the CK fallback.

2 open issues
What changed in this PR

Adds model-specific tuning data for MiniMax-M3 TP2 A16W4 decode on gfx950 GPUs with 256 compute units, selecting existing FlyDSL kernels through AITER’s configuration lookup.

Changes:

  • Adds eight tuned stage-1/stage-2 kernel pairs for token buckets 1, 2, 4, 8, 16, 64, 128, and 256.
  • Preserves the 38 existing tuned rows.
  • Adds a matching 46-shape input list for tuning.
File Description
aiter/​configs/​model_configs/​minimax_m3_a16w4_untuned_fmoe.csv Adds the shape list matching the tuned table’s row order.
aiter/​configs/​model_configs/​minimax_m3_a16w4_tuned_fmoe.csv Adds eight gfx950 TP2 decode configurations using FlyDSL kernel pairs.

Review effort: Balanced

@zufayu
zufayu requested a review from yzhou103 November 19, 2026 01:14
Copilot AI balanced review requested due to automatic review settings November 19, 2026 01:27
@github-actions github-actions Bot changed the title [Config] [MoE] Add MiniMax-M3 TP2 a16w4 decode rows for gfx950 [MoE] Add MiniMax-M3 TP2 a16w4 decode rows for gfx950 Nov 19, 2026
@github-actions github-actions Bot removed the Config label Nov 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The new gfx950 kernel selections lack GPU correctness and latency evidence matching the repository’s pinned CK revision, while biased/interleaved fallbacks have only dispatch-level coverage.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 19, 2026 01:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The gfx950 dispatch changes need human accuracy and latency validation because reported measurements use a different CK revision and exact-head GPU coverage, including biased/interleaved fallbacks, is unavailable.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 19, 2026 07:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The new gfx950 kernels and bias/interleave fallbacks lack head-matched GPU validation against the pinned CK revision, and acceptance of the reported numerical mismatches requires maintainer review.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 19, 2026 10:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human review is needed because the gfx950 kernel selections lack head-matched GPU validation, reported benchmarks use a different CK revision, and biased/interleaved fallbacks remain untested on GPU.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 19, 2026 12:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The eight new a16w4 tuning rows lack a compatibility guard, allowing a block_size_M=32 override to mismatch 16-row stage-1 tiles and trigger a stage-2 sorting-layout failure.

1 open issue

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 19, 2026 19:24
Copilot AI balanced review requested due to automatic review settings November 30, 2026 08:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed because the new configuration can select bf16 kernels for a SiLU fallback while passing packed FP4 operands, with stage 1 ignoring quantization scales.

No open issues 🎉

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter standard tests on MI35X
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:mi300x Run Aiter standard tests on MI300X in PRs; main branch always runs them
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the Radeon R9700 ROCm runner
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 6529 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.

Reviews:
A reviewer is usually assigned within one working day after the PR is ready for review (see Code Review Process). If nobody has responded for about a week, mention the area contact listed in CONTACTS.md. Want to help review? See REVIEWERS.md.

Copilot AI balanced review requested due to automatic review settings November 30, 2026 11:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The gfx950 dispatch changes lack head-matched GPU validation on repository-pinned dependencies, while reported runs used different FlyDSL/CK revisions, showed strict-reference mismatches, and left performance and end-to-end model accuracy unconfirmed.

No open issues 🎉

Review effort: Balanced

@yzhou103

Copy link
Copy Markdown
Contributor

@valar-cop review

@valar-cop

Copy link
Copy Markdown

@yzhou103 re-checked 9f361bc: earlier points are addressed and nothing new came up.. LGTM from my side.

…prep

A SiLU call with bf16 activations can match a Swiglu-keyed
flydsl_moe1_abf16_wfp4_ row through the activation-disabled fallback, but
the a16w4 operand preparation keeps A in bf16 only for SiTUv2 and the
Swiglu shapes re-routed off CK-Tile (_is_a16w4_situv2 /
_is_a16w4_swiglu_rerouted). Such a call takes the generic per_1x32 prep,
which quantizes A to packed fp4x2 + e8m0 scales and hands them to the
bf16 stage-1 wrapper -- a launch-boundary dtype/shape mismatch
([T, model_dim/2] fp4x2 against the expected [T, model_dim] bf16).

get_2stage_cfgs gains a third a16w4 guard, next to the bias/interleave
and block_size_M guards: a flydsl_moe1_abf16_wfp4_ row is discarded for
any activation other than Swiglu and SiTUv2, and the call keeps the route
it had without a row.

Tests: the cross-activation layout cases now use SiTUv2 (prep-supported);
the former plain-kept SiLU case asserted the broken selection and is
replaced by silu-plain-discarded, which asserts the discard and the new
warning. Full dispatch suite (inter_dim dispatch, moev2 dispatch, MoE
snapshot) passes at this tree on gfx950: 101 passed.

Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: Bishwo Adhikari <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 30, 2026 16:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The production gfx950 MoE dispatch changes need GPU-capable maintainer review because no exact-head accuracy and latency validation report was supplied, and this environment cannot independently run those checks.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 30, 2026 16:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The gfx950 kernel defaults need human GPU correctness and performance validation on the current head’s pinned CK/FlyDSL stack, because reported measurements used different dependencies and showed numerical mismatches.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 30, 2026 20:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The gfx950/MI355X kernel schedules and shared dispatch changes need human confirmation because exact-head GPU correctness, numerical-tolerance, and paired performance validation on the repository-pinned CK/FlyDSL stack is missing.

No open issues 🎉

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The gfx950 changes lack independent, exact-head GPU correctness and performance validation in the repository-pinned environment, and reported numerical mismatches require maintainer acceptance.

No open issues 🎉

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants