Description: The DenseLightningIndexerSoftmaxLse operator is a branch operator for the DenseLightningIndexerGradKlLoss operator to compute the Softmax input.
Formulas:
maxIndex and sumIndex are transferred to the DenseLightningIndexerGradKlLoss operator as inputs for calculating Softmax.
Each operator has calls. First, [object Object] is called to obtain the input parameters and compute the required workspace size based on the 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 validation. The following error codes may be returned.
[object Object]
The data types of the queryIndex and keyIndex parameters must be the same.
If the weights parameter is not of type float32, the data types of the queryIndex, keyIndex, and weights parameters must be the same.
Deterministic computation: The default deterministic implementation of aclnnDenseLightningIndexerSoftmaxLse is used.
Common constraints
- Processing when the input parameter is empty:
- If queryIndex is an empty tensor, the function returns directly.
- The scenarios where the input parameters are empty in the SFAG common restrictions are the same as those in the FAG.
- Processing when the input parameter is empty:
Constraints
[object Object]Typ.
[object Object]
The following example is for reference only. For details, see .