Skip to content

Commit 68bb122

Browse files
authored
[MISC] Make GroupCoordinator compatible with out-of-tree devices (#16464)
Signed-off-by: [email protected] <[email protected]>
1 parent d9fc8cd commit 68bb122

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vllm/distributed/parallel_state.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,11 @@ def __init__(
194194

195195
from vllm.platforms import current_platform
196196

197-
# TODO: fix it for other platforms
198197
if current_platform.is_cuda_alike():
199198
self.device = torch.device(f"cuda:{local_rank}")
199+
elif current_platform.is_out_of_tree():
200+
self.device = torch.device(
201+
f"{current_platform.device_name}:{local_rank}")
200202
else:
201203
self.device = torch.device("cpu")
202204

0 commit comments

Comments
 (0)