[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Performs backpropagation of aclnnMoeFinalizeRoutingV2.
  • Formulas:i:0RK1i : 0 \sim R * K - 1 j:0Hj : 0 \sim H (1) [object Object] is a null pointer:gradExpandedXOut[expandedRowIdx[i]][j]=gradY[i/K][j]gradExpandedXOut[expandedRowIdx[i]][j] = gradY[i / K][j] (2) [object Object] is not a null pointer, and [object Object] is a null pointer:gradExpandedXOut[expandedRowIdx[i]][j]=gradY[i/K][j]scalesOptional[i/K][i%K]gradExpandedXOut[expandedRowIdx[i]][j] = gradY[i / K][j] * scalesOptional[i / K][i \% K] gradScalesOut[i]=sum(expandedXOptional[expandedRowIdx[i]][j]gradY[i/K][j])gradScalesOut[i] = sum(expandedXOptional[expandedRowIdx[i]][j] * gradY[i / K][j]) (3) [object Object] and [object Object] are not null pointers:gradExpandedXOut[expandedRowIdx[i]][j]=gradY[i/K][j]scalesOptional[i/K][i%K]gradExpandedXOut[expandedRowIdx[i]][j] = gradY[i / K][j] * scalesOptional[i / K][i \% K] gradScalesOut[i]=sum((expandedXOptional[expandedRowIdx[i]][j]+biasOptional[expertIdxOptional[i]][j])gradY[i/K][j])gradScalesOut[i] = sum((expandedXOptional[expandedRowIdx[i]][j] + biasOptional[expertIdxOptional[i]][j]) * gradY[i / K][j]) R indicates batch x sequence, H indicates hidden, and K indicates topK.
[object Object]

Each operator consists of . You must first call the [object Object] API to obtain the required workspace size and the executor that contains the operator computation flow, and then call the [object Object] API to execute the computation.

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

    [object Object]
    • [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]:
      • The data type of scalesOptional must be the same as that of gradY.
    • Ascend 950PR/Ascend 950DT:
      • The data type of scalesOptional can be different from that of gradY.
  • Returns:

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

    The first-phase API implements input parameter validation. The following error codes may be returned.

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns:

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

[object Object]
  • Deterministic computing:
    • [object Object] defaults to a deterministic implementation.
[object Object]

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

[object Object]