Skip to content

Add CUDA graph support for GDP dynamic inference - #6595

Merged
santhnm2 merged 1 commit into
NVIDIA:mainfrom
santhnm2:gdp_cuda_graphs
Aug 20, 2026
Merged

santhnm2 merged 1 commit into
NVIDIA:mainfrom
santhnm2:gdp_cuda_graphs

Conversation

@santhnm2

@santhnm2 santhnm2 commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor
  • I, the PR author, have personally reviewed every line of this PR.

What does this PR do?

Adds CUDA graph support for GDP dynamic inference. Eval results (n=1):

Configuration MMLU Pro score
w/ CUDA graphs 61.51
w/out CUDA graphs 60.52

⚠️ For major changes (either in lines of code or in its impact), please make sure to first share a design doc with the team. If you're unsure what's the best way to do so, contact @NVIDIA/mcore-oncall.

Issue tracking

For PRs from open-source community contributors:

  • New features: a linked issue is required. Please open a feature request and reference it here before submitting the PR.
  • Small updates (bug fixes, minor improvements): a linked issue is recommended and will accelerate the PR review process.

Linked issue:

Contribution process

Pre-checks

  • I have added relevant unit tests
  • I have added relevant functional tests
  • I have added proper typing to my code Typing guidelines
  • I have added relevant documentation
  • I have run the autoformatter.sh on my PR

Code review

Feel free to message or comment @NVIDIA/mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!

All PRs start as draft. If you open a non-draft PR, it will be automatically converted to draft.

Step 1: Mark PR as "Ready for Review"

  1. When your PR is ready, click Ready for Review.
  2. An oncall reviewer is auto-assigned and expert reviewers are notified based on your changes.
    • Some PRs may jump straight to step 2. This is determined by .github/CODEOWNERS.

⚠️ Only mark as ready once merge-conflicts are resolved and the CI is passing.
Final Review might get declined if these requirements are not fulfilled.

Step 2: Final Review

For PRs that change megatron/core, once all expert reviewers have approved, the Final Review label is applied automatically and final reviewers are assigned.

For PRs outside megatron/core, this step is skipped.

Step 3: Approved

Once all required reviewers have approved, the Approved label is applied automatically.

Merge

Any member of mcore-engineers will be able to merge your PR.

@copy-pr-bot

copy-pr-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@santhnm2
santhnm2 marked this pull request as ready for review August 18, 2026 22:32
@santhnm2
santhnm2 requested review from a team as code owners August 18, 2026 22:32
@Phlip79

Phlip79 commented Aug 19, 2026

Copy link
Copy Markdown
Member

/claude strict-review

Comment thread megatron/core/ssm/ops/gdp/chunk_h.py Resolved
Comment thread megatron/core/ssm/ops/gdp/chunk_h.py Resolved
Comment thread megatron/core/inference/config.py Resolved
@santhnm2

Copy link
Copy Markdown
Contributor Author

/ok to test ce8e7e8

@santhnm2
santhnm2 enabled auto-merge August 19, 2026 21:26
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
@santhnm2

Copy link
Copy Markdown
Contributor Author

/ok to test 7385a61

@nemo-automation-bot

Copy link
Copy Markdown

🔄 Merge queue validation started!

You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/32337039103

Merged via the queue into NVIDIA:main with commit 3a56046 Aug 20, 2026
91 checks passed
devnkong pushed a commit to devnkong/Megatron-LM that referenced this pull request Aug 22, 2026
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>
Signed-off-by: Kezhi Kong <kezhik@kezhik-mlt.client.nvidia.com>
ksivaman pushed a commit to ksivaman/Megatron-LM that referenced this pull request Sep 1, 2026
Signed-off-by: Keshav Santhanam <ksanthanam@nvidia.com>

This branch was previously deployed

2 inactive deployments
public — 7385a615 Deployed Aug 19, 2026 by copy-pr-bot[bot] via finalize / publish-docs #6685
test — 7385a615 Deployed Aug 19, 2026 by copy-pr-bot[bot] via cicd-wait-in-queue #19523
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved All necessary approvals have been made complexity: medium nemotron

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants