Header Files and Library Files

API Category

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.

Table 1 Key API classes

API Prefix

Description

acl

Basic APIs, such as initialization and deinitialization, logging, and data type conversion APIs

aclrt

Runtime management APIs, such as device management, stream management, memory management, and kernel loading and execution APIs

aclmdlRI

Model running instance management APIs

acltdt

Data transfer APIs

aclmdl&aclop

Model and operator data dump APIs

aclprof

Profiling 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 include header files. If redundant .so 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 files

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