Skip to content

[None][fix] Fix piecewise cudagraph for MinimaxM3 MSA - #17216

Merged
brb-nv merged 1 commit into
NVIDIA:feat/m3_with_msafrom
brb-nv:user/brb/fix-piecewise-minimax-m3
Aug 6, 2026
Merged

brb-nv merged 1 commit into
NVIDIA:feat/m3_with_msafrom
brb-nv:user/brb/fix-piecewise-minimax-m3

Conversation

@brb-nv

@brb-nv brb-nv commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Description

Piecewise cudagraph seems to be broken for MinimaxM3 with MSA backend. This fixes that.

Test Coverage

$ pytest tests/integration/defs/accuracy/test_llm_api_pytorch.py::TestMiniMaxM3::test_nvfp4[use_msa=True-eval_mode=default] -s -v

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)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • 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.

@brb-nv
brb-nv requested a review from peihu-nv August 3, 2026 18:35
@brb-nv
brb-nv force-pushed the user/brb/fix-piecewise-minimax-m3 branch 2 times, most recently from 419c2f8 to eb1d478 Compare August 3, 2026 19:39
@brb-nv
brb-nv requested review from pcicotti and zheyuf August 3, 2026 19:40
@brb-nv

brb-nv commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63545 [ run ] triggered by Bot. Commit: eb1d478 Link to invocation

# instead of tuning tactics that would go unused.
use_mxfp8_flashinfer_graph_default = (
self.cuda_graph_runner.enabled
self.cuda_graph_runner.enabled and not self._torch_compile_enabled

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.

Thanks for fixing the compile path! One small question about explicit TRTLLM_MXFP8_GEMM_BACKEND=auto: under torch compile, apply() currently executes native TRT-LLM, while warmup still tunes FlashInfer. Could we align the two?

If native is the intended compiled policy, the minimal change before the tuning checks could be:

if self._torch_compile_enabled and quant_method.backend == "auto":
    quant_method.disable_flashinfer_auto()

If we want compiled auto to retain FlashInfer instead, we could pin auto to flashinfer there so both warmup and execution use FlashInfer. It would also be helpful to cover the chosen behavior in test_flashinfer_mxfp8_stays_native_under_torch_compile.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Updated. 5eb6783

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63545 [ run ] completed with state SUCCESS. Commit: eb1d478
/LLM/main/L0_MergeRequest_PR pipeline #51510 completed with status: 'SUCCESS'

CI Report

Link to invocation

@brb-nv
brb-nv force-pushed the user/brb/fix-piecewise-minimax-m3 branch from 5eb6783 to b4ccc1d Compare August 5, 2026 22:41
@brb-nv

brb-nv commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64125 [ run ] triggered by Bot. Commit: b4ccc1d Link to invocation

@brb-nv
brb-nv requested a review from peihu-nv August 5, 2026 23:30
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64125 [ run ] completed with state SUCCESS. Commit: b4ccc1d
/LLM/main/L0_MergeRequest_PR pipeline #52051 completed with status: 'SUCCESS'

CI Report

Link to invocation

@brb-nv
brb-nv merged commit 10c9eaf into NVIDIA:feat/m3_with_msa Aug 6, 2026
7 checks passed
brb-nv added 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