diff --git a/python/sglang/srt/compilation/weak_ref_tensor.py b/python/sglang/srt/compilation/weak_ref_tensor.py index 3564849c7..21d5f5d10 100644 --- a/python/sglang/srt/compilation/weak_ref_tensor.py +++ b/python/sglang/srt/compilation/weak_ref_tensor.py @@ -2,9 +2,9 @@ from typing import Any, Union import torch -from sglang.srt.utils.common import is_cuda, is_hip, is_npu +from sglang.srt.utils.common import is_cuda, is_hip, is_musa, is_npu -if is_cuda() or is_hip(): +if is_cuda() or is_hip() or is_musa(): from sgl_kernel import weak_ref_tensor elif is_npu(): from torch_npu._C import _weak_ref_tensor as weak_ref_tensor diff --git a/python/sglang/srt/server_args.py b/python/sglang/srt/server_args.py index 3b4659631..a638bf456 100644 --- a/python/sglang/srt/server_args.py +++ b/python/sglang/srt/server_args.py @@ -51,7 +51,6 @@ from sglang.srt.utils.common import ( is_hip, is_hopper_with_cuda_12_3, is_mps, - is_musa, is_no_spec_infer_or_topk_one, is_npu, is_remote_url, @@ -1075,8 +1074,8 @@ class ServerArgs: # 5. Pipeline parallelism if self.pp_size > 1: self.disable_piecewise_cuda_graph = True - # 6. Non-CUDA hardware (AMD, NPU, CPU, MPS, MUSA, XPU, etc.) - if is_hip() or is_npu() or is_cpu() or is_mps() or is_musa() or is_xpu(): + # 6. Non-CUDA hardware (AMD, NPU, CPU, MPS, XPU, etc.) + if is_hip() or is_npu() or is_cpu() or is_mps() or is_xpu(): self.disable_piecewise_cuda_graph = True # 7. MoE A2A backend if self.moe_a2a_backend != "none":