[Fix] [NPU] kimi-k3: skip fused gmm1 for situ activation in Ascend runner (#43837)
This commit is contained in:
@@ -12,11 +12,13 @@ from sglang.kernels.jit.utils import (
|
||||
load_jit,
|
||||
make_cpp_args,
|
||||
)
|
||||
from sglang.srt.utils import is_npu
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from tvm_ffi.module import Module
|
||||
|
||||
_THREADS: int = 256
|
||||
_is_npu = is_npu()
|
||||
|
||||
|
||||
@cache_once
|
||||
@@ -35,6 +37,7 @@ def covered(x: torch.Tensor, gate: torch.Tensor) -> bool:
|
||||
return (
|
||||
x.is_cuda
|
||||
and gate.is_cuda
|
||||
and not _is_npu
|
||||
and x.dtype == torch.bfloat16
|
||||
and gate.dtype == torch.bfloat16
|
||||
and x.shape == gate.shape
|
||||
|
||||
@@ -36,6 +36,8 @@ def _uses_fused_gmm1(kernel, config: MoeRunnerConfig) -> bool:
|
||||
# applied (NPUSwigluMxfp8Quant / NPUSwigluStepAndMul below).
|
||||
has_clamp = config.swiglu_limit is not None and config.swiglu_limit > 0
|
||||
|
||||
if config.activation == "situ":
|
||||
return False
|
||||
if not isinstance(kernel, (NPUMXFP8MoEMethod, NPUW4A8MXFP4MoEMethod)):
|
||||
return False
|
||||
if has_clamp:
|
||||
|
||||
Reference in New Issue
Block a user