API function: Updates the outputs of two FlashAttention operations based on their respective maximum and sum softmax values.
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]- For [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object], when the input data layout (inputLayoutOptional) is TND, D must be a multiple of 64.
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 computing:
[object Object]defaults to a deterministic implementation.- When
[object Object]is TND,[object Object]is required. - When inputLayoutOptional is set to TND:
- N:
- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]: N <= 256.
- D:
- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]: D <= 768 and D is a multiple of 64.
- N:
The following example is for reference only. For details, see .
[object Object]