- Description: Implements the backward propagation of to complete the weighted summation of tokens.
- Formula:
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]Shape symbol description:
- B: batch size
- S: number of tokens
- H: hidden size, that is, the length of each token sequence
- K: topK, that is, the number of experts that process tokens
- A: value of activeNum
- E: number of experts
- C: expert capacity, that is, the threshold of the number of tokens that can be processed by an expert
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]
- Deterministic computation:
[object Object]defaults to deterministic implementation.
The following example is for reference only. For details, see .
[object Object]