From 736f1a590714d4f1286fcc764439ad39cca2e8f5 Mon Sep 17 00:00:00 2001 From: liuzhenwei Date: Mon, 6 Jul 2026 16:52:44 +0800 Subject: [PATCH] [XPU] Route mm_prefix models to Triton attention backend (#47688) Signed-off-by: zhenwei-intel --- vllm/platforms/xpu.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vllm/platforms/xpu.py b/vllm/platforms/xpu.py index 867833c9d7..90a5a6b921 100644 --- a/vllm/platforms/xpu.py +++ b/vllm/platforms/xpu.py @@ -148,6 +148,15 @@ class XPUPlatform(Platform): if selected_backend == AttentionBackendEnum.TRITON_ATTN: logger.info_once("Using Triton backend.") return AttentionBackendEnum.TRITON_ATTN.get_path() + elif attn_selector_config.use_mm_prefix: + # Flash Attention on XPU has no FA4 kernel, so it cannot apply the + # multimodal prefix-LM bidirectional mask. Fall back to Triton + # Attention, which supports mm_prefix. + logger.warning_once( + "Flash Attention on XPU does not support multimodal prefix-LM " + "attention. Falling back to Triton Attention backend." + ) + return AttentionBackendEnum.TRITON_ATTN.get_path() elif dtype == torch.float32: logger.warning_once( "Flash Attention on XPU does not support float32 dtype. "