Skip to content

Speed up model parallel initialization #1662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alexqdh
Copy link

@alexqdh alexqdh commented Jul 2, 2025

The process groups are created on all ranks regardless of whether the current rank was actually part of that group. This is extremely time-consuming, especially during large-scale distributed training. By default, in torch groups should be created in the same order in all processes.

Parameter use_local_synchronization=True is added to all create_group() calls to enable local synchronization optimization, which can further improve performance during group creation. After modification, process groups are now only created when the current rank is actually part of the group (if rank in ranks:).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants