[Feature] Support for Ascend NPU backend (#3853)

Signed-off-by: Song Zhang <gepin.zs@antgroup.com>
Co-authored-by: 22dimensions <waitingwind@foxmail.com>
This commit is contained in:
Song Zhangand22dimensions authored and GitHub committed 2025-05-06 20:32:53 -07:00
1 parent cb69194562
commit 00c2c1f08b
7 files changed
+92 -3

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", "cpu"]:
if device in ["cuda", "xpu", "hpu", "cpu", "npu"]:
self.device_type = device
else:
raise RuntimeError(f"Not supported device type: {device}")