[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Performs routing on the computation result of , and then quantizes the result.
  • Formula: Flattens the input [object Object] with shape [NUM_ROWS, K] into a row for sorting, where NUM_ROWS is the number of input tokens and K is the number of experts selected for the tokens.expandedExpertIdxOut,sortedRowIdx=keyValueSort(expertIdx,rowIdx)expandedExpertIdxOut,sortedRowIdx=keyValueSort(expertIdx,rowIdx) expandedRowIdxOut[sortedRowIdx[i]]=iexpandedRowIdxOut[sortedRowIdx[i]]=i expandedXOut[i]=quant(x[sortedRowIdx[i]%NUMROWS)]expandedXOut[i]=quant(x[sortedRowIdx[i]\%NUM_ROWS)]
[object Object]

Each operator has calls. First, [object Object] is called to obtain 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 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 computation:
    • The default deterministic implementation of [object Object] is used.
[object Object]

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

[object Object]