From 29799ddacc9234591ce33e0e8e818fae20565a10 Mon Sep 17 00:00:00 2001 From: "Li, Jiang" Date: Thu, 11 Sep 2025 13:28:41 +0800 Subject: [PATCH] [Bugfix] Add missing VIT backend dispatch on CPU (#24623) Signed-off-by: jiang1.li --- vllm/attention/layer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vllm/attention/layer.py b/vllm/attention/layer.py index be4dc3eb3c0da..bb05b468fd102 100644 --- a/vllm/attention/layer.py +++ b/vllm/attention/layer.py @@ -399,7 +399,8 @@ class MultiHeadAttention(nn.Module): key, value, scale=self.scale) - elif self.attn_backend == _Backend.TORCH_SDPA: + elif (self.attn_backend == _Backend.TORCH_SDPA + or self.attn_backend == _Backend.TORCH_SDPA_VLLM_V1): query, key, value = (x.transpose(1, 2) for x in (query, key, value)) out = F.scaled_dot_product_attention(query,