Skip to content

Add core APIs for building, requiring and testing process-group collections - #8890

Draft
Connor-XY wants to merge 18 commits into
NVIDIA:mainfrom
Connor-XY:yx/pstate-unit-U1
Draft

Connor-XY wants to merge 18 commits into
NVIDIA:mainfrom
Connor-XY:yx/pstate-unit-U1

Conversation

@Connor-XY

Copy link
Copy Markdown
Contributor

This PR adds the Megatron Core APIs that later steps of the parallel_state deprecation (#6307) build on. Callers get a builder that returns the standard grid's ProcessGroupCollection without writing globals. They also get helpers that validate a collection or fall back to the globals with a dedicated warning. The global memory buffer no longer needs initialize_model_parallel(). Maintainers get shared test helpers that fail a test on any global grid read. It also makes DDP's fallback expert data-parallel group a collective call. It consolidates six draft PRs unchanged. Five are one commit each, so please review commit by commit; #8820 needs no commit of its own (see below). It builds on #6259 (#8017 and #8039 use its Gloo fields) and #6293 (#8049 builds on its fallback defaults).

Review

The unit's own commits: Connor-XY/Megatron-LM@7c8c403...eb768e2

The full PR diff also includes #7487, #6259, #6293 and #6303 until they merge.

Members

Behavior changes for callers

  • initialize_model_parallel() returns the ProcessGroupCollection instead of None. If building fails, no group is registered.
  • initialize_model_parallel() no longer creates the global memory buffer. The private parallel_state._GLOBAL_MEMORY_BUFFER is removed, and _set_global_memory_buffer() no longer asserts that the buffer is new.
  • On the DDP expt_dp fallback path, setup makes one new_group call per rank of the job instead of one.
  • Fallback warnings use ProcessGroupFallbackWarning, a FutureWarning subclass, so existing FutureWarning filters still match. warnings.simplefilter("error", ProcessGroupFallbackWarning) makes every fallback raise.

The public names build_process_group_collection, StandardGridExtras, require_process_groups and resolve_process_groups need core approval before later PRs start calling them. At least 15 later PRs call resolve_process_groups.

Teams

core-adlr, core-nemo

Testing

Each member was GPU-tested against its base before consolidation. The consolidated chain (every unit in landing order, on current main) was run against main on 4 GPUs: 258 test files, and no test fails on the chain that passes on main. Tests in 28 files fail on both, mostly tests written for 8 GPUs, and one file times out on both.

🤖 Generated with Claude Code

Connor-XY and others added 18 commits November 2, 2026 18:22
Originally NVIDIA#7487.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Originally NVIDIA#6259.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Originally NVIDIA#6293.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
…groups

Originally NVIDIA#8042.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Originally NVIDIA#8043.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Originally NVIDIA#8045.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Originally NVIDIA#8731.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Originally NVIDIA#6257.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Originally NVIDIA#6303.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Originally NVIDIA#8026.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Originally NVIDIA#8723.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Originally NVIDIA#8017.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Originally NVIDIA#8039.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
Originally NVIDIA#8049.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 3, 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.

This branch has not been deployed

No deployments
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.

1 participant