- Description: Updates the outputs of two FlashAttention operations based on their different softmax max and sum values. The difference from the interface is: in the scenario where the input layout is TND, the data layout of the softmax-related inputs in the original
[object Object]interface is BNS8, while the[object Object]interface supports passing a string parameter[object Object]to control whether the data layout of the softmax-related inputs is consistent with the attention layout (the TND layout). - Formula:
- Each operator is divided into a . It is necessary to first call the
[object Object]interface to obtain the required workspace size for computation and the executor that includes the operator's computation process, and then call the[object Object]interface to perform the computation.
[object Object]
[object Object]
Parameters:
[object Object]Returns:
aclnnStatus: Returns the 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
[object Object]is TND, the last dimension of[object Object]must be a multiple of 64. - When
[object Object]is TND,[object Object]is required. - When
[object Object]is TND, N must be less than or equal to 256, and D must be less than or equal to 768. - When
[object Object]is TND,[object Object]takes effect.[object Object]only supports three inputs: empty string, "SBH", "TND"
The following example is for reference only. For details, see .
[object Object]