[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: The GemmaRmsNorm operator is a normalization operation commonly used in foundation models. Compared with the RmsNorm operator, it adds 1 to gamma during computation.
  • Formula:GemmaRmsNorm(xi)=1Rms(x)xi(1+gammai), where Rms(x)=1ni=1nxi2+epsilon\operatorname{GemmaRmsNorm}(x_i)=\frac{1}{\operatorname{Rms}(\mathbf{x})} * x_i * (1 + 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 required workspace size based on the process. Then, [object Object] is called to perform computation.

[object Object]
[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]
[object Object]
  • Parameters

    [object Object]
  • Returns

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

[object Object]
  • Functional dimensions:

    • Supported data types:
      • x, gamma, and yOut support FLOAT32, FLOAT16, and BFLOAT16.
      • rstdOut supports FLOAT32.
    • The can be ND.
  • Unsupported types:

    The instruction does not support DOUBLE.

  • Boundary value scenarios:

    • When the input is Inf, the output is Inf.
    • When the input is NaN, the output is NaN.
  • Data types supported by different platforms:

    [object Object]undefined
  • Deterministic computation:

    • aclnnGemmaRmsNorm defaults to deterministic implementation.
[object Object]

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

[object Object]