[XPU] WA of topk_softmax arg mismatch on XPU (#49395)
Signed-off-by: zhenwei-intel <zhenwei.liu@intel.com>
This commit is contained in:
@@ -2391,6 +2391,17 @@ def topk_softmax(
|
|||||||
e_score_correction_bias: torch.Tensor | None = None,
|
e_score_correction_bias: torch.Tensor | None = None,
|
||||||
is_padding: torch.Tensor | None = None,
|
is_padding: torch.Tensor | None = 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(
|
torch.ops._moe_C.topk_softmax(
|
||||||
topk_weights,
|
topk_weights,
|
||||||
topk_ids,
|
topk_ids,
|
||||||
|
|||||||
Reference in New Issue
Block a user