bugfix: prioritize init_npu_backend to fix various initialization bugs (#17652)
This commit is contained in:
@@ -193,11 +193,6 @@ _is_npu = is_npu()
|
||||
_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",
|
||||
|
||||
@@ -885,7 +885,12 @@ class ServerArgs:
|
||||
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user