Skip to content

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

Merged
yzhou103 merged 7 commits into
ROCm:mainfrom
amd-bishwoadhikari:config/minimax-m3-bf16-gemm-gfx950
Sep 25, 2026
Merged

yzhou103 merged 7 commits into
ROCm:mainfrom
amd-bishwoadhikari:config/minimax-m3-bf16-gemm-gfx950

Conversation

@amd-bishwoadhikari

@amd-bishwoadhikari amd-bishwoadhikari commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

What changes

Adds aiter/configs/model_configs/minimax_m3_mxfp4_bf16_{tuned,untuned}_gemm.csv
— 112 tuned rows on gfx950 / cu_num=256, plus the untuned companion. Backends:
flydsl 98, asm 13, triton 1. Two new files; no existing file is modified.

Why is this needed

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, so on MI355X these shapes fall through to the runtime
heuristic today.

Performance measurement

MI355X, gfx950, cu_num=256. Baseline is stock AITER: no tuned row for the shape,
torch fallback. Aggregate over the 111 rows with a recorded baseline:
2522.24 µs → 2103.16 µs, 16.6 %. (96, 3072, 6144) has no recorded baseline
and is in neither the table nor the sum.

N, K bias Rows M Range Baseline µs This PR µs Gain
1280, 6144 False 17 16–512 284.93 221.97 22.1 %
1536, 6144 False 17 16–512 296.10 238.45 19.5 %
3072, 6144 False 16 (1 unrecorded) 16–512 387.12 308.03 20.4 %
4608, 6144 False 6 16–128 132.51 105.43 20.4 %
4992, 6144 False 9 16–256 232.80 194.31 16.5 %
6144, 1024 False 17 16–512 175.11 141.39 19.3 %
6144, 1536 False 16 16–512 208.54 172.94 17.1 %
6144, 4096 False 5 80–224 122.75 107.90 12.1 %
12288, 6144 False 4 16–64 136.01 120.63 11.3 %
25008, 6144 False 4 32–256 344.52 315.90 8.3 %
6144, 1280 True 1 11988 201.85 176.22 12.7 %
Total 112 2522.24 2103.16 16.6 %
Per-shape table (111 rows with recorded baselines)
M N, K Baseline µs This PR µs Improvement Backend
16 1280, 6144 11.28 7.23 35.9% flydsl
32 1280, 6144 11.15 7.50 32.7% flydsl
48 1280, 6144 11.67 8.67 25.7% flydsl
64 1280, 6144 14.85 9.37 36.9% flydsl
80 1280, 6144 14.87 10.55 29.1% flydsl
96 1280, 6144 14.90 11.12 25.4% flydsl
112 1280, 6144 17.14 11.37 33.7% flydsl
128 1280, 6144 16.35 12.21 25.3% flydsl
144 1280, 6144 16.16 13.92 13.8% asm
160 1280, 6144 16.53 14.03 15.1% asm
176 1280, 6144 16.05 14.35 10.6% asm
192 1280, 6144 16.64 14.72 11.5% asm
208 1280, 6144 25.05 15.48 38.2% asm
224 1280, 6144 20.04 15.72 21.6% asm
240 1280, 6144 20.20 16.03 20.6% asm
256 1280, 6144 18.58 16.57 10.8% asm
512 1280, 6144 23.47 23.12 1.5% flydsl
16 1536, 6144 11.46 7.73 32.5% flydsl
32 1536, 6144 11.72 8.46 27.8% flydsl
48 1536, 6144 15.06 9.40 37.6% flydsl
64 1536, 6144 14.56 9.99 31.4% flydsl
80 1536, 6144 14.60 11.36 22.2% flydsl
96 1536, 6144 16.35 11.67 28.6% flydsl
112 1536, 6144 16.18 12.55 22.4% flydsl
128 1536, 6144 16.77 13.17 21.5% flydsl
144 1536, 6144 16.26 13.76 15.3% asm
160 1536, 6144 16.98 15.14 10.9% asm
176 1536, 6144 19.70 15.38 22.0% asm
192 1536, 6144 20.28 15.65 22.8% flydsl
208 1536, 6144 19.16 16.46 14.1% flydsl
224 1536, 6144 19.92 16.82 15.6% flydsl
240 1536, 6144 20.36 17.44 14.3% flydsl
256 1536, 6144 20.14 18.03 10.5% flydsl
512 1536, 6144 26.60 25.43 4.4% flydsl
16 3072, 6144 12.64 10.26 18.9% flydsl
32 3072, 6144 16.09 11.58 28.0% flydsl
64 3072, 6144 20.54 14.19 30.9% flydsl
80 3072, 6144 21.33 15.83 25.8% asm
112 3072, 6144 24.26 17.53 27.7% flydsl
128 3072, 6144 23.31 18.25 21.7% flydsl
144 3072, 6144 24.30 19.88 18.2% flydsl
160 3072, 6144 26.68 21.06 21.1% flydsl
176 3072, 6144 30.77 21.80 29.2% flydsl
192 3072, 6144 29.61 22.58 23.8% flydsl
208 3072, 6144 29.19 23.69 18.8% flydsl
224 3072, 6144 28.99 24.36 16.0% flydsl
240 3072, 6144 29.27 25.16 14.1% flydsl
256 3072, 6144 27.69 25.96 6.3% flydsl
512 3072, 6144 42.45 35.91 15.4% flydsl
16 4608, 6144 16.94 13.31 21.4% flydsl
32 4608, 6144 18.66 14.79 20.7% flydsl
48 4608, 6144 22.48 16.63 26.0% flydsl
64 4608, 6144 20.52 17.64 14.0% flydsl
80 4608, 6144 27.24 20.04 26.4% flydsl
128 4608, 6144 26.67 23.01 13.7% flydsl
16 4992, 6144 17.51 14.12 19.4% flydsl
32 4992, 6144 18.68 15.49 17.1% flydsl
48 4992, 6144 22.75 17.32 23.9% flydsl
64 4992, 6144 21.11 18.64 11.7% flydsl
80 4992, 6144 27.31 20.62 24.5% flydsl
96 4992, 6144 30.27 22.25 26.5% flydsl
112 4992, 6144 27.22 23.79 12.6% flydsl
128 4992, 6144 26.90 25.35 5.8% flydsl
256 4992, 6144 41.05 36.73 10.5% flydsl
16 6144, 1024 7.09 5.57 21.5% triton
32 6144, 1024 7.75 6.00 22.5% flydsl
48 6144, 1024 8.79 6.61 24.8% flydsl
64 6144, 1024 8.56 7.10 17.0% flydsl
80 6144, 1024 9.98 7.26 27.2% flydsl
96 6144, 1024 9.98 7.72 22.6% flydsl
112 6144, 1024 9.88 7.41 25.0% flydsl
128 6144, 1024 9.75 8.17 16.2% flydsl
144 6144, 1024 11.19 8.90 20.4% flydsl
160 6144, 1024 10.20 8.55 16.1% flydsl
176 6144, 1024 11.58 8.59 25.8% flydsl
192 6144, 1024 11.60 8.72 24.9% flydsl
208 6144, 1024 11.20 9.01 19.5% flydsl
224 6144, 1024 11.01 9.02 18.1% flydsl
240 6144, 1024 11.16 9.34 16.3% flydsl
256 6144, 1024 10.69 9.69 9.4% flydsl
512 6144, 1024 14.70 13.72 6.7% flydsl
16 6144, 1536 8.15 6.07 25.5% flydsl
32 6144, 1536 8.81 6.87 22.0% flydsl
64 6144, 1536 11.14 8.47 24.0% flydsl
80 6144, 1536 12.39 9.21 25.6% flydsl
96 6144, 1536 12.59 9.35 25.7% flydsl
112 6144, 1536 11.98 10.40 13.2% flydsl
128 6144, 1536 12.03 10.26 14.7% flydsl
144 6144, 1536 13.72 11.23 18.2% flydsl
160 6144, 1536 13.28 11.39 14.2% flydsl
176 6144, 1536 15.68 11.81 24.7% flydsl
192 6144, 1536 15.53 11.87 23.6% flydsl
208 6144, 1536 13.51 11.46 15.2% flydsl
224 6144, 1536 13.72 11.90 13.3% flydsl
240 6144, 1536 13.98 12.35 11.7% flydsl
256 6144, 1536 13.59 12.42 8.6% flydsl
512 6144, 1536 18.44 17.87 3.1% flydsl
80 6144, 4096 23.84 18.08 24.2% flydsl
96 6144, 4096 23.71 18.49 22.0% flydsl
176 6144, 4096 25.16 22.81 9.3% flydsl
208 6144, 4096 25.13 23.95 4.7% flydsl
224 6144, 4096 24.91 24.57 1.4% flydsl
16 12288, 6144 30.76 28.07 8.7% flydsl
32 12288, 6144 32.71 29.14 10.9% flydsl
48 12288, 6144 35.06 30.70 12.4% flydsl
64 12288, 6144 37.48 32.72 12.7% flydsl
32 25008, 6144 73.25 59.08 19.3% flydsl
64 25008, 6144 72.84 65.44 10.2% flydsl
128 25008, 6144 84.03 82.08 2.3% flydsl
256 25008, 6144 114.40 109.31 4.5% flydsl
11988 6144, 1280 201.85 176.22 12.7% flydsl
sum 2522.24 2103.16 16.6%

Validation

  • Merge clean: 0 duplicate keys across the full merge set (configs/bf16_tuned_gemm.csv plus all 19 model_configs/*bf16_tuned_gemm*.csv).
  • Portable backends only: hipblaslt excluded to prevent build-pinned solidx dispatch failures across ROCm releases.

Breaking changes

None. Two new files; no existing config, source file, or interface is modified.

Submission Checklist

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
amd-bishwoadhikari requested review from a team and a lite review from Copilot September 22, 2026 13:16
@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
multigpu 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: 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 5758 --add-label <label>

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 opt this PR out.

@github-actions github-actions Bot changed the title [Perf] [Config] [gfx950] Add MiniMax-M3-MXFP4 BF16 tuned GEMM configs [Config] [Perf] [gfx950] Add MiniMax-M3-MXFP4 BF16 tuned GEMM configs Sep 22, 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.

Copilot review overview

🔵 Needs a closer look

Performance-sensitive kernel configurations warrant final human validation.

Review effort: Lite
Findings: None

What changed in this PR

Adds MiniMax-M3 MXFP4 BF16 GEMM configurations for gfx950 across 96 model-specific shapes.

Changes:

  • Adds untuned GEMM shape definitions.
  • Adds tuned FlyDSL, ASM, and Triton kernel selections.
  • Reports a 17.4% aggregate performance improvement.
File Description
aiter/​configs/​model_configs/​minimax_m3_mxfp4_bf16_untuned_gemm.csv Defines supported GEMM shapes.
aiter/​configs/​model_configs/​minimax_m3_mxfp4_bf16_tuned_gemm.csv Provides gfx950 tuned kernel metadata.

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

Copilot AI review requested due to automatic review settings September 23, 2026 08:15

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.

Copilot review overview

🟡 Changes recommended

Resolve the two duplicate BF16 configuration keys that cause config resolution to fail.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity

Open (2)

Copilot AI review requested due to automatic review settings September 23, 2026 10:43

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.

Copilot review overview

🟢 Approval recommended

No unresolved review comments remain.

Review effort: Lite
Findings: None

Resolved since last review (2)

…yDSL 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-ROCm#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]>
Copilot AI review requested due to automatic review settings September 23, 2026 13:47

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 2 Medium severity

Open (2)

Copilot AI review requested due to automatic review settings September 23, 2026 14:55

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.

Copilot review overview

🔵 Needs a closer look

The hardware-specific dispatch coverage warrants final human review.

Review effort: Lite
Findings: 2 Medium severity

Open (2)

@yzhou103

Copy link
Copy Markdown
Contributor

please look at the copilot review comments

Copilot AI review requested due to automatic review settings September 24, 2026 06:10

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.

Copilot review overview

🟢 Approval recommended

No unresolved review comments are present, and approval readiness is affirmative.

Review effort: Lite
Findings: None

Resolved since last review (2)

Copilot AI review requested due to automatic review settings September 25, 2026 06:01

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.

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

@yzhou103
yzhou103 merged commit 7b81a08 into ROCm:main Sep 25, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants