Header Files and Library Files

This section describes the API category and the header files and library files that the APIs depend on.

API Categories

The API names are prefixed with acl and in the format of acl+API category abbreviation+*. The asterisk (*) indicates the operation verb and object, both of which are 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.

Table 1 API category list

API Prefix

Description

acl

System configuration APIs

aclrt

Runtime management APIs

aclop

Single-operator model execution APIs

aclblas

BLAS APIs

aclmdl

Model inference APIs

acldvpp, aclvdec, or aclvenc

Media data processing APIs

The naming conventions are not applicable to media data processing V2 APIs that start with hi_mpi.

aclprof

Profiling configuration APIs

acltdt

Data transfer APIs

aclfv

Feature vector search APIs

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.

Include the dependency header files based on the acl APIs to be called. Refer to the table below for details.

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.

When building code based on acl APIs, depend on the corresponding library files based on the included header files. If redundant library files (such as libascendcl.a) are referenced, version functions may be abnormal or there may be compatibility issues during a version update.

Table 2 Header file list

Header File

Description

Matching Library File

acl/acl_base.h

Declares basic data types (such as aclDataBuffer and aclTensorDesc) and their operation APIs, enumerations (such as aclFormat), and log management APIs.

libascendcl.so

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_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/acl_prof.h

Declares the profile data collection APIs.

libmsprofiler.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 libmsprofiler.so to ensure compatibility with later versions.

acl/ops/acl_cblas.h

Declares the CBLAS APIs.

libacl_cblas.so

acl/ops/acl_dvpp.h

Declares the media data processing V1 APIs.

libacl_dvpp.so

acl/ops/acl_fv.h

Declares the feature vector search APIs.

libacl_retr.so

acl/acl_op_compiler.h

Declares the APIs, data types, and enumerations related to online operator compilation such as aclopCompile, aclopCompileAndExecute, and aclSetCompileopt.

libacl_op_compiler.so

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

acl/dvpp/hi_dvpp.h

Declares the media data processing V2 APIs.

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.

-

aclnn/acl_meta.h

Declares common meta APIs that the operator APIs depend on, such as the APIs for creating aclTensor, aclScalar, and aclIntArray.

For details about the header files and library files of operator APIs, see in Operator Library API Reference.

aclnn/aclnn_base.h

Declares the APIs for aclnnInit and aclnnFinalize.

aclnnop/aclnn_*.h

(* indicates the operator name.)

Declares aclnn APIs of Math, NN, CV, and Transformer operators.

In the acldvppop directory:

acldvpp_base.h

acldvpp_op_api.h

Defines the functional APIs of digital vision preprocessing (DVPP) operators.