[Perf] Optimize batch invariant with fused rms norm, 2.1% E2E latency improvement (#40413)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
@@ -420,6 +420,7 @@ def rms_norm(
|
||||
def fused_add_rms_norm(
|
||||
input: torch.Tensor, residual: torch.Tensor, weight: torch.Tensor, epsilon: float
|
||||
) -> None:
|
||||
# Note: this func is batch invariant
|
||||
torch.ops._C.fused_add_rms_norm(input, residual, weight, epsilon)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user