diff --git a/3rdparty/amd/wheel/sglang/pyproject.toml b/3rdparty/amd/wheel/sglang/pyproject.toml index 54a04235b..582a03c80 100644 --- a/3rdparty/amd/wheel/sglang/pyproject.toml +++ b/3rdparty/amd/wheel/sglang/pyproject.toml @@ -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", diff --git a/python/pyproject_other.toml b/python/pyproject_other.toml index 962c10b59..52f04854d 100755 --- a/python/pyproject_other.toml +++ b/python/pyproject_other.toml @@ -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", diff --git a/python/sglang/jit_kernel/utils.py b/python/sglang/jit_kernel/utils.py index 2bd0390fb..1f6783ad0 100644 --- a/python/sglang/jit_kernel/utils.py +++ b/python/sglang/jit_kernel/utils.py @@ -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 diff --git a/sgl-kernel/pyproject_musa.toml b/sgl-kernel/pyproject_musa.toml index c7c182d3e..95c31ad27 100644 --- a/sgl-kernel/pyproject_musa.toml +++ b/sgl-kernel/pyproject_musa.toml @@ -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"