From 06da482fb43209978a42262597f9d3107e7302e4 Mon Sep 17 00:00:00 2001 From: liuzhenwei Date: Wed, 22 Jul 2026 16:05:01 +0800 Subject: [PATCH] [XPU] WA of topk_softmax arg mismatch on XPU (#49395) Signed-off-by: zhenwei-intel --- vllm/_custom_ops.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vllm/_custom_ops.py b/vllm/_custom_ops.py index f635077a1d..8cd081b741 100644 --- a/vllm/_custom_ops.py +++ b/vllm/_custom_ops.py @@ -2391,6 +2391,17 @@ def topk_softmax( e_score_correction_bias: torch.Tensor | None = None, is_padding: torch.Tensor | None = None, ) -> None: + if current_platform.is_xpu(): + # TODO: Remove after vllm-xpu-kernels supports is_padding. + torch.ops._moe_C.topk_softmax( + topk_weights, + topk_ids, + token_expert_indices, + gating_output, + renormalize, + e_score_correction_bias, + ) + return torch.ops._moe_C.topk_softmax( topk_weights, topk_ids,