[BUGFIX][XPU] fix xpu flash_attn_varlen_func interface (#45110)
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||||
|
|
||||||
|
from collections.abc import Callable
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
@@ -783,6 +784,8 @@ class xpu_ops:
|
|||||||
return_softmax_lse: bool | None = False,
|
return_softmax_lse: bool | None = False,
|
||||||
s_aux: torch.Tensor | None = None,
|
s_aux: torch.Tensor | None = None,
|
||||||
return_attn_probs: bool | None = False,
|
return_attn_probs: bool | None = False,
|
||||||
|
mask_mod: Callable | None = None,
|
||||||
|
aux_tensors: list | None = None,
|
||||||
):
|
):
|
||||||
assert cu_seqlens_k is not None or seqused_k is not None, (
|
assert cu_seqlens_k is not None or seqused_k is not None, (
|
||||||
"cu_seqlens_k or seqused_k must be provided"
|
"cu_seqlens_k or seqused_k must be provided"
|
||||||
|
|||||||
Reference in New Issue
Block a user