Repository navigation
[Config] feat(minimax-m3): add TP8 tuned AITER configs - #4835
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags: |
There was a problem hiding this comment.
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.csvby 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.
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]>
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]>
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]>
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]>
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]>
…#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]>
Summary
Why
The model-specific configuration lacked the TP8 tuned shape coverage needed by MiniMax-M3 decode.
Validation