Enable CPU device on SGLang (#2806)

This commit is contained in:
Chunyuan WU
2025-01-17 13:22:53 +08:00
committed by GitHub
parent a8ccacc8b8
commit 63051738a9
13 changed files with 376 additions and 9 deletions

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}")