[XPU] WA of topk_softmax arg mismatch on XPU (#49395)
Signed-off-by: zhenwei-intel <zhenwei.liu@intel.com>
liuzhenwei committed
Jul 22, 2026 at 16:05 UTC
06da482fb43209978a42262597f9d3107e7302e4
1 file changed
+11
vllm/_custom_ops.py
+11
@@ -2391,6 +2391,17 @@ def topk_softmax(
2391
e_score_correction_bias: torch.Tensor | None = None,
2392
is_padding: torch.Tensor | None = None,
2393
) -> None:
2394
+ if current_platform.is_xpu():
2395
+ # TODO: Remove after vllm-xpu-kernels supports is_padding.
2396
+ torch.ops._moe_C.topk_softmax(
2397
+ topk_weights,
2398
+ topk_ids,
2399
+ token_expert_indices,
2400
+ gating_output,
2401
+ renormalize,
2402
+ e_score_correction_bias,
2403
+ )
2404
+ return
2405
torch.ops._moe_C.topk_softmax(
2406
topk_weights,
2407
topk_ids,