[diffusion][llm] macOS support (#19549)

Signed-off-by: Xiaodong Ye <yeahdongcn@gmail.com>
Co-authored-by: Mick <mickjagger19@icloud.com>
This commit is contained in:
R0CKSTAR
2026-03-11 04:11:07 +08:00
committed by GitHub
parent a3d88a247b
commit db97f193b7
22 changed files with 984 additions and 11 deletions

View File

@@ -15,6 +15,7 @@ from sglang.srt.utils import (
is_cpu,
is_cuda,
is_hip,
is_mps,
is_musa,
is_npu,
is_xpu,
@@ -31,6 +32,7 @@ _is_cpu_amx_available = cpu_has_amx_support()
_is_cpu = is_cpu()
_is_xpu = is_xpu()
_is_musa = is_musa()
_is_mps = is_mps()
if _is_cuda:
from sglang.jit_kernel.rope import apply_rope_with_cos_sin_cache_inplace
@@ -70,6 +72,7 @@ class RotaryEmbedding(MultiPlatformOp):
and not (_is_xpu)
and not (_is_npu)
and not (_is_musa)
and not (_is_mps)
):
# rotary_embedding from sglang.jit_kernel.rope and vllm._custom_ops has the same implementation.
# TODO: Test on different devices and remove this conditional.