[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Implements the AddLayerNorm function.
  • Formula:x=x1+x2+biasOptionalx = x1 + x2 + biasOptional rstd=1Var(x)+epsilonrstd = {{1}\over\sqrt {Var(x)+epsilon}} y=(xE(x))rstdgamma+betay = (x-E(x)) * rstd * gamma + beta Where, E(x) indicates the mean value and Var(x) indicates the variance. Both the mean value and variance must be calculated within the operator.
[object Object]

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.

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

    [object Object]
    • [object Object]Atlas inference products[object Object]:
      • The data types of the [object Object], [object Object], [object Object], [object Object], [object Object], [object Object], and [object Object] parameters cannot be BFLOAT16.
      • The [object Object] and [object Object] parameters are invalid in the current product.
  • 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]
  • Function dimension

    • The supported data types are as follows:
      • [object Object]Atlas inference products[object Object]: x1, x2, beta, gamma, and biasOptional support FLOAT32 and FLOAT16.
      • [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]: x1, x2, beta, gamma, and biasOptional support FLOAT32, FLOAT16, and BFLOAT16.
      • rstdOut and meanOut support FLOAT32.
    • The data format can be ND.
    • [object Object]Atlas inference products[object Object]: The length of the last axis of the inputs x1, x2, beta, gamma, and biasOptional must be greater than or equal to 32 bytes.
  • Description of unsupported types

    • DOUBLE: DOUBLE is not supported.
  • Description of boundary value scenarios

    • 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 products

    • [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:

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

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

[object Object]