Skip to content

[Config] feat(minimax-m3): add TP8 tuned AITER configs - #4835

Merged
valarLip merged 2 commits into
ROCm:mainfrom
zcnrex:m3-aiter
Aug 23, 2026
Merged

valarLip merged 2 commits into
ROCm:mainfrom
zcnrex:m3-aiter

Conversation

@zcnrex

@zcnrex zcnrex commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add MiniMax-M3 TP8 dense A8W8 bpreshuffle kernel selections
  • add the verified MXFP8 6144x384 MoE selection table, including atomic stage-2 rows

Why

The model-specific configuration lacked the TP8 tuned shape coverage needed by MiniMax-M3 decode.

Validation

  • checked CSV schema consistency
  • verified 11 atomic 6144x384 MoE rows and 20 documented dense rows

@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; main branch always runs both MI35X and MI300X
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: GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5
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 4835 --add-label <label>

PR title tags:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf] and op tags like [MLA] are left untouched. Add the no-auto-title label to opt this PR out of title tagging.

@zcnrex
zcnrex marked this pull request as ready for review August 18, 2026 20:16
@zcnrex
zcnrex requested review from a team and a lite review from Copilot August 18, 2026 20:16
@github-actions github-actions Bot changed the title feat(minimax-m3): add TP8 tuned AITER configs [Config] feat(minimax-m3): add TP8 tuned AITER configs Aug 18, 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.

Pull request overview

This PR extends MiniMax-M3’s model-specific tuned configuration coverage to better support TP8 decode by adding additional tuned kernel selections for both MXFP8 MoE (FMoE) and A8W8 bpreshuffle GEMM shapes.

Changes:

  • Updated minimax_m3_mxfp8_tuned_fmoe.csv by replacing/adding tuned MXFP8 6144×384 MoE rows (including atomic stage-2 kernel selections).
  • Appended additional tuned A8W8 bpreshuffle GEMM rows for MiniMax-M3 to cover more (M, N, K) shapes relevant to decode.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
aiter/configs/model_configs/minimax_m3_mxfp8_tuned_fmoe.csv Updates tuned MXFP8 MoE selection rows for (model_dim=6144, inter_dim=384), adjusting stage-1/2 kernel choices and timings.
aiter/configs/model_configs/a8w8_bpreshuffle_tuned_gemm_minimax_m3.csv Adds tuned A8W8 bpreshuffle GEMM entries for additional decode-relevant shapes (e.g., N=1536 and K=768/128/384 cases).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@zufayu
zufayu requested a review from yifehuan August 19, 2026 01:24
Copilot AI review requested due to automatic review settings August 23, 2026 07:29

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@valarLip
valarLip merged commit acf7220 into ROCm:main Aug 23, 2026
77 checks passed
amd-bishwoadhikari added a commit to amd-bishwoadhikari/aiter that referenced this pull request Sep 17, 2026
Adds a gfx950 a16w16 (BF16) tuned GEMM table for MiniMax-M3. No such table
exists in-tree today: ROCm#4835 covers A8W8-bpreshuffle and MXFP8 fMoE only, and
minimax_m3_eagle_bf16_tuned_gemm.csv is the EAGLE draft model with zero (N,K)
overlap. These shapes currently fall back to the runtime heuristic on MI355X.

Shapes were harvested from vLLM serving logs for the TP8 decode path plus the
TP2 qkv_proj sparse family, then tuned with the a16w16 tuner at
--update_improved --min_improvement_pct 0.5, so a shape appears only where
tuning beat the incumbent dispatch.

hipBLASLt was excluded from the candidate set deliberately. A hipBLASLt winner
is pinned to a solidx, which is a property of the build rather than the model,
and hipb_gemm passes it to hipb_mm without validation -- unlike flydsl, which
gets a catalog-name check with graceful fallback. Re-tuning the same shapes on
an identical image yielded a different solidx for 8 of 8 with us within ~2%, so
the index is arbitrary among near-ties. This matches in-tree practice: no BF16
table currently ships a hipblaslt row.

Two shapes, (48, 3072, 6144) and (48, 6144, 1536) on gfx950, already exist in
glm5_bf16_tuned_gemm.csv and are dropped from this table rather than contested.
Duplicate keys are fatal rather than cosmetic -- update_config_files()
auto-resolves to the lowest us, rewrites the source CSVs on disk, and raises
RuntimeError -- so the two tables cannot both carry a shape. This change adds
files only and modifies no existing config. Verified zero duplicate keys across
the full merge set (default table plus every model_configs BF16 table):
19 files, 3768 rows, 3768 distinct.

Signed-off-by: Bishwo Adhikari <[email protected]>
amd-bishwoadhikari added a commit to amd-bishwoadhikari/aiter that referenced this pull request Sep 17, 2026
Adds a gfx950 a16w16 (BF16) tuned GEMM table for MiniMax-M3-MXFP4. No such
table exists in-tree today: ROCm#4835 covers A8W8-bpreshuffle and MXFP8 fMoE only,
and minimax_m3_eagle_bf16_tuned_gemm.csv is the EAGLE draft model with zero
(N,K) overlap. These shapes currently fall back to the runtime heuristic on
MI355X.

Named minimax_m3_mxfp4_bf16_{tuned,untuned}_gemm.csv after the pattern of
minimax_m3_eagle_bf16_tuned_gemm.csv, with the variant token between model and
dtype, so the file names the checkpoint the shapes came from rather than
claiming the generic M3 BF16 slot. get_config_file() globs
*bf16_tuned_gemm*.csv, so the longer prefix is still merged.

Shapes were harvested from vLLM serving logs for the TP8 decode path plus the
TP2 qkv_proj sparse family, then tuned with the a16w16 tuner at
--update_improved --min_improvement_pct 0.5, so a shape appears only where
tuning beat the incumbent dispatch.

hipBLASLt was excluded from the candidate set deliberately. A hipBLASLt winner
is pinned to a solidx, which is a property of the build rather than the model,
and hipb_gemm passes it to hipb_mm without validation -- unlike flydsl, which
gets a catalog-name check with graceful fallback. Re-tuning the same shapes on
an identical image yielded a different solidx for 8 of 8 with us within ~2%, so
the index is arbitrary among near-ties. This matches in-tree practice: no BF16
table currently ships a hipblaslt row.

Two shapes, (48, 3072, 6144) and (48, 6144, 1536) on gfx950, already exist in
glm5_bf16_tuned_gemm.csv and are dropped from this table rather than contested.
Duplicate keys are fatal rather than cosmetic -- update_config_files()
auto-resolves to the lowest us, rewrites the source CSVs on disk, and raises
RuntimeError -- so the two tables cannot both carry a shape. This change adds
files only and modifies no existing config. Verified zero duplicate keys across
the full merge set (default table plus every model_configs BF16 table):
19 files, 3768 rows, 3768 distinct.

Signed-off-by: Bishwo Adhikari <[email protected]>
amd-bishwoadhikari added a commit to amd-bishwoadhikari/aiter that referenced this pull request Sep 19, 2026
Adds a gfx950 a16w16 (BF16) tuned GEMM table for MiniMax-M3-MXFP4. No such
table exists in-tree today: ROCm#4835 covers A8W8-bpreshuffle and MXFP8 fMoE only,
and minimax_m3_eagle_bf16_tuned_gemm.csv is the EAGLE draft model with zero
(N,K) overlap. These shapes currently fall back to the runtime heuristic on
MI355X.

Named minimax_m3_mxfp4_bf16_{tuned,untuned}_gemm.csv after the pattern of
minimax_m3_eagle_bf16_tuned_gemm.csv, with the variant token between model and
dtype, so the file names the checkpoint the shapes came from rather than
claiming the generic M3 BF16 slot. get_config_file() globs
*bf16_tuned_gemm*.csv, so the longer prefix is still merged.

96 rows: 82 flydsl, 13 asm, 1 triton. Shapes were harvested from vLLM serving
logs for the TP8 decode path plus the TP2 qkv_proj sparse family, then tuned
with the a16w16 tuner at --update_improved --min_improvement_pct 0.5, so a
shape appears only where tuning beat the incumbent dispatch. Every M is an
exact getPaddedM gl=0 bucket, so no row is unreachable at dispatch.

All rows were re-tuned after ROCm#5145. That change regenerated the flydsl kernel
namespace from flydsl_gemmN_* to flydsl_hgemm_*, and main's catalog rejects
the old names -- a row carrying one is accepted by the CSV reader, falls
through to the untuned path, and still returns correct results, so nothing in
the test suite reports it. Each of the 82 flydsl kernelNames here was checked
to parse under main's catalog, and each row was confirmed to resolve through
get_GEMM_A16W16_config to the kernel it names.

hipBLASLt was excluded from the candidate set deliberately. A hipBLASLt winner
is pinned to a solidx, which is a property of the build rather than the model,
and hipb_gemm passes it to hipb_mm without validation -- unlike flydsl, which
gets a catalog-name check with graceful fallback. Re-tuning the same shapes on
an identical image yielded a different solidx for 8 of 8 with us within ~2%, so
the index is arbitrary among near-ties. This matches in-tree practice: no BF16
table currently ships a hipblaslt row. 31 shapes whose only winner was
hipBLASLt were re-tuned with it excluded rather than dropped.

Two shapes, (48, 3072, 6144) and (48, 6144, 1536) on gfx950, already exist in
glm5_bf16_tuned_gemm.csv and are dropped from this table rather than contested.
Duplicate keys are fatal rather than cosmetic -- update_config_files()
auto-resolves to the lowest us, rewrites the source CSVs on disk, and raises
RuntimeError -- so the two tables cannot both carry a shape. This change adds
files only and modifies no existing config. Verified zero duplicate keys across
the full merge set (default table plus every model_configs BF16 table):
20 files, 5257 rows, 5257 distinct.

Not ready to merge. The table sums to a 17.4% aggregate improvement across the
96 shapes in microbenchmark, but end-to-end TP8 serving throughput regresses
~3.8% against a ~1.8% noise floor, measured in both arm orders. The mechanism
is not yet established and the rows should not land until it is.

Signed-off-by: Bishwo Adhikari <[email protected]>
amd-bishwoadhikari added a commit to amd-bishwoadhikari/aiter that referenced this pull request Sep 19, 2026
Adds minimax_m3_mxfp4_bf16_{tuned,untuned}_gemm.csv under model_configs --
96 rows for gfx950 / cu_num=256, 82 flydsl, 13 asm, 1 triton. Two new files;
no existing file is modified.

No in-tree table covers these shapes: ROCm#4835 is A8W8-bpreshuffle and MXFP8 fMoE
only, and minimax_m3_eagle_bf16_tuned_gemm.csv is the EAGLE draft model with
zero (N,K) overlap.

Shapes came from vLLM serving logs (TP8 decode linears, lm_head, TP2 qkv_proj)
and were tuned at --update_improved --min_improvement_pct 0.5, so a row exists
only where tuning beat the incumbent dispatch. Tuned post-ROCm#5145: every flydsl
kernelName is flydsl_hgemm_* and parses under main's catalog, since a
pre-ROCm#5145 name ships and silently never dispatches. hipblaslt and opus are
excluded -- a hipblaslt solidx is build-specific and passed to hipb_mm
unvalidated, and no in-tree BF16 table ships one.

(48,3072,6144) and (48,6144,1536) belong to glm5_bf16_tuned_gemm.csv and are
dropped here rather than contested; duplicate keys raise RuntimeError in
update_config_files(). Merge set verified clean: 20 files, 5257 rows, 5257
distinct keys.

Aggregate 1929.41us -> 1593.12us (17.4%) in microbenchmark. Not ready to merge:
end-to-end TP8 serving throughput regresses ~3.8% against a ~1.8% noise floor,
measured in both arm orders, and the mechanism is not yet established.

Signed-off-by: Bishwo Adhikari <[email protected]>
amd-bishwoadhikari added a commit to amd-bishwoadhikari/aiter that referenced this pull request Sep 22, 2026
Adds minimax_m3_mxfp4_bf16_{tuned,untuned}_gemm.csv under model_configs --
96 rows for gfx950 / cu_num=256, 82 flydsl, 13 asm, 1 triton. Two new files;
no existing file is modified.

No in-tree table covers these shapes: ROCm#4835 is A8W8-bpreshuffle and MXFP8 fMoE
only, and minimax_m3_eagle_bf16_tuned_gemm.csv is the EAGLE draft model with
zero (N,K) overlap.

Shapes came from vLLM serving logs (TP8 decode linears, lm_head, TP2 qkv_proj)
and were tuned at --update_improved --min_improvement_pct 0.5, so a row exists
only where tuning beat the incumbent dispatch. Tuned post-ROCm#5145: every flydsl
kernelName is flydsl_hgemm_* and parses under main's catalog, since a
pre-ROCm#5145 name ships and silently never dispatches. hipblaslt and opus are
excluded -- a hipblaslt solidx is build-specific and passed to hipb_mm
unvalidated, and no in-tree BF16 table ships one.

(48,3072,6144) and (48,6144,1536) belong to glm5_bf16_tuned_gemm.csv and are
dropped here rather than contested; duplicate keys raise RuntimeError in
update_config_files(). Merge set verified clean: 20 files, 5257 rows, 5257
distinct keys.

Aggregate 1929.41us -> 1593.12us (17.4%) in microbenchmark. Not ready to merge:
end-to-end TP8 serving throughput regresses ~3.8% against a ~1.8% noise floor,
measured in both arm orders, and the mechanism is not yet established.

Signed-off-by: Bishwo Adhikari <[email protected]>
yzhou103 pushed a commit that referenced this pull request Sep 25, 2026
…#5758)

* [Perf] [Config] [gfx950] Add MiniMax-M3-MXFP4 BF16 tuned GEMM configs

Adds minimax_m3_mxfp4_bf16_{tuned,untuned}_gemm.csv under model_configs --
96 rows for gfx950 / cu_num=256, 82 flydsl, 13 asm, 1 triton. Two new files;
no existing file is modified.

No in-tree table covers these shapes: #4835 is A8W8-bpreshuffle and MXFP8 fMoE
only, and minimax_m3_eagle_bf16_tuned_gemm.csv is the EAGLE draft model with
zero (N,K) overlap.

Shapes came from vLLM serving logs (TP8 decode linears, lm_head, TP2 qkv_proj)
and were tuned at --update_improved --min_improvement_pct 0.5, so a row exists
only where tuning beat the incumbent dispatch. Tuned post-#5145: every flydsl
kernelName is flydsl_hgemm_* and parses under main's catalog, since a
pre-#5145 name ships and silently never dispatches. hipblaslt and opus are
excluded -- a hipblaslt solidx is build-specific and passed to hipb_mm
unvalidated, and no in-tree BF16 table ships one.

(48,3072,6144) and (48,6144,1536) belong to glm5_bf16_tuned_gemm.csv and are
dropped here rather than contested; duplicate keys raise RuntimeError in
update_config_files(). Merge set verified clean: 20 files, 5257 rows, 5257
distinct keys.

Aggregate 1929.41us -> 1593.12us (17.4%) in microbenchmark. Not ready to merge:
end-to-end TP8 serving throughput regresses ~3.8% against a ~1.8% noise floor,
measured in both arm orders, and the mechanism is not yet established.

Signed-off-by: Bishwo Adhikari <[email protected]>

* [Perf] [Config] [gfx950] Update MiniMax-M3-MXFP4 BF16 configs with FlyDSL winners

Update minimax_m3_mxfp4_bf16_{tuned,untuned}_gemm.csv with portable FlyDSL
GEMM configurations discovered during tuning on gfx950 (MI355X):
- Expands table coverage from 96 to 112 rows (+16 new shapes across gate_up_proj,
  qkv_dense, o_proj, and ViT mlp).
- Updates 3 existing shapes in-place (qkv_sparse at M=16, 32, 48) with faster
  FlyDSL configs.
- All kernels conform to post-#5145 catalog naming (flydsl_hgemm_*).
- Clean merge verified: 0 duplicate keys across in-tree model configs.

Co-Authored-By: Claude Code <[email protected]>
Signed-off-by: Bishwo Adhikari <[email protected]>

---------

Signed-off-by: Bishwo Adhikari <[email protected]>
Co-authored-by: Claude Code <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants