From 37bf988c2f8de10165e279fff652e9d818556fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ganczarenko?= Date: Mon, 20 Jul 2026 09:25:56 +0200 Subject: [PATCH] [XPU][Bugfix] Fix GroupCoordinator device_index (#47295) Signed-off-by: Michal Ganczarenko Co-authored-by: Kunshang Ji --- vllm/distributed/parallel_state.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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