[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: The RmsNorm operator is a normalization operation commonly used in foundation models. Compared with the LayerNorm operator, the RmsNorm operator removes the part of subtracting the mean value.
  • Formula: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, [object Object] is called to obtain the input parameters and compute the workspace size required by the process. Then, [object Object] 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 [object Object], [object Object] and [object Object] cannot be BFLOAT16.
  • Returns

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

    The first-phase API implements input parameter verification. The following errors may be thrown:

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns

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

[object Object]
  • [object Object]Atlas inference products[object Object]: The length of the last axis of the inputs x and gamma must be greater than or equal to 32 bytes.

  • Description of boundary value scenarios:

    • [object Object]Atlas inference products[object Object]: The input cannot contain Inf or NaN.
    • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object], [object Object]Atlas A3 training products/Atlas A3 inference products[object Object], and Ascend 950 PR/Ascend 950 DT: When the input is Inf, the output is Inf. When the input is NaN, the output is NaN.
  • Description of data types supported by different platforms:

    • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object], [object Object]Atlas A3 training products/Atlas A3 inference products[object Object], and Ascend 950 PR/Ascend 950 DT:

      [object Object]undefined
    • [object Object]Atlas inference products[object Object]:

      [object Object]undefined
  • Deterministic compute:

    • aclnnRmsNorm defaults to a deterministic implementation.
[object Object]

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

[object Object]