From 9c088829ee2a28263f36d0814fde448c6090b5bc Mon Sep 17 00:00:00 2001 From: Lianmin Zheng Date: Sun, 27 Apr 2025 04:03:02 -0700 Subject: [PATCH] Revert "Use device_id in dist init to reduce NCCL communicator warmup & creation overhead" (#5786) --- python/sglang/srt/distributed/parallel_state.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/python/sglang/srt/distributed/parallel_state.py b/python/sglang/srt/distributed/parallel_state.py index fdde7dde8..e43bc0000 100644 --- a/python/sglang/srt/distributed/parallel_state.py +++ b/python/sglang/srt/distributed/parallel_state.py @@ -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