diff --git a/.gitignore b/.gitignore index 306c2d163..57b966665 100644 --- a/.gitignore +++ b/.gitignore @@ -270,6 +270,11 @@ sgl-kernel/csrc/**/*_musa/ # MUSA core dump files *.mudmp +# Local-only XPU test: Nemotron-3 Nano 30B-A3B is too large to run in CI +# (requires tp=4; no 4-GPU XPU runner). Kept on disk for local development, +# never tracked/pushed. +test/registered/xpu/test_nvidia_nemotron_3_nano.py + # Others # diffusion 3D outputs *.glb diff --git a/python/sglang/srt/layers/attention/mamba/mamba.py b/python/sglang/srt/layers/attention/mamba/mamba.py index 042cf43dd..0ae2566e5 100644 --- a/python/sglang/srt/layers/attention/mamba/mamba.py +++ b/python/sglang/srt/layers/attention/mamba/mamba.py @@ -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] diff --git a/python/sglang/srt/layers/quantization/unquant.py b/python/sglang/srt/layers/quantization/unquant.py index 9aab8f72c..b21972065 100644 --- a/python/sglang/srt/layers/quantization/unquant.py +++ b/python/sglang/srt/layers/quantization/unquant.py @@ -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