[cpu/arm64] support run sglang on arm64 cpu (#14867)

This commit is contained in:
Yibo Cai
2026-01-11 04:27:19 -08:00
committed by GitHub
parent f9fc50acd6
commit 2f4a6addf3
5 changed files with 17 additions and 26 deletions
-12
View File
@@ -378,15 +378,3 @@ def get_cross_encoder_activation_function(config: PretrainedConfig):
else:
# adapt bge-reranker
return nn.Identity()
if not (
_is_cuda or _is_npu or (_is_cpu and _is_cpu_amx_available) or _is_hip or _is_xpu
):
logger.info(
"sgl-kernel is not available on Non-NV, Non-AMD platforms or Non-AMX CPUs. Fallback to other kernel libraries."
)
from vllm.model_executor.layers.activation import ( # noqa: F401
GeluAndMul,
SiluAndMul,
)
-9
View File
@@ -502,12 +502,3 @@ class Gemma3RMSNorm(MultiPlatformOp):
def extra_repr(self):
return f"{tuple(self.weight.shape)}, eps={self.eps}"
if not (
_is_cuda or _is_hip or _is_npu or (_is_cpu and _is_cpu_amx_available) or _is_xpu
):
logger.info(
"sgl-kernel layernorm implementation is not available on current platform. Fallback to other kernel libraries."
)
from vllm.model_executor.layers.layernorm import GemmaRMSNorm, RMSNorm # noqa: F401
+1 -1
View File
@@ -116,7 +116,7 @@ class RotaryEmbedding(MultiPlatformOp):
if (
(not (_is_cuda or _is_npu) or self.head_size not in [64, 128, 256, 512])
and not (_is_cpu and _is_cpu_amx_available)
and not (_is_cpu)
and not (_is_xpu)
):
if _is_cuda or _is_hip: