Revert "Use device_id in dist init to reduce NCCL communicator warmup & creation overhead" (#5786)

This commit is contained in:
Lianmin Zheng
2025-04-27 04:03:02 -07:00
committed by GitHub
parent 005aad32ad
commit 9c088829ee

View File

@@ -1055,11 +1055,6 @@ def init_distributed_environment(
world_size=world_size,
rank=rank,
timeout=timeout,
device_id=torch.device(
f"cuda:{torch.cuda.current_device()}"
if hasattr(torch, "cuda") and torch.cuda.is_available()
else None
), # Allow NCCL to eagerly init communicator
)
# set the local rank