[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Performs the backpropagation of .
  • Formula:inputGrad=permutedOutputGrad.indexSelect(0,sortedIndices)inputGrad = permutedOutputGrad.indexSelect(0, sortedIndices) inputGrad=inputGrad.reshape(1,topK,hiddenSize)inputGrad = inputGrad.reshape(-1, topK, hiddenSize) inputGrad=inputGrad.sum(dim=1)inputGrad = inputGrad.sum(dim = 1)
[object Object]

Each operator has calls. First, [object Object] is called to obtain the input parameters, the workspace size required for computation, and the executor that contains the operator computation 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]
  • Deterministic computation:

    • [object Object] defaults to deterministic implementation.
  • [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 value of [object Object] is less than or equal to [object Object].

  • Ascend 950PR/Ascend 950DT: When this API is called, the framework internally calls the API. If a parameter error message is displayed, see the following parameter mapping:

    • The permutedOutputGrad input is equivalent to the gradExpandedX input of the aclnnMoeInitRoutingV2Grad API.
    • The sortedIndices input is equivalent to the expandedRowIdx input of the aclnnMoeInitRoutingV2Grad API.
    • The numTopk input is equivalent to the topK input of the aclnnMoeInitRoutingV2Grad API.
    • The paddedMode input is equivalent to the dropPadMode input of the aclnnMoeInitRoutingV2Grad API.
    • The out output is equivalent to the out output of the aclnnMoeInitRoutingV2Grad API.
[object Object]

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

[object Object]