Fix on TE to support Mcore Vision Encoder CUDA Graph#2657
Merged
ptrendx merged 5 commits intoNVIDIA:mainfrom Feb 11, 2026
Merged
Fix on TE to support Mcore Vision Encoder CUDA Graph#2657ptrendx merged 5 commits intoNVIDIA:mainfrom
ptrendx merged 5 commits intoNVIDIA:mainfrom
Conversation
Signed-off-by: Lifu Zhang <lifuz@login-lyris02.lyris.clusters.nvidia.com>
for more information, see https://pre-commit.ci
Contributor
Greptile OverviewGreptile SummaryThis PR updates Concretely, it:
These changes fit into TE’s Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User code
participant MG as make_graphed_callables
participant WU as Warmup
participant CG as CUDAGraph
participant AG as Autograd
U->>MG: call(modules, sample_args/kwargs)
MG->>WU: run warmup func(*args, **kwargs)
WU->>WU: flatten outputs (may include None)
opt training
WU->>AG: backward(outputs requiring grad)
Note over WU,AG: PR skips None outputs
end
MG->>CG: capture forward graph
CG->>CG: store static_outputs
opt training
MG->>CG: capture backward graph
CG->>AG: backward(non-None outputs requiring grad)
end
U->>MG: replay graphed callable
MG->>CG: fwd_graph.replay()
MG-->>U: return detached tensors + None leaves
|
5 tasks
ptrendx
reviewed
Feb 10, 2026
Member
|
/te-ci pytorch |
ptrendx
previously approved these changes
Feb 10, 2026
Member
ptrendx
left a comment
There was a problem hiding this comment.
Other than the one small comment LGTM.
Signed-off-by: Lifu Zhang <lifuz@login-lyris02.lyris.clusters.nvidia.com>
ptrendx
approved these changes
Feb 11, 2026
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is needed to support vision encoder CUDA Graph.
Related MLM PR: NVIDIA/Megatron-LM#3293, NVIDIA/Megatron-LM#3294
Fixes # (issue)
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: