[CPU] layernorm & fused add-layernorm kernels (#14074)
This commit is contained in:
@@ -361,7 +361,12 @@ class LayerNorm(CustomOp):
|
||||
self,
|
||||
x: torch.Tensor,
|
||||
) -> torch.Tensor:
|
||||
return self.forward_native(x)
|
||||
if _is_cpu_amx_available:
|
||||
return torch.ops.sgl_kernel.layernorm_cpu(
|
||||
x, self.weight.data, self.variance_epsilon
|
||||
)
|
||||
else:
|
||||
return self.forward_native(x)
|
||||
|
||||
|
||||
class GemmaRMSNorm(CustomOp):
|
||||
|
||||
Reference in New Issue
Block a user