Add 'NPU' to the runtime exception message in get_device (#14225)

Co-authored-by: ronnie_zheng <zl19940307@163.com>
This commit is contained in:
Raul Torres
2025-12-04 14:34:31 +00:00
committed by GitHub
parent 079ac237da
commit 29a2d4b59f

View File

@@ -1840,7 +1840,7 @@ def get_device(device_id: Optional[int] = None) -> str:
"Habana frameworks detected, but failed to import 'habana_frameworks.torch.hpu'."
)
raise RuntimeError("No accelerator (CUDA, XPU, HPU) is available.")
raise RuntimeError("No accelerator (CUDA, XPU, HPU, NPU) is available.")
@lru_cache(maxsize=1)