From 9f23dbffda696b0081e47715243b5cca267626fb Mon Sep 17 00:00:00 2001 From: Jani Monoses Date: Mon, 9 Dec 2024 14:53:52 +0200 Subject: [PATCH] Avoid mistakenly picking Gaudi/HPU if XPU is requested. --- setup.py | 2 ++ 1 file changed, 2 insertions(+) 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"