[MISC] Make GroupCoordinator compatible with out-of-tree devices (#16464)
Signed-off-by: hzji210@gmail.com <hzji210@gmail.com>
This commit is contained in:
parent
d9fc8cd9da
commit
68bb122eb4
@ -194,9 +194,11 @@ class GroupCoordinator:
|
|||||||
|
|
||||||
from vllm.platforms import current_platform
|
from vllm.platforms import current_platform
|
||||||
|
|
||||||
# TODO: fix it for other platforms
|
|
||||||
if current_platform.is_cuda_alike():
|
if current_platform.is_cuda_alike():
|
||||||
self.device = torch.device(f"cuda:{local_rank}")
|
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:
|
else:
|
||||||
self.device = torch.device("cpu")
|
self.device = torch.device("cpu")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user