[cpu/arm64] support run sglang on arm64 cpu (#14867)
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user