fix(mhc): update CUDA graph module API - #5994
Merged
FDecaYed merged 1 commit intoAug 10, 2026
Merged
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
24 tasks
Contributor
Author
|
/ok to test 369b79e |
Signed-off-by: Deyu Fu <deyuf@nvidia.com>
FDecaYed
force-pushed
the
codex/mhc-current-cudagraph-api
branch
from
July 24, 2026 08:47
369b79e to
672202b
Compare
Contributor
Author
|
/ok to test 672202b |
Phlip79
approved these changes
Jul 29, 2026
Connor-XY
approved these changes
Jul 30, 2026
jiemingz
approved these changes
Aug 5, 2026
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.
fix(mhc): update CUDA graph module API
Summary
Update
HyperConnectionTransformerLayer._get_submodules_under_cudagraphs()to use thecurrent CUDA graph configuration API:
cuda_graph_modulesinstead of the deprecatedcuda_graph_scopeCudaGraphModuleinstead of the removedCudaGraphScopeThis is a compatibility-only follow-up. It does not add new mHC or DSv4 behavior.
Stack
pull-request/4531)f1df30c1db8c2ece4df1e0465b89f67f12337e7bThis PR should merge after #4531. Before #4531 merges, retarget this PR to
mainand refresh it against the merged result so GitHub does not automatically close
the dependent PR.
Credit
The mHC implementation being updated was authored by @Connor-XY in
#4531. This follow-up only adapts that implementation to the
current CUDA graph module API needed by the #5795 integration.
Validation
uv run ruff check megatron/core/transformer/transformer_layer.pyuv run python -m py_compile megatron/core/transformer/transformer_layer.pygit diff --checktests/unit_tests/transformer/test_transformer_layer.py::TestMHCWithCudaGraph::test_submodules_under_cudagraphs_includes_hyper_connection(blocked locally because the available environment does not include
torch)Checklist