Revert "bugfix: prioritize init_npu_backend to fix various initialization bugs" (#19343)
This commit is contained in:
@@ -194,6 +194,11 @@ _is_npu = is_npu()
|
|||||||
_is_cpu_amx_available = cpu_has_amx_support()
|
_is_cpu_amx_available = cpu_has_amx_support()
|
||||||
_is_cpu_arm64 = is_host_cpu_arm64()
|
_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 = [
|
MLA_ATTENTION_BACKENDS = [
|
||||||
"aiter",
|
"aiter",
|
||||||
"flashinfer",
|
"flashinfer",
|
||||||
|
|||||||
@@ -891,12 +891,7 @@ class ServerArgs:
|
|||||||
|
|
||||||
def _handle_npu_backends(self):
|
def _handle_npu_backends(self):
|
||||||
if self.device == "npu":
|
if self.device == "npu":
|
||||||
from sglang.srt.hardware_backend.npu.utils import (
|
from sglang.srt.hardware_backend.npu.utils import set_default_server_args
|
||||||
init_npu_backend,
|
|
||||||
set_default_server_args,
|
|
||||||
)
|
|
||||||
|
|
||||||
init_npu_backend()
|
|
||||||
|
|
||||||
set_default_server_args(self)
|
set_default_server_args(self)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user