From 83f9ce4932247647c7ff91b457a5d72682d68f0d Mon Sep 17 00:00:00 2001 From: "hzji210@gmail.com" Date: Fri, 11 Apr 2025 16:47:18 +0800 Subject: [PATCH 1/2] [Platform] Make GroupCoordinator compatible with out-of-tree devices Signed-off-by: hzji210@gmail.com --- vllm/distributed/parallel_state.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vllm/distributed/parallel_state.py b/vllm/distributed/parallel_state.py index fa493fefb8f0..d1f5e8e5f2db 100644 --- a/vllm/distributed/parallel_state.py +++ b/vllm/distributed/parallel_state.py @@ -197,6 +197,9 @@ def __init__( # TODO: fix it for other platforms if current_platform.is_cuda_alike(): self.device = torch.device(f"cuda:{local_rank}") + elif current_platform.is_out_of_tree(): + self.device = torch.device( + f"{current_platform.device_name}:{local_rank}") else: self.device = torch.device("cpu") From e3dfe13ec60f4ba379ed55069ca043670fc37e4a Mon Sep 17 00:00:00 2001 From: "hzji210@gmail.com" Date: Sat, 12 Apr 2025 14:48:49 +0800 Subject: [PATCH 2/2] remove todo Signed-off-by: hzji210@gmail.com --- vllm/distributed/parallel_state.py | 1 - 1 file changed, 1 deletion(-) diff --git a/vllm/distributed/parallel_state.py b/vllm/distributed/parallel_state.py index d1f5e8e5f2db..e0eeeffb88a7 100644 --- a/vllm/distributed/parallel_state.py +++ b/vllm/distributed/parallel_state.py @@ -194,7 +194,6 @@ def __init__( from vllm.platforms import current_platform - # TODO: fix it for other platforms if current_platform.is_cuda_alike(): self.device = torch.device(f"cuda:{local_rank}") elif current_platform.is_out_of_tree():