Skip to content

[None][perf] Autotune MiniMax-M3 MXFP8 decode backends - #17316

Draft
zheyuf wants to merge 1 commit into
NVIDIA:feat/m3_with_msafrom
brb-nv:zheyu/perf/mxfp8-flashinfer-quant
Draft

[None][perf] Autotune MiniMax-M3 MXFP8 decode backends#17316
zheyuf wants to merge 1 commit into
NVIDIA:feat/m3_with_msafrom
brb-nv:zheyu/perf/mxfp8-flashinfer-quant

Conversation

@zheyuf

@zheyuf zheyuf commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai summary

Description

Factorize MiniMax-M3's MXFP8 generation-graph backend tuning:

Stage Before this PR This PR
Activation quantization Fixed TRT-LLM native kernel; no backend tuning TRT-LLM native vs. FlashInfer CuTeDSL per graph shape bucket
GEMM FlashInfer CUTLASS; only its internal tactics were tuned during eager warmup FlashInfer CUTLASS vs. FlashInfer CuTeDSL per graph shape bucket

The first generation-graph warmup profiles the two candidates for each stage; the second captures the winners. The search is factorized (2 + 2), not a four-way cross product, and CUDA-graph replay has no profiling or Python dispatch.

Activation is intentionally narrow: MiniMax-M3, PP1, whole-model generation CUDA graphs, no torch.compile, and no explicit backend override. Other models, PP>1, graph-disabled execution, torch.compile, explicit backend choices, and missing CuTeDSL retain their existing path and autotuning lifecycle. This adds no public option, dependency, or M <= 32 heuristic.

Performance

Same-node A-H-H-A on Alex's 12 B300 AGG Pareto points; all 48 arms passed correctness and dispatch validation, and both head arms improved both InferenceX axes at every point.

Point Output tok/s/GPU (X) Output tok/s/user (Y)
TEP8 C1 +7.02% +7.70%
TP4 C1 +7.90% +7.67%
TP4 C2 +10.26% +11.74%
TP4 C4 +9.06% +10.03%
TP4 C8 +8.33% +9.38%
TP4 C16 +7.44% +8.64%
TP4 C32 +4.66% +6.03%
DEP8 C128 +4.10% +4.94%
DEP8 C256 +1.99% +3.32%
DEP8 C512 +1.74% +2.60%
DEP8 C1024 +0.68% +2.83%
DEP4 C1024 +0.12% +0.83%

X = (sum(input tokens) + sum(actual output tokens)) / benchmark duration / deployment GPUs.

Y = 1000 / mean(TPOT_ms), where each request's TPOT = (E2EL - TTFT) / (actual output tokens - 1).

Every run used 8,192 input and 1,024 output tokens per request. Each entry is the mean of the two wall-clock-interpolated H-vs-A gains. The measured serving path is unchanged by the final lifecycle narrowing in this commit.

Autotuning overhead

Measurement Added time
First model instance, warm same-image/JIT cache +4-26 seconds
Second model instance Usually +0-3 seconds; worst about +5 seconds
Serving after RPC readiness 0 seconds

With an empty CuTeDSL JIT cache, the factorized graph-tuning window itself is 93-96 seconds, including one-time compilation. That is an absolute cold-start window, not a +93-96 second incremental cost: on MiniMax-M3 it replaces the old eager FlashInfer tuning phase. All tuning finishes before RPC readiness, so it is outside AgentX benchmark duration and request TTFT; cold-start/autoscaling readiness is the tradeoff.

Test Coverage

  • 42 focused unit tests passed on the latest Alex image.
  • Full pre-commit suite and git diff --check passed.
  • B300 SM103 tuned and replayed real CUDA graphs at M=1, 24, 40, and 64; eager and replay outputs matched the TRT-LLM native reference with cosine 1.0.
  • A current-image TP4 C1 server completed factorized tuning, captured winners, and reached readiness; the second model instance reused the caches without retuning.

PR Checklist

  • The description explains the change and its performance impact.
  • New paths have tests and follow the coding guidelines.
  • No public API, dependency, documentation, or CODEOWNERS change is required.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

@zheyuf zheyuf changed the title [None][perf] Select CuTeDSL for qualified MXFP8 quantization [None][perf] Autotune the MXFP8 decode pipeline Aug 6, 2026
@zheyuf zheyuf changed the title [None][perf] Autotune the MXFP8 decode pipeline [None][perf] Autotune MXFP8 decode quantization and GEMM backends Aug 6, 2026
@zheyuf
zheyuf force-pushed the zheyu/perf/mxfp8-flashinfer-quant branch 2 times, most recently from 0c0dc5f to 315bf92 Compare August 6, 2026 20:37
Signed-off-by: Zheyu Fu <zheyuf@nvidia.com>
@zheyuf
zheyuf force-pushed the zheyu/perf/mxfp8-flashinfer-quant branch from 315bf92 to 9204c7d Compare August 7, 2026 00:08
@zheyuf zheyuf changed the title [None][perf] Autotune MXFP8 decode quantization and GEMM backends [None][perf] Autotune MiniMax-M3 MXFP8 decode backends Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant