- 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. The AddRmsNorm operator integrates the Add operator before RmsNorm to reduce the move-in and move-out operations.
- Formula:
Each operator has calls. First, [object Object] is called to obtain the input parameters and compute the required workspace size based on the process. Then, [object Object] is called to perform computation.
Parameters
[object Object][object Object]Atlas inference products[object Object]:
- The data types of the
[object Object],[object Object],[object Object],[object Object], and[object Object]parameters cannot be BFLOAT16. - The
[object Object]parameter is invalid in the current product.
- The data types of the
Ascend 950PR/Ascend 950DT:
The shape of the
[object Object]parameter must be the same as that of the last several dimensions of[object Object]. The last several dimensions are the dimensions that need to be normalized by[object Object].
Returns:
[object Object]: status code. For details, see .The first-phase API implements input parameter verification. The following errors may be thrown.
[object Object]
Parameters
[object Object]Returns:
aclnnStatus: status code. (For details, see [aclnn Return Codes](../common/aclnn Return Codes.md).)
Description of boundary value scenarios:
- When the input is Inf, the output is Inf.
- When the input is NaN, the output is NaN.
The supported combinations of x1, x2, gamma, yOut, rstdOut, and xOut are as follows:
[object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]:
[object Object]undefined
[object Object]Atlas inference products[object Object]:
[object Object]undefined
Deterministic compute:
- aclnnAddRmsNorm defaults to a deterministic implementation.
The following example is for reference only. For details, see .