Skip to content

fix(mhc): update CUDA graph module API - #5994

Merged
FDecaYed merged 1 commit into
NVIDIA:pull-request/4531from
FDecaYed:codex/mhc-current-cudagraph-api
Aug 10, 2026
Merged

fix(mhc): update CUDA graph module API#5994
FDecaYed merged 1 commit into
NVIDIA:pull-request/4531from
FDecaYed:codex/mhc-current-cudagraph-api

Conversation

@FDecaYed

Copy link
Copy Markdown
Contributor

fix(mhc): update CUDA graph module API

Summary

Update HyperConnectionTransformerLayer._get_submodules_under_cudagraphs() to use the
current CUDA graph configuration API:

  • cuda_graph_modules instead of the deprecated cuda_graph_scope
  • CudaGraphModule instead of the removed CudaGraphScope

This is a compatibility-only follow-up. It does not add new mHC or DSv4 behavior.

Stack

This PR should merge after #4531. Before #4531 merges, retarget this PR to main
and 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.py
  • uv run python -m py_compile megatron/core/transformer/transformer_layer.py
  • git diff --check
  • Targeted pytest collection attempted:
    tests/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

@copy-pr-bot

copy-pr-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Contributor Author

/ok to test 369b79e

Signed-off-by: Deyu Fu <deyuf@nvidia.com>
@FDecaYed
FDecaYed force-pushed the codex/mhc-current-cudagraph-api branch from 369b79e to 672202b Compare July 24, 2026 08:47
@copy-pr-bot

copy-pr-bot Bot commented Jul 24, 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.

@FDecaYed

Copy link
Copy Markdown
Contributor Author

/ok to test 672202b

@Phlip79 Phlip79 added the Final Review PR is in the "final review" stage label Aug 5, 2026
@Phlip79 Phlip79 added Approved All necessary approvals have been made and removed Final Review PR is in the "final review" stage labels Aug 7, 2026
@FDecaYed
FDecaYed merged commit 122349f into NVIDIA:pull-request/4531 Aug 10, 2026
184 of 186 checks passed
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: low deepseekv4 DeepSeek V4 PRs Run tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants