diff --git a/setup.py b/setup.py index fcfaa207c17..a802f7af718 100644 --- a/setup.py +++ b/setup.py @@ -332,6 +332,8 @@ def _is_hpu() -> bool: except (ValueError, FileNotFoundError, PermissionError, subprocess.CalledProcessError): is_hpu_available = False + if VLLM_TARGET_DEVICE != "hpu": + return False return is_hpu_available or VLLM_TARGET_DEVICE == "hpu"