Add 'NPU' to the runtime exception message in get_device (#14225)
Co-authored-by: ronnie_zheng <zl19940307@163.com>
This commit is contained in:
co-authored by
ronnie_zheng
parent
079ac237da
commit
29a2d4b59f
@@ -1840,7 +1840,7 @@ def get_device(device_id: Optional[int] = None) -> str:
|
|||||||
"Habana frameworks detected, but failed to import 'habana_frameworks.torch.hpu'."
|
"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)
|
@lru_cache(maxsize=1)
|
||||||
|
|||||||
Reference in New Issue
Block a user