[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Performs backpropagation of .
  • Formula:gradOutput=[b1b2bN],self=[a11a12a1Na21a22a2NaM1aM2aMN],gelu=[a11a12a1N/2a21a22a2N/2]\text{gradOutput} = \begin{bmatrix} b_1 \\ b_2 \\ \vdots \\ b_N \end{bmatrix}, \quad \text{self} = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1N} \\ a_{21} & a_{22} & \cdots & a_{2N} \\ \vdots & \vdots & \ddots & \vdots \\ a_{M1} & a_{M2} & \cdots & a_{MN} \end{bmatrix}, \quad gelu = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1N/2} \\ a_{21} & a_{22} & \cdots & a_{2N/2} \end{bmatrix} dim=the dimension along which chunk is performed,approximate = ’approximate’\text{dim} = \text{the dimension along which chunk is performed}, \quad \text{approximate = 'approximate'} Output:gradInput=[b1y_gelu1b2y_gelu2bNy_geluN]\text{gradInput} = \begin{bmatrix} b_1 \cdot y\_gelu_1 & b_2 \cdot y\_gelu_2 & \cdots & b_N \cdot y\_gelu_N \end{bmatrix}
[object Object]

Each operator has calls. First, aclnnGeGluBackwardGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnGeGluBackward is called to perform computation.

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

    [object Object]
    • [object Object]Atlas inference products[object Object] and [object Object]Atlas training products[object Object]: The data type can be FLOAT32 or FLOAT16.
  • 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]
  • Deterministic computation:
    • aclnnGeGluBackward defaults to a deterministic implementation.
[object Object]

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

[object Object]