Skip to content
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

Last refactoring bundle for 0.4 #998

Merged
merged 8 commits into from
Feb 7, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
gang
  • Loading branch information
cbalioglu committed Feb 6, 2025
commit dfe20974355155c553d1bb77f8d38b4dc9df70a8
11 changes: 5 additions & 6 deletions src/fairseq2/gang.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,15 +399,14 @@ def init_root_process_group(

kwargs: dict[str, Any] = {}

# if torch_greater_or_equal(2, 3):
# # Forces NCCL to initialize immediately which enables deterministic
# # behavior.
# kwargs = {"device_id": device}
if torch_greater_or_equal(2, 3):
# Forces NCCL to initialize immediately which enables deterministic
# behavior.
kwargs = {"device_id": device}

# If enabled, uses high priority CUDA streams for NCCL.
if device.type == "cuda" and high_priority:
# pg_options = ProcessGroupNCCL.Options(is_high_priority_stream=True)
pg_options = None
pg_options = ProcessGroupNCCL.Options(is_high_priority_stream=True)
else:
pg_options = None

Expand Down