[XPU] Automatically detect target platform as XPU in build. (#37634)
Signed-off-by: huanxing <huanxing.shen@intel.com>
This commit is contained in:
3
setup.py
3
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")
|
||||
|
||||
Reference in New Issue
Block a user