Skip to content

[Config] Add M=8320 MiniMax-M3 MXFP8 GEMM rows for gfx950 - #7829

Merged
yifehuan merged 1 commit into
mainfrom
minimax-m3-mxfp8-large-m-rows
Nov 12, 2026
Merged

yifehuan merged 1 commit into
mainfrom
minimax-m3-mxfp8-large-m-rows

Conversation

@amd-yashagar

Copy link
Copy Markdown
Contributor

Summary

Add M=8320 rows for six MiniMax-M3 MXFP8 GEMM shapes (1x32 E8M0 scales, (16,16)-preshuffled weights) to aiter/configs/model_configs/minimax_m3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv on gfx950. All six winners are mxfp8 kernels (8-wave 256x256 or mxpsh).

Motivation

M=8320 had no row, so the padded-M lookup served it from the M=16384 row (N <= 2560) or the M=8192 row (N = 6144), whose bmm kernels were tuned for a different M. The tuned rows take 8-41% off the M=8320 time on these shapes. M=8320 is one of the MiniMax-M3 MXFP8 shapes tuned in #5817.

Changes

  • Six rows appended at M=8320, for N x K = 1536x6144, 2304x6144, 2560x6144, 6144x2048, 6144x3072 and 6144x6144. Through the fine padded-M level (multiples of 128 above M=4096) they also serve M=8193..8320 of these shapes; every other M and shape resolves as before.
  • N=6144 K=768 is left out: its tuned kernel matched the padded M=8192 row (64.9 vs 64.8 us).

Performance (if applicable)

Hardware Workload/configuration Before After Change
MI355X (gfx950, 256 CU) M=8320 N=1536 K=6144 143.0 us 84.4 us -41.0%
MI355X (gfx950, 256 CU) M=8320 N=2304 K=6144 157.5 us 145.5 us -7.7%
MI355X (gfx950, 256 CU) M=8320 N=2560 K=6144 159.5 us 146.8 us -7.9%
MI355X (gfx950, 256 CU) M=8320 N=6144 K=2048 135.6 us 121.3 us -10.5%
MI355X (gfx950, 256 CU) M=8320 N=6144 K=3072 192.1 us 167.7 us -12.7%
MI355X (gfx950, 256 CU) M=8320 N=6144 K=6144 350.5 us 293.8 us -16.2%

Production call aiter.gemm_a8w8_blockscale_bpreshuffle(x, w, x_scale, w_scale, bf16) with raw [M, K/32] / [N, K/32] E8M0 scales, device time from aiter.test_common.run_perftest defaults, one run each before and after.

Testing

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

Tested on MI355X only; the rows are gfx950 rows.

Documentation

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

Tuned-config rows only.

Dependencies

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

Breaking Changes

None.

PR Self-Review

Reviewed revision

2020f74

Behavior and intent

Only M=8193..8320 on the six N x K shapes changes kernel, from the padded M=16384 / M=8192 bmm row to a tuned mxfp8 row. No dispatch code changes.

Validation and unverified scope

Tuned with python3 csrc/gemm_a8w8_mxfp8_bpreshuffle/gemm_a8w8_mxfp8_bpreshuffle_tune.py --mxscale_table -i <M,N,K,w_scale_block shape list> -o <scratch csv> --mp 1 on one MI355X GPU (default errRatio 0.05): 7,369 candidates (mxpsh and 8-wave kernels, plus bmm seeds from nearby M), winners errRatio <= 0.0007, best bmm candidate 1-18% slower per shape. Before and after, the production call above was checked with checkAllclose (rtol=atol=1e-2) against an fp32 dequant reference: error ratios identical before and after on every shape, and AITER_LOG_TUNED_CONFIG=1 shows each shape resolving to its M=8320 row. python3 -m unittest op_tests.tuning_tests.test_csv_validation op_tests.tuning_tests.test_config_shape_collision: 51 tests OK. Not run: end-to-end MiniMax-M3 serving, repeat timing runs, CUDA graph capture, M=8193..8319, and the table's other N x K shapes at M=8320.

PR-specific question

To fill in from the PR Self-Review comment after opening.

Changed op tests

None.

M=8320 had no row in the MiniMax-M3 1x32 e8m0 table, so the padded-M
lookup served it from the M=16384 row (N <= 2560) or the M=8192 row
(N = 6144). Tuned with gemm_a8w8_mxfp8_bpreshuffle_tune.py
--mxscale_table on MI355X; all six winners are mxfp8 kernels. N=6144
K=768 is left out: its tuned row was within 1% of the padded one.
@amd-yashagar
amd-yashagar requested review from a team and a balanced review from Copilot November 11, 2026 15:25
@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 7829 --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.

@aiter-bot

Copy link
Copy Markdown

WAITING ON AUTHOR

PR Self-Review

Revision 2020f7481777 · 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 — PR-specific question is too short to show concrete reasoning (10 units; need 14)

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.

🔵 Needs a closer look

The backend switch spans M=8193–8320, but GPU validation is reported only at M=8320, and independent gfx950 correctness and latency checks for partial-tile sizes are unavailable.

No open issues 🎉

What changed in this PR

Adds six gfx950 tuning entries for MiniMax-M3 MXFP8 GEMM at M=8320, replacing padded-M fallback selections with kernels tuned for these shapes.

Changes:

  • Adds six N×K configurations using 8-wave or mxpsh mxfp8 kernels.
  • Leaves dispatch code unchanged; the existing fine-grained padded-M lookup also uses these entries for M=8193–8319.
  • Reports 8–41% lower latency at M=8320 on MI355X.
File Description
aiter/​configs/​model_configs/​minimax_m3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv Appends six M=8320 tuning rows for gfx950 with 256 compute units and 1×32 scales.

Review effort: Balanced

@yifehuan yifehuan 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.

lgtm

@yifehuan
yifehuan merged commit e9efac0 into main Nov 12, 2026
@yifehuan
yifehuan deleted the minimax-m3-mxfp8-large-m-rows branch November 12, 2026 07:47
@amd-yashagar

Copy link
Copy Markdown
Contributor Author

@yifehuan Thank you for prompt review and merge!

vpietila-amd pushed a commit that referenced this pull request Nov 12, 2026
)

M=8320 had no row in the MiniMax-M3 1x32 e8m0 table, so the padded-M
lookup served it from the M=16384 row (N <= 2560) or the M=8192 row
(N = 6144). Tuned with gemm_a8w8_mxfp8_bpreshuffle_tune.py
--mxscale_table on MI355X; all six winners are mxfp8 kernels. N=6144
K=768 is left out: its tuned row was within 1% of the padded one.
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.

4 participants