Description: Fuses LayerNorm with downstream Add and Mul, and adjusts the normalization process through the adaptive parameters scale and shift.
Formula:
LayerNorm calculation formula:
E(x) indicates the input's mean value, and Var(x) indicates the input's variance.
Each operator has calls. First, aclnnAdaLayerNormGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnAdaLayerNorm is called to perform computation.
[object Object]
[object Object]
Parameters
[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]
- Deterministic compute:
- aclnnAdaLayerNorm defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]