- Description: For
[object Object]processed by[object Object], accumulates them back to the original[object Object]. This operator retrieves the input data stored in[object Object]based on the subscripts stored in[object Object]. If[object Object]data exists,[object Object]is multiplied by[object Object]. Then, this operator computes the cumulative sum and outputs the computation result. - Formulas: (1) When probs is not None and paddedMode is true: (2) When probs is not None and paddedMode is false (T is the transpose operation): (3) When probs is None and paddedMode is true: (4) When probs is None and paddedMode is false:
Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor covering 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.
When topK_num <= 512 and paddedMode is false, the number of 1s or true values in each row of routingMap is fixed and less than 512.
The following scenarios will be intercepted in later versions. If a warning is displayed, you are advised to rectify the fault.
- paddedMode is true and topK_num > experts_num.
- paddedMode is true and capacity > tokens_num.
- The data type or shape of routingMap does not meet the requirements.
- The data format of the input tensor is not ND.
The following example is for reference only. For details, see .
[object Object]