Sends token data from the Attention node to the FFN node.
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]
Deterministic constraints:
- The default deterministic implementation is used for
[object Object].
- The default deterministic implementation is used for
Parameter consistency constraints:
- The
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object], and[object Object]parameters used during API calls must be consistent across all cards, at different layers of the network, and with the parameters of the operators in the separated scenario.
- The
Product constraints:
- [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]: In this scenario, a single rank contains dual dies. Therefore, the "rank" in the parameter description indicates a single die.
Shape variable constraints:
[object Object]undefined
Environment variables constraints:
- HCCL_BUFFSIZE: Before calling this API, check whether the value of the HCCL_BUFFSIZE environment variable is proper. This environment variable indicates the buffer size occupied by a single communication domain, in MB. If this environment variable is not set, the default value 200 MB is used.
Constraints on the use of the communication domains:
- The communicator of the AttentionToFFN operator cannot contain other operators.
Preparing files:
Create a
[object Object]directory. Follow the instructions to create[object Object]and[object Object]files in the[object Object]directory, and modify them according to the code.Install the CANN package and compile and run AttentionToFFNDemo according to the following instructions.
AttentionToFFN.sh compilation script
Compilation and execution:
The sample code is as follows: