fix: keep DD communication inside domain subgroups - #155
Open
atulcthakur wants to merge 1 commit into
Open
Conversation
Signed-off-by: atulcthakur <atthakur@nvidia.com>
Collaborator
Author
|
/ok to test 1f5e36e |
Contributor
Greptile SummaryThis PR confines domain-decomposition communication to each pipeline stage’s domain subgroup.
Important Files Changed
Reviews (1): Last reviewed commit: "fix: scope DD communication to domain gr..." | Re-trigger Greptile |
atulcthakur
requested review from
dallasfoster and
laserkelvin
and removed request for
laserkelvin
July 29, 2026 06:08
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.
ALCHEMI Toolkit Pull Request
Description
In a
(pipeline, domain)mesh, each pipeline stage has its own domainprocess group. Several DD communication paths either used the global WORLD
group or passed domain-local peer numbers to PyTorch APIs that expect global
ranks.
For a 2×2 mesh with domain groups
{0,1}and{2,3}, this caused errors,incorrect cross-stage communication, or hangs.
Example failure
Consider a four-GPU pipeline with:
{0,1}{2,3}For the NVT stage, domain-local rank 0 is global rank 2. The old controller
broadcast used
src=0, which PyTorch interpreted as global rank 0. Becauseglobal rank 0 is not a member of
{2,3}, the first NVT step failed with:ValueError: Global rank 0 is not part of groupThe same local-versus-global rank mismatch affected P2P halo exchanges, while
some fixed halo and atom-ownership collectives used all four ranks instead of
the stage’s two-rank domain group.
Type of Change
Related Issues
Changes Made
broadcasting thermostat, barostat, or cell state.
isendandirecv.forward and backward exchanges do not use WORLD.
{0,1}and{2,3}.Files changed
nvalchemi/distributed/_dynamics_coordinator.pynvalchemi/distributed/sharded_batch.pynvalchemi/distributed/_core/gather_primitives.pynvalchemi/distributed/_core/particle_halo.pynvalchemi/distributed/strategy.pytest/distributed/test_2d_subgroup_collectives.pytest/distributed/_core/test_subgroup_communication.pyTesting
make pytest)make lint)Checklist
Additional Notes
Tip
This repository uses Greptile, an AI code review service, to help conduct
pull request reviews. We encourage contributors to read and consider suggestions
made by Greptile, but note that human maintainers will provide the necessary
reviews for merging: Greptile's comments are not a qualitative judgement
of your code, nor is it an indication that the PR will be accepted/rejected.
We encourage the use of emoji reactions to Greptile comments, depending on
their usefulness and accuracy.