[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Performs root mean square layer normalization (RMSNorm), a normalization method widely used in large language models. Unlike LayerNorm, RMSNorm omits mean subtraction. The AddRmsNorm operator fuses the preceding Add operator with RMSNorm to reduce data movement operations.
  • Formula:xi=x1Refi+x2Refix_i=x1Ref_i+x2Ref_i RmsNorm(xi)=1Rms(x)xigammai, where Rms(x)=1ni=1nxi2+epsilon\operatorname{RmsNorm}(x_i)=\frac{1}{\operatorname{Rms}(\mathbf{x})} * x_i * gamma_i, \quad \text { where } \operatorname{Rms}(\mathbf{x})=\sqrt{\frac{1}{n} \sum_{i=1}^n x_i^2+epsilon}
[object Object]

Each operator has calls. First, aclnnInplaceAddRmsNormGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnInplaceAddRmsNorm is called to perform computation.

[object Object]
[object Object]
[object Object]
  • Parameters

    [object Object]
    • [object Object]Atlas inference products[object Object]
      • The data types of x1Ref, x2Ref, and gamma cannot be BFLOAT16.
      • The parameter [object Object] is invalid in current product usage scenarios.
  • Returns

    [object Object]: status code. For details, see .

    The first-phase API implements input parameter validation. The following error codes may be returned.

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns

    aclnnStatus: status code. For details, see .

[object Object]
  • Boundary value scenarios:
    • When the input is [object Object], the output is [object Object].
    • When the input is [object Object], the output is [object Object].
  • Deterministic computation:
    • aclnnInplaceAddRmsNorm defaults to a deterministic implementation.
[object Object]

The following example is for reference only. For details, see .

[object Object]