Description: This operator is used for permutation computation in MoE. It passes tokens and expert labels as
[object Object]and sorts the tokens and optional[object Object]based on routingMap after broadcasting them.Formula:
[object Object]indicates the size of the zeroth dimension of[object Object], and[object Object]indicates the size of the first dimension of[object Object]. When[object Object]is set to[object Object]:If
[object Object]is not set to[object Object]:When
[object Object]is set to[object Object]:If
[object Object]is not set to[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.
Parameters:
[object Object]Returns:
aclnnStatus: status code. For details, see [object Object]aclnn Return Codes[object Object].
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 values of
[object Object]and[object Object]must be less than[object Object]. When[object Object]is set to[object Object], the number of 1s or[object Object]values in each row of[object Object]is fixed and less than[object Object].
The following example is for reference only. For details, see .