Repository navigation
[Config] [Perf] MiniMax-M3.1 TP4 lm_head BF16 (N50016 K6144) gfx950: exact-M rows for verify row counts and M 192-512 - #8598
Conversation
…rows for verify/draft row counts and M 192-512 Add the exact-M rows for the lm_head shapes the DSpark verify step hits (M = 40, 48, 56, 96, 112) and replace the weak M = 64, 128, 256, 512 rows, plus M = 192 and 384 (previously no row, fallback path). Co-Authored-By: Claude <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: Reviews: |
WAITING ON AUTHORPR Self-ReviewRevision 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
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
There was a problem hiding this comment.
🟡 Changes recommended
The new tuned GEMM rows lack matching shapes in the companion untuned configuration, preventing their reproduction through model retuning from checked-in inputs.
1 open issue
What changed in this PR
Updates MiniMax-M3.1 TP4 BF16 lm_head tuning for N=50016, K=6144 on gfx950/256-CU GPUs, selecting existing backends to reduce latency without changing runtime code or APIs.
Changes:
- Adds seven M-specific rows and replaces four existing selections.
- Uses FlyDSL configurations for M=40–128 and Torch native selections at M=192, 256, 384, and 512.
- Adds no saved hipBLASLt solution indexes, consistent with #8490.
| File | Description |
|---|---|
aiter/configs/model_configs/minimax_m3_eagle_bf16_tuned_gemm.csv |
Adds or updates 11 lm_head tuning rows for verify batches and larger row counts. |
Review effort: Balanced
Conflicts: - gemm_a16w16_gfx950.py: take main's AOT-cache launch (ROCm#8565, ROCm#8600): bind_aot, _PARAM_ITEMS and _run_compiled with the sorted param items and the device as the specialization key. Keep this branch's fp32 workspace argument, its one-counter get_split_k_buffers(stream, device) and its get_cu_num/buf_base_i64 imports. The param items now include this branch's split_k_resident and m_tail, so the AOT key covers the per-launch reduction choice. - llama70B, minimax_m3_eagle tables: key-based 3-way merge. Take main's change where this branch did not touch a row. For minimax_m3_eagle 128x50016x6144, which both sides changed, keep main's row (ROCm#8598, FlyDSL t128x256x64x3 ks1 w4x4x1, 119.9 us vs this branch's torch row at 135.0 us). It has no split-K and no slice-K, so this PR's reduction does not apply and it is exact. This follows the earlier merges, which kept main's row where main's non-split-K pick is faster. Signed-off-by: Andreas Karatzas <[email protected]> Co-authored-by: Claude <[email protected]>

Summary
MiniMax-M3.1 TP4 lm_head BF16 GEMM (N=50016, K=6144, gfx950, CU=256), exact-M rows in
minimax_m3_eagle_bf16_tuned_gemm.csv(which already carries the other N=50016 rows). The DSpark verify step runs the lm_head at 8 x (accepted-draft batch) rows, i.e. M = 40, 48, 56, 96, 112 have no row today and fall back to a slow path; M = 64, 128, 256, 512 have rows that are much slower than what the same shape reaches with the picks below. M = 192 and 384 also had no row.Config only: 11 rows (7 added, 4 replaced), no hipBLASLt rows (see #8490), no code.
Before / after (same lease, ABAB, 2 reps each, cold weights, CUDA-graph, median of 20 replays, MI355X gfx950)
"before" = aiter main (
65f6f67b5) tuned tables; "after" = same tree plus these rows (AITER_CONFIG_GEMM_BF16pointing at the merged public table with / without the rows, so only the row differs).tgemm.mm(x, w)public entry, w bf16 [50016, 6144], one GPU.Rows for M = 1..32 (and 16/32 hipBLASLt candidates, 24) were evaluated and NOT added: the existing public rows are equal or faster (torch native at M = 16/24/32 measured +4..+8% slower than main). Rel err is vs an fp32 reference matmul; the 0.17-0.25% is the bf16 output rounding, same before and after. "differs" = a different split-K / tile order, identical error class.
Notes:
rel errand times use random N(0, 0.02) weights and N(0, 1) activations; kernels are public FlyDSL hgemm (kernelNameis parsed byget_flydsl_hgemm_kernel_params, solidx is informational) andtorchrows.ATOM_LM_HEAD_RING) covers M <= 128 when enabled; these rows serve the default path and M >= 129 (256/384/512 are prefill-side or large verify batches)./shared_nfs/ygan/p1/070b/ab.log,abt.log.Expected effect
lm_head runs once per decode/verify step; verify steps at 5-14 requests (M = 40-112) save 65-75 us per step on the lm_head alone (about 0.6-0.9% of an 8-12 ms decode step, per ticket-069 step histograms). It is not a prefill-GEMM change.
Why these rows needed re-tuning
The existing gfx950 rows for N=50016, K=6144 come from #5145 (2026-09-03: M = 16 ... 32768 on a power-of-two-like grid plus 196 and 320) and #6079 (2026-10-02: M = 1 ... 8, triton). Two things follow:
The gfx1250 rows in the same file are for a different architecture and are not touched.
Review
Run by hand against
.claude/skills/review-prrules for a CSV-only diff: D3 (no hipblaslt rows added, 0 hits), no duplicate keys, all keys havegfx950,256, header unchanged, each added/replaced row exercised in the table above; no code, no test needed. No open findings.🤖 Generated with Claude Code