Home / Function/ layernorm_ref() — pytorch Function Reference

layernorm_ref() — pytorch Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  7f08e9ae_5ab7_6b54_e9d5_a34f8e037133["layernorm_ref()"]
  e5a28a86_38cc_d5f9_6155_e07365660a34["layernorm_ref()"]
  e5a28a86_38cc_d5f9_6155_e07365660a34 -->|calls| 7f08e9ae_5ab7_6b54_e9d5_a34f8e037133
  fc3c62fa_4ffc_e8d4_5ee1_c74572a1d012["eager()"]
  fc3c62fa_4ffc_e8d4_5ee1_c74572a1d012 -->|calls| 7f08e9ae_5ab7_6b54_e9d5_a34f8e037133
  e5a28a86_38cc_d5f9_6155_e07365660a34["layernorm_ref()"]
  7f08e9ae_5ab7_6b54_e9d5_a34f8e037133 -->|calls| e5a28a86_38cc_d5f9_6155_e07365660a34
  style 7f08e9ae_5ab7_6b54_e9d5_a34f8e037133 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

benchmarks/dynamo/genai_layers/kernels.py lines 676–678

    def layernorm_ref(self, x: torch.Tensor, w: torch.Tensor, eps: float = 1e-6):
        x_f32 = x.float()
        return F.layer_norm(x_f32, w.shape, w, None, eps).to(x.dtype)

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free