- Description: Performs routing on the computation result of .
- Formula: Flattens the input expertIdx with shape [NUM_ROWS, K] into a row for sorting. NUM_ROWS indicates the number of input tokens, and K indicates the number of experts selected by the tokens.
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]
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 value of an element in
[object Object]must be greater than -2**24 and less than or equal to 2**24. Otherwise, precision issues may occur.
The following example is for reference only. For details, see .
[object Object]