From 6951fcd44fdd8a3a4d6b39b19b000604885a295f Mon Sep 17 00:00:00 2001 From: Huanxing Date: Fri, 20 Mar 2026 13:30:15 +0800 Subject: [PATCH] [XPU] Automatically detect target platform as XPU in build. (#37634) Signed-off-by: huanxing --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index 68861fe4b..7b5c49e98 100644 --- a/setup.py +++ b/setup.py @@ -54,6 +54,9 @@ elif sys.platform.startswith("linux") and os.getenv("VLLM_TARGET_DEVICE") is Non if torch.version.hip is not None: VLLM_TARGET_DEVICE = "rocm" logger.info("Auto-detected ROCm") + elif torch.version.xpu is not None: + VLLM_TARGET_DEVICE = "xpu" + logger.info("Auto-detected XPU") elif torch.version.cuda is not None: VLLM_TARGET_DEVICE = "cuda" logger.info("Auto-detected CUDA")