Skip to content

[AMD] Use AITER ASM prefill for MiniMax-M3 HD128 attention - #41707

Merged
HaiShaw merged 2 commits into
sgl-project:mainfrom
zijiecode:pr/minimax-m3-hd128-asm-prefill
Oct 4, 2026
Merged

HaiShaw merged 2 commits into
sgl-project:mainfrom
zijiecode:pr/minimax-m3-hd128-asm-prefill

Conversation

@zijiecode

@zijiecode zijiecode commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

MiniMax-M3's HD128 dense attention layers do not use AITER's FP8 ASM prefill kernel. This PR enables that path by default, including chunks that reuse cached prefixes.

Modifications

  • Route supported gfx950 HD128 self-attention to AITER ASM prefill.
  • Gather already quantized KV for both first and later chunks, preserving KV scales and reusing per-batch gather indices.
  • Add FP32-reference regression coverage for first chunks, ragged prefixes, multiple KV heads and 1M context.

Enabled by default for supported configurations; set SGLANG_AITER_ASM_PREFILL_HD128=0 to disable it.

Accuracy Tests

3 GPU regression tests passed on this branch with the enable flag unset. Tested on MI355X with AITER acf8fdf93074, matching the current main Dockerfile.

amd/MiniMax-M3-MXFP4, TP4/EP1, full 5-shot GSM8K (1,319 questions), chat-completions, 16384-token output budget, temperature 0, and real EAGLE3 verification. The baseline includes the EAGLE fix; the candidate adds only HD128 ASM prefill to the same integration stack.

Configuration Strict-match Flexible-extract
Baseline 96.74% 96.66%
This PR 96.59% 96.51%

The candidate has two fewer correct answers out of 1,319 in each filter. Both configurations are below the 97% reference threshold.

Benchmarking and Profiling

AgentX on MI355X, TP4/EP1, C32, no KV offload, 3600 seconds per run, and 10 warmup requests per lane. Both sides use the same MiniMax-M3 integration stack with EAGLE3 and simulated acceptance length 2.78; the candidate enables only HD128 ASM prefill.

Metric Baseline This PR Change
Standard p90 interactivity (tok/s/user) 27.86 32.49 +16.62%
Total throughput (tok/s/GPU) 28602.11 30992.68 +8.36%
Output throughput (tok/s/GPU) 198.02 207.27 +4.67%
TPOT mean (ms/token) 22.135 19.444 -12.16%
TPOT p50 (ms/token) 16.739 16.248 -2.93%

Both formal runs had zero request errors. Grace-period cancellations were 1 / 1 for baseline / candidate; warmup errors were 0 / 1 and excluded from the formal metrics.

Checklist

  • Format your code according to the Format code with pre-commit guide.
  • Add unit tests.
  • Update documentation.
  • Provide accuracy and speed benchmark results.
  • Follow the SGLang code style guidance.

CI States

Latest PR Test (Base): ✅ Run #36810063195
Latest PR Test (Extra): ❌ Run #36810063055
Latest PR Test (AMD ROCm 10): ❌ Run #36810063168

@1am9trash 1am9trash added amd run-ci CI: run the baseline test suite on this PR labels Oct 1, 2026
@zijiecode

Copy link
Copy Markdown
Collaborator Author

/rerun-failed-ci

@HaiShaw
HaiShaw merged commit 71dc292 into sgl-project:main Oct 4, 2026
191 of 224 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

amd run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants