fix: fix nccl P2P initialization error for non-colocated#636
Merged
parthchadha merged 4 commits intomainfrom Jul 11, 2025
Merged
fix: fix nccl P2P initialization error for non-colocated#636parthchadha merged 4 commits intomainfrom
parthchadha merged 4 commits intomainfrom
Conversation
Signed-off-by: Zhanda <zhandazhu@gmail.com>
Signed-off-by: Zhanda <zhandazhu@gmail.com>
yuki-97
reviewed
Jul 10, 2025
Signed-off-by: Zhanda Zhu <49645678+Dazz993@users.noreply.github.com>
wangshangsam
approved these changes
Jul 10, 2025
Contributor
|
Hmmm ... I was looking into the mypy errors in #632 until I realized that mypy failed for this PR too. It would be hard to imagine why this PR would trigger any mypy failures. @terrykong @parthchadha is mypy failing expected? |
Collaborator
|
@wangshangsam the mypy job is expected to fail. It won't block a PR, but just as an FYI of typing issues. Once we're completely in the green, we'll change that so it gates PRs |
parthchadha
approved these changes
Jul 10, 2025
ZhiyuLi-Nvidia
pushed a commit
that referenced
this pull request
Jul 21, 2025
Signed-off-by: Zhanda <zhandazhu@gmail.com> Signed-off-by: Zhanda Zhu <49645678+Dazz993@users.noreply.github.com> Co-authored-by: Zhanda Zhu <zhandaz@cw-dfw-cs-001-vscode-02.cm.cluster> Signed-off-by: Zhiyu Li <zhiyul@nvidia.com>
jialei777
pushed a commit
to jialei777/nemo-rl
that referenced
this pull request
Jul 23, 2025
…#636) Signed-off-by: Zhanda <zhandazhu@gmail.com> Signed-off-by: Zhanda Zhu <49645678+Dazz993@users.noreply.github.com> Co-authored-by: Zhanda Zhu <zhandaz@cw-dfw-cs-001-vscode-02.cm.cluster> Signed-off-by: Jialei Chen <jialeic@google.com>
KiddoZhu
pushed a commit
that referenced
this pull request
Jul 28, 2025
Signed-off-by: Zhanda <zhandazhu@gmail.com> Signed-off-by: Zhanda Zhu <49645678+Dazz993@users.noreply.github.com> Co-authored-by: Zhanda Zhu <zhandaz@cw-dfw-cs-001-vscode-02.cm.cluster>
FannYYW
pushed a commit
to xxman-google/NeMo-RL
that referenced
this pull request
Aug 5, 2025
…#636) Signed-off-by: Zhanda <zhandazhu@gmail.com> Signed-off-by: Zhanda Zhu <49645678+Dazz993@users.noreply.github.com> Co-authored-by: Zhanda Zhu <zhandaz@cw-dfw-cs-001-vscode-02.cm.cluster>
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.
What does this PR do ?
Adds explicit
NCCL_CUMEM_ENABLE=1environment variable setting to resolve P2P initialization failures in distributed training with vLLM.Please see detailed analysis in #564 (comment).
Issues
Closes #564.
This PR can also be helpful to #613. Maybe @YUki-666 could take a look. The only change you may need to make it to delete the
os.environ["NCCL_CUMEM_ENABLE"] = "0"in functioninit_collectivefornemo_rl/models/policy/megatron_policy_worker.py.Test results
I have tested the settings @YUki-666 provided: 8b model grpo on 5 nodes:
Where
exp1_5n_non_colocated_p2p_disabled: before the fix, running withNCCL_P2P_DISABLE=1.exp2_5n_non_colocated_fix: after this pr's fix.We can see that:
Usage
The fix automatically applies when using distributed training with vLLM generation workers. No user action required.
Additional Information
This PR works for both the current
vllm==0.9.0and also new versions likevllm>=0.9.1rc1.If we upgrade our version, we can remove the additional environment variable setting in
nemo_rl/models/generation/vllm_backend.py.