[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:
co-authored by
popsiclexu
R0CKSTAR
parent
f4eac50389
commit
be32df33b9
+1
-1
@@ -123,7 +123,7 @@ srt_musa = [
|
|||||||
"sglang[runtime_common]",
|
"sglang[runtime_common]",
|
||||||
"torch",
|
"torch",
|
||||||
"torch_musa",
|
"torch_musa",
|
||||||
"torchada>=0.1.56",
|
"torchada>=0.1.57",
|
||||||
"mthreads-ml-py",
|
"mthreads-ml-py",
|
||||||
"mate>=0.2.0",
|
"mate>=0.2.0",
|
||||||
"deep-gemm>=0.1.3",
|
"deep-gemm>=0.1.3",
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ srt_musa = [
|
|||||||
"sglang[runtime_common]",
|
"sglang[runtime_common]",
|
||||||
"torch",
|
"torch",
|
||||||
"torch_musa",
|
"torch_musa",
|
||||||
"torchada>=0.1.56",
|
"torchada>=0.1.57",
|
||||||
"mthreads-ml-py",
|
"mthreads-ml-py",
|
||||||
"mate>=0.2.0",
|
"mate>=0.2.0",
|
||||||
"deep-gemm>=0.1.3",
|
"deep-gemm>=0.1.3",
|
||||||
|
|||||||
@@ -115,6 +115,12 @@ def is_hip_runtime() -> bool:
|
|||||||
return bool(torch.version.hip)
|
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 make_cpp_args(*args: CPP_TEMPLATE_TYPE) -> CPPArgList:
|
||||||
def _convert(arg: CPP_TEMPLATE_TYPE) -> str:
|
def _convert(arg: CPP_TEMPLATE_TYPE) -> str:
|
||||||
if isinstance(arg, bool):
|
if isinstance(arg, bool):
|
||||||
@@ -318,7 +324,7 @@ def get_jit_cuda_arch() -> ArchInfo:
|
|||||||
|
|
||||||
@cache_once
|
@cache_once
|
||||||
def is_arch_support_pdl() -> bool:
|
def is_arch_support_pdl() -> bool:
|
||||||
if is_hip_runtime():
|
if is_hip_runtime() or is_musa_runtime():
|
||||||
return False
|
return False
|
||||||
return get_jit_cuda_arch().major >= 9
|
return get_jit_cuda_arch().major >= 9
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ requires = [
|
|||||||
"setuptools>=75.0",
|
"setuptools>=75.0",
|
||||||
"scikit-build-core>=0.10",
|
"scikit-build-core>=0.10",
|
||||||
"torch",
|
"torch",
|
||||||
"torchada>=0.1.56",
|
"torchada>=0.1.57",
|
||||||
"wheel",
|
"wheel",
|
||||||
]
|
]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|||||||
Reference in New Issue
Block a user