- Description: Performs permute computation of MoE. It broadcasts tokens and optional probs based on the indices, sorts them, and slices them based on the range in rangeOptional.
- Formula:
When paddedMode is false, the formula is as follows: topK indicates the number of experts selected for each token. If Indices is two-dimensional, topK is equal to the size of the last dimension of Indices. If Indices is one-dimensional, topK is 1.
When rangeOptional[0] <= sortedIndicesOut[i] < rangeOptional[1]:
When paddedMode is true (not supported currently):
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.
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]
- Deterministic computation:
[object Object]defaults to deterministic implementation.
The following example is for reference only. For details, see .