Enable CPU device on SGLang (#2806)

This commit is contained in:
Chunyuan WU authored and GitHub committed 2025-01-16 21:22:53 -08:00
1 parent a8ccacc8b8
commit 63051738a9
13 files changed
+376 -9

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ class DeviceConfig:
device: Optional[torch.device]
def __init__(self, device: str = "cuda") -> None:
if device in ["cuda", "xpu", "hpu"]:
if device in ["cuda", "xpu", "hpu", "cpu"]:
self.device_type = device
else:
raise RuntimeError(f"Not supported device type: {device}")