[ROCm][CI] add Aiter ops tests (#52208)
Signed-off-by: Divakar Verma <divakar.verma@amd.com>
This commit is contained in:
@@ -2340,6 +2340,35 @@ class rocm_aiter_ops:
|
||||
def get_fused_mla_dual_rms_norm_per_token_quant_op() -> OpOverload:
|
||||
return torch.ops.vllm.fused_mla_dual_rms_norm_per_token_quant.default
|
||||
|
||||
@staticmethod
|
||||
def rms_norm(
|
||||
x: torch.Tensor,
|
||||
weight: torch.Tensor,
|
||||
epsilon: float,
|
||||
) -> torch.Tensor:
|
||||
"""RMSNorm via AITER kernel."""
|
||||
import aiter
|
||||
|
||||
return aiter.rms_norm(x, weight, epsilon)
|
||||
|
||||
@staticmethod
|
||||
def rms_norm2d_with_add(
|
||||
x: torch.Tensor,
|
||||
residual: torch.Tensor,
|
||||
weight: torch.Tensor,
|
||||
epsilon: float,
|
||||
) -> tuple[torch.Tensor, torch.Tensor]:
|
||||
"""Fused residual-add + RMSNorm via AITER kernel.
|
||||
|
||||
Returns (normalized_output, residual_sum).
|
||||
"""
|
||||
import aiter
|
||||
|
||||
out = torch.empty_like(x)
|
||||
residual_out = torch.empty_like(x)
|
||||
aiter.rmsnorm2d_fwd_with_add(out, x, residual, residual_out, weight, epsilon, 0)
|
||||
return out, residual_out
|
||||
|
||||
@staticmethod
|
||||
def w8a8_gemm(
|
||||
A: torch.Tensor,
|
||||
|
||||
Reference in New Issue
Block a user