To make it easier to call operators, a set of C-based APIs (with the [object Object] prefix) are provided. You do not need to provide the Intermediate Representation (IR) definition to facilitate efficient model and application development. This method is called single-operator API calling, or aclnn calling for short.
When calling operator APIs, you need to reference the dependency header file and library file. Generally, the header file is stored in {INSTALL_DIR}/lib64.
- Header files: 1. (Recommended) Method 1: Reference the general header file aclnn_ops_${ops_project}.h of the operator repository. 2. Method 2: Reference the header file aclnn_*.h of a single operator API.
- Library file: Reference the library file libopapi_${ops_project}.so corresponding to the operator repository. Note that the general library file libopapi.so of all operator repositories will be discarded in the future. It is not recommended and cannot be used together with the library file of a single operator repository.
${INSTALL_DIR} indicates the file path after CANN is installed. ${ops_project} indicates the operator repository name (such as math, nn, cv, and transformer). Replace it with the actual operator repository name.
[object Object]
The following table lists the operator APIs.