[MUSA] Fix startup with patched torchada (#26437)

Co-authored-by: popsiclexu <zhenxue.xu@mthreads.com>
Co-authored-by: R0CKSTAR <xiaodong.ye@mthreads.com>
This commit is contained in:
popsiclexu
2026-05-28 20:57:55 +08:00
committed by GitHub
co-authored by popsiclexu R0CKSTAR
parent f4eac50389
commit be32df33b9
4 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ srt_musa = [
"sglang[runtime_common]",
"torch",
"torch_musa",
"torchada>=0.1.56",
"torchada>=0.1.57",
"mthreads-ml-py",
"mate>=0.2.0",
"deep-gemm>=0.1.3",
+1 -1
View File
@@ -115,7 +115,7 @@ srt_musa = [
"sglang[runtime_common]",
"torch",
"torch_musa",
"torchada>=0.1.56",
"torchada>=0.1.57",
"mthreads-ml-py",
"mate>=0.2.0",
"deep-gemm>=0.1.3",
+7 -1
View File
@@ -115,6 +115,12 @@ def is_hip_runtime() -> bool:
return bool(torch.version.hip)
# MThreads/MUSA note:
@cache_once
def is_musa_runtime() -> bool:
return hasattr(torch.version, "musa") and torch.version.musa is not None
def make_cpp_args(*args: CPP_TEMPLATE_TYPE) -> CPPArgList:
def _convert(arg: CPP_TEMPLATE_TYPE) -> str:
if isinstance(arg, bool):
@@ -318,7 +324,7 @@ def get_jit_cuda_arch() -> ArchInfo:
@cache_once
def is_arch_support_pdl() -> bool:
if is_hip_runtime():
if is_hip_runtime() or is_musa_runtime():
return False
return get_jit_cuda_arch().major >= 9
+1 -1
View File
@@ -3,7 +3,7 @@ requires = [
"setuptools>=75.0",
"scikit-build-core>=0.10",
"torch",
"torchada>=0.1.56",
"torchada>=0.1.57",
"wheel",
]
build-backend = "setuptools.build_meta"