- 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:
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.
Parameters
[object Object]- [object Object]Atlas inference products[object Object]: The data types of
[object Object],[object Object]and[object Object]cannot be BFLOAT16.
- [object Object]Atlas inference products[object Object]: The data types of
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]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.
The following example is for reference only. For details, see .