Header Files and Library Files
CANN application development involves APIs provided by components such as Runtime, Graph Engine (GE), and DVPP (Digital Vision Pre-Processing). For details about the APIs provided by each component, see the API reference of each component. This section describes only the API types and the header files and library files on which the APIs depend when they are called.
API Category
The interface name is prefixed with acl and in the format of acl+ Interface class abbreviation +*. The asterisk (*) usually indicates an operation verb or object, and the first letter must be capitalized. In this document, APIs are referred to as acl APIs.
In acl APIs, the parameters are usually arranged in the sequence of input parameters followed by output parameters. You should not add new parameters to the end of an API. Instead, you should add new parameters that are used only as input parameters before the output parameters. For parameters that are used as both input and output, the situation is relatively complex. You may need to consider the consistency with other APIs and handle the parameters flexibly.
API Prefix |
Description |
Component |
|---|---|---|
acl |
System configuration APIs |
Runtime |
aclrt |
Runtime management APIs |
Runtime |
aclop |
Single-operator model execution APIs |
Runtime |
aclblas |
BLAS APIs |
Graph Engine |
aclmdl |
Model inference APIs |
Graph Engine |
acldvpp, aclvdec, or aclvenc |
Media data processing interface The naming conventions are not applicable to media data processing V2 APIs that start with hi_mpi. |
Digital Vision Pre-Processing (DVPP): |
aclprof |
Profiling configuration APIs |
Runtime |
acltdt |
Data transfer APIs |
Runtime |
aclfv |
Feature vector search APIs |
Feature Vector |
Due to software and hardware differences, different product models support different types of interfaces. For details, see the interface description.
Dependent Header Files and Library Files
You can reference the header files and library files of acl APIs for compiling and running your apps only after the firmware, driver, and CANN software are installed.
The header files of acl APIs are stored in the ${INSTALL_DIR}/include/ directory, and the library files are stored in the ${INSTALL_DIR}/lib64/ directory. Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann.
Include the dependency header files based on the acl APIs to be called. Refer to the table below for details.
When compiling the ACL interface program, ensure that the corresponding library file is referenced based on the include header file. If unnecessary library files (such as libascendcl.a) are referenced, version functions may be abnormal or compatibility issues may occur during subsequent version upgrade.
Header File |
Function |
Matching Library File |
|---|---|---|
acl/acl_rt.h |
Declares the APIs for initialization/deinitialization, device management, context management, stream management, synchronization, memory management, and more. |
libacl_rt.so libascendcl.so is supported in earlier versions to avoid compatibility issues. However, it will not be supported in later versions. Therefore, you are advised to use libacl_rt.so to ensure compatibility with later versions. |
acl/acl_dump.h |
Declares the model and operator dump APIs. |
libascend_dump.so |
acl/acl_prof.h |
Declares the profiling APIs. |
libmsprofiler.so libascendcl.so is supported in earlier versions to avoid compatibility issues. However, it will not be supported in later versions. Therefore, you are advised to use libmsprofiler.so to ensure compatibility with later versions. |
acl/acl_tdt.h |
Declares the tensor data transfer APIs. |
libacl_tdt_channel.so |
acl/acl_tdt_queue.h |
Declares the shared queue management and shared buffer management APIs. |
libacl_tdt_queue.so |
Header File |
Function |
Matching Library File |
|---|---|---|
acl/acl_mdl.h |
Declares the model management APIs. |
libacl_mdl.so libascendcl.so is supported in earlier versions to avoid compatibility issues. However, it will not be supported in later versions. Therefore, you are advised to use libacl_mdl.so to ensure compatibility with later versions. |
acl/acl_op.h acl/acl_op_compiler.h |
Declares single-operator calling APIs (including only single-operator model execution APIs). |
libacl_op_executor.so libacl_op_compiler.so libascendcl.so is supported in earlier versions to avoid compatibility issues. However, it will be removed in later versions. Therefore, you are advised to use libacl_op_executor.so and libacl_op_compiler.so to ensure compatibility with later versions. |
acl/ops/acl_cblas.h |
Declares the CBLAS APIs. |
libacl_cblas.so |
Category |
Header File |
Function |
Matching Library File |
|---|---|---|---|
Media data processing operators |
In the acldvppop directory: acldvpp_base.h acldvpp_op_api.h |
Defines the functional APIs of digital vision preprocessing (DVPP) operators. |
libacl_dvpp_op.so |
In the aclnn directory: acl_meta.h aclnn_base.h |
Common meta APIs such as those for creating aclTensor, aclScalar, and aclIntArray |
libnnopbase.so |
|
Media data processing V2 |
acl/dvpp/hi_dvpp.h |
Defines the DVPP APIs for media data processing V2. |
libacl_dvpp_mpi.so |
In the acl/media directory: hi_mpi_vi.h hi_common_vi.h hi_common_dis.h hi_common_gdc.h hi_media_common.h hi_media_type.h hi_mpi_sys.h |
Declares the video input (VI) data obtaining APIs. |
libacl_vi_mpi.so libacl_dvpp_mpi.so |
|
In the acl/media directory: hi_mpi_isp.h hi_common_isp.h hi_common_3a.h hi_mpi_ae.h hi_common_ae.h hi_mpi_awb.h hi_common_awb.h hi_common_sns.h hi_media_common.h hi_media_type.h hi_mpi_sys.h |
Declares the image signal processing (ISP) system control APIs. |
libacl_isp_ae_mpi.so libacl_isp_awb_mpi.so libacl_isp_mpi.so libacl_dvpp_mpi.so |
|
In the acl/media directory: hi_mpi_vpss.h hi_media_common.h hi_media_type.h hi_mpi_sys.h |
Declares the video process sub-system (VPSS) image processing APIs. |
libacl_vpss_mpi.so libacl_dvpp_mpi.so |
|
acl/media/hi_mipi_rx.h |
Declares the MIPI RX ioctl command word. |
- |
|
In the acl/media directory: hi_mpi_audio.h hi_common_aio.h |
Declares the audio input and output APIs. |
libacl_audio_mpi.so |
|
acl/media/hi_acodec.h |
Declares the volume adjusting command word. |
- |
|
In the acl/media directory: hi_common_vo.h hi_mpi_vo.h |
Declares the video output APIs. |
libacl_vo_mpi.so |
|
acl/media/hi_mpi_hdmi.h |
Declares the HDMI APIs for connecting to peripherals. |
libacl_hdmi_mpi.so |
|
acl/media/hi_mpi_tde.h |
Declares the TDE APIs for graphics drawing. |
libacl_tde_mpi.so |
|
acl/media/hifb.h |
Declares APIs for managing overlaid graphics layers. |
- |
|
Media data processing V1 |
acl/ops/acl_dvpp.h |
Declares the media data processing V1 APIs. |
libacl_dvpp.so |
Header File |
Function |
Matching Library File |
|---|---|---|
acl/ops/acl_fv.h |
Declares the feature vector search APIs. |
libacl_retr.so |