mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-03-28 18:29:08 +08:00
Add TPU to device config
This commit is contained in:
parent
02e614d922
commit
38e3d33a62
@ -596,6 +596,9 @@ class DeviceConfig:
|
||||
# Some device types require processing inputs on CPU
|
||||
if self.device_type in ["neuron"]:
|
||||
self.device = torch.device("cpu")
|
||||
elif self.device_type in ["tpu"]:
|
||||
# Will be set by `xm.xla_device()`
|
||||
self.device = None
|
||||
else:
|
||||
# Set device with device type
|
||||
self.device = torch.device(self.device_type)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user