From 29a2d4b59fc75b0751cd158da53b1733b8b1068c Mon Sep 17 00:00:00 2001 From: Raul Torres <138264735+rauletorresc@users.noreply.github.com> Date: Thu, 4 Dec 2025 14:34:31 +0000 Subject: [PATCH] Add 'NPU' to the runtime exception message in `get_device` (#14225) Co-authored-by: ronnie_zheng --- python/sglang/srt/utils/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/utils/common.py b/python/sglang/srt/utils/common.py index 789e918f7..08a13f604 100644 --- a/python/sglang/srt/utils/common.py +++ b/python/sglang/srt/utils/common.py @@ -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)