Enable CPU device on SGLang (#2806)
This commit is contained in:
@@ -82,6 +82,8 @@ class TpModelWorkerClient:
|
||||
self.forward_thread.start()
|
||||
self.parent_process = psutil.Process().parent()
|
||||
self.scheduler_stream = torch.get_device_module(self.device).current_stream()
|
||||
if self.device == "cpu":
|
||||
self.scheduler_stream.synchronize = lambda: None # No-op for CPU
|
||||
|
||||
def get_worker_info(self):
|
||||
return self.worker.get_worker_info()
|
||||
|
||||
Reference in New Issue
Block a user