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 2, 02:15 UTC
[XPU]fallback to TRITON_ATTN for vit attn on xpu when use float32 dtype (#43759)
Signed-off-by: Yan Ma <yan.ma@intel.com> Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
Yan Ma committed
Jun 3, 2026 at 18:20 UTC
02564b4de069a02d9f6abca57ebfd49115eaae39
1 file changed
+7
vllm/platforms/xpu.py
+7
@@ -110,6 +110,13 @@ class XPUPlatform(Platform):
110
dtype: torch.dtype,
111
backend: "AttentionBackendEnum | None" = None,
112
) -> "AttentionBackendEnum":
113
+ if dtype == torch.float32:
114
+ logger.warning_once(
115
+ "Flash Attention on XPU does not support float32 dtype. "
116
+ "Falling back to Triton Attention backend for vit attention."
117
+ )
118
+ return AttentionBackendEnum.TRITON_ATTN
119
+
120
if backend is not None:
121
assert backend in cls.get_supported_vit_attn_backends(), (
122
f"Backend {backend} is not supported for vit attention. "