Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions python/sglang/srt/model_executor/model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,6 @@
_is_cpu_amx_available = cpu_has_amx_support()
_is_cpu_arm64 = is_host_cpu_arm64()

if _is_npu:
from sglang.srt.hardware_backend.npu.utils import init_npu_backend

init_npu_backend()

MLA_ATTENTION_BACKENDS = [
"aiter",
"flashinfer",
Expand Down
7 changes: 6 additions & 1 deletion python/sglang/srt/server_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,12 @@ def _handle_cpu_backends(self):

def _handle_npu_backends(self):
if self.device == "npu":
from sglang.srt.hardware_backend.npu.utils import set_default_server_args
from sglang.srt.hardware_backend.npu.utils import (
init_npu_backend,
set_default_server_args,
)

init_npu_backend()

set_default_server_args(self)

Expand Down
Loading