[MUSA][4/N] Add common device utilities, distributed backend, and custom op wiring (#17246)
Signed-off-by: Xiaodong Ye <xiaodong.ye@mthreads.com>
This commit is contained in:
@@ -11,7 +11,7 @@ class DeviceConfig:
|
||||
gpu_id: Optional[int]
|
||||
|
||||
def __init__(self, device: str = "cuda", gpu_id: int = -1) -> None:
|
||||
if device in ["cuda", "xpu", "hpu", "cpu", "npu"]:
|
||||
if device in ["cuda", "xpu", "hpu", "cpu", "npu", "musa"]:
|
||||
self.device_type = device
|
||||
else:
|
||||
raise RuntimeError(f"Not supported device type: {device}")
|
||||
|
||||
Reference in New Issue
Block a user