Home / Function/ rms_norm_ref() — pytorch Function Reference

rms_norm_ref() — pytorch Function Reference

Architecture documentation for the rms_norm_ref() function in kernels.py from the pytorch codebase.

Entity Profile

Dependency Diagram

graph TD
  ca055034_d94c_dc37_1965_ddd3537c220d["rms_norm_ref()"]
  64a4f8ff_baf4_3c9a_cbdf_a34032e1e46b["eager()"]
  64a4f8ff_baf4_3c9a_cbdf_a34032e1e46b -->|calls| ca055034_d94c_dc37_1965_ddd3537c220d
  2b63d71e_33f7_1a73_5259_ed1e703de26b["rms_norm_ref()"]
  2b63d71e_33f7_1a73_5259_ed1e703de26b -->|calls| ca055034_d94c_dc37_1965_ddd3537c220d
  3a2f2893_5914_e379_2f43_005a0538e035["eager()"]
  3a2f2893_5914_e379_2f43_005a0538e035 -->|calls| ca055034_d94c_dc37_1965_ddd3537c220d
  2b63d71e_33f7_1a73_5259_ed1e703de26b["rms_norm_ref()"]
  ca055034_d94c_dc37_1965_ddd3537c220d -->|calls| 2b63d71e_33f7_1a73_5259_ed1e703de26b
  style ca055034_d94c_dc37_1965_ddd3537c220d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

benchmarks/dynamo/genai_layers/kernels.py lines 381–387

    def rms_norm_ref(self, x, w):
        x_f32 = x.float()
        return (
            x_f32
            * torch.rsqrt(torch.mean(x_f32.square(), dim=-1, keepdim=True) + 1e-6)
            * w
        ).to(x.dtype)

Subdomains

Frequently Asked Questions

What does rms_norm_ref() do?
rms_norm_ref() is a function in the pytorch codebase.
What does rms_norm_ref() call?
rms_norm_ref() calls 1 function(s): rms_norm_ref.
What calls rms_norm_ref()?
rms_norm_ref() is called by 3 function(s): eager, eager, rms_norm_ref.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free