diff --git a/vllm/distributed/parallel_state.py b/vllm/distributed/parallel_state.py index f0647323e6..b3545d54b4 100644 --- a/vllm/distributed/parallel_state.py +++ b/vllm/distributed/parallel_state.py @@ -400,13 +400,10 @@ class GroupCoordinator: self.rank = torch.distributed.get_rank() self.local_rank = local_rank self.device_index: int - if _WORLD is not None: - self.device_index = _WORLD.device_index - else: - assert local_rank >= 0, ( - "local_rank must be provided when creating the world group" - ) - self.device_index = local_rank + assert local_rank >= 0, ( + "local_rank must be provided when creating the world group" + ) + self.device_index = local_rank self_device_group = None self_cpu_group = None