@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 59fe6f298e
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 10, 14:00 UTC

[XPU]fallback to TRITON_ATTN on xpu when use float32 dtype (#31762)

Signed-off-by: sihao.li <sihao.li@intel.com>

sihao_li committed Jan 7, 2026 at 16:10 UTC 59fe6f298e16ee8d2f54e2567b76516807a4733b
1 file changed +7
vllm/platforms/xpu.py
+7
@@ -52,11 +52,18 @@ class XPUPlatform(Platform):
52 "only NHD layout is supported by XPU attention kernels."
53 )
54
55 + dtype = attn_selector_config.dtype
56 if attn_selector_config.use_sparse:
57 raise NotImplementedError("Sparse Attention is not supported on XPU.")
58 if selected_backend == AttentionBackendEnum.TRITON_ATTN:
59 logger.info_once("Using Triton backend.")
60 return AttentionBackendEnum.TRITON_ATTN.get_path()
61 + elif dtype == torch.float32:
62 + logger.warning_once(
63 + "Flash Attention on XPU does not support float32 dtype. "
64 + "Falling back to Triton Attention backend."
65 + )
66 + return AttentionBackendEnum.TRITON_ATTN.get_path()
67 elif selected_backend == AttentionBackendEnum.FLASH_ATTN:
68 logger.info_once("Using Flash Attention backend.")
69 return AttentionBackendEnum.FLASH_ATTN.get_path()