Skip to content

[None][perf] Capture MiniMax-M3 context graph producers - #17473

Merged
brb-nv merged 2 commits into
NVIDIA:feat/m3_with_msafrom
peihu-nv:perf/m3-piecewise-context-graphs-20260809
Aug 10, 2026
Merged

brb-nv merged 2 commits into
NVIDIA:feat/m3_with_msafrom
peihu-nv:perf/m3-piecewise-context-graphs-20260809

Conversation

@peihu-nv

Copy link
Copy Markdown
Collaborator

@coderabbitai summary

Description

MiniMax-M3 context and mixed iterations could use the generic piecewise CUDA-graph boundaries, but the optimized sparse horizontal producer rejected the compiled path. Main K/V and index-K cache preparation therefore remained at the eager MSA boundary, reducing useful graph coverage.

This change reuses the existing fused QKV/index producer inside the captured segment for graph-eligible MSA FP8 context batches. Padded cache slots are reset to -1, the eager attention boundary accepts prewritten K/V and consumes only live Q/index-Q rows, and request-dependent MSA selection and FMHA remain eager. It also routes only graph-eligible context batches through the compiled model, preserves eager fallback above the capture ceiling, and retains the existing generation MXFP8/CUDA-graph behavior.

On a fixed 4K piecewise configuration using MiniMax-M3 on four B300 GPUs, the producer-only public AgentX c30 A/B improved output throughput per user by 12.58% and served-token throughput per GPU by 5.22%. Nsight Systems validation found all 57 sparse horizontal producers captured per eligible forward while all dynamic MSA attention regions remained eager.

Test Coverage

  • Changed-file pre-commit suite passes for all seven modified Python files.
  • Homebrew Python 3.12 bytecode compilation passes for all modified Python files.
  • Eleven focused B300 tests pass: five compiled/eager routing tests, three producer/boundary tests, and three native CUDA-graph replay tests.
  • Four-GPU B300 TP4 public AgentX validation completed with zero model, sampler, CUDA, or non-finite errors.
  • Nsight Systems structural validation confirms 57/57 sparse producer kernels are captured, MSA attention remains eager, and above-ceiling context retains eager fallback.

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

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

@peihu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65083 [ run ] triggered by Bot. Commit: 0bbedb6 Link to invocation

@peihu-nv
peihu-nv requested review from a team as code owners August 10, 2026 17:42
@peihu-nv
peihu-nv requested a review from xinhe-nv August 10, 2026 17:42
@peihu-nv

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65094 [ run ] triggered by Bot. Commit: 02b7cb8 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65083 [ run ] completed with state ABORTED. Commit: 0bbedb6

Link to invocation

@brb-nv brb-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65094 [ run ] completed with state SUCCESS. Commit: 02b7cb8
/LLM/main/L0_MergeRequest_PR pipeline #52895 completed with status: 'SUCCESS'

CI Report

Link to invocation

@brb-nv
brb-nv merged commit 6d28252 into NVIDIA:feat/m3_with_msa Aug 10, 2026
7 checks passed
brb-nv pushed a commit to brb-nv/TensorRT-LLM that referenced this pull request Aug 25, 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.

3 participants