[XPU] Enable NVIDIA-Nemotron-3-Nano-30B-A3B-BF16 on Intel XPU backend (#24390)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Yao Matrix <matrix.yao@intel.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
gemini-code-assist[bot]
Yao Matrix
parent
71e8258783
commit
ea66b2cca7
@@ -35,6 +35,7 @@ from sglang.srt.utils import (
|
||||
is_cpu,
|
||||
is_cuda,
|
||||
is_npu,
|
||||
is_xpu,
|
||||
set_weight_attrs,
|
||||
)
|
||||
|
||||
@@ -56,6 +57,22 @@ elif is_npu():
|
||||
from sgl_kernel_npu.mamba.causal_conv1d import (
|
||||
causal_conv1d_update_npu as causal_conv1d_update,
|
||||
)
|
||||
elif is_xpu():
|
||||
# XPU has no native causal_conv1d kernel yet; use the portable Triton
|
||||
# implementation for both the "native" and the "_triton" entry points so
|
||||
# `causal_conv1d_fn` / `causal_conv1d_fn_triton` are always bound on XPU.
|
||||
from sglang.srt.layers.attention.mamba.causal_conv1d_triton import (
|
||||
causal_conv1d_fn as causal_conv1d_fn,
|
||||
)
|
||||
from sglang.srt.layers.attention.mamba.causal_conv1d_triton import (
|
||||
causal_conv1d_fn as causal_conv1d_fn_triton,
|
||||
)
|
||||
from sglang.srt.layers.attention.mamba.causal_conv1d_triton import (
|
||||
causal_conv1d_update as causal_conv1d_update,
|
||||
)
|
||||
from sglang.srt.layers.attention.mamba.causal_conv1d_triton import (
|
||||
causal_conv1d_update as causal_conv1d_update_triton,
|
||||
)
|
||||
|
||||
LoaderFunction = Callable[[torch.Tensor, torch.Tensor], None]
|
||||
|
||||
|
||||
@@ -635,6 +635,7 @@ class UnquantizedFusedMoEMethod(FusedMoEMethodBase, MultiPlatformOp):
|
||||
assert moe_runner_config.activation in [
|
||||
"silu",
|
||||
"gelu",
|
||||
"relu2", # Nemotron-H (NemotronHForCausalLM) uses squared-ReLU.
|
||||
], f"activation = {moe_runner_config.activation} is not supported."
|
||||
|
||||
backend = self.runner.runner_backend
|
||||
|
||||
Reference in New Issue
Block a user