Overview
This section describes the main functions and basic concepts of app development and provides suggestions on how to use this document.
Introduction
Compute Architecture for Neural Networks (CANN) provides a C language API library (the API name prefix is acl). You can use this set of APIs to utilize the hardware computing resources of Ascend AI Processor for deep learning and inference, graphics and image preprocessing, and single-operator acceleration computing on CANN. This C language API library, which is referred to as acl APIs in the following sections, contains APIs for runtime management, single-operator calling, model management, media data processing, and more.
Application scenarios of acl APIs:
- Invoked by components in CANN: The runtime management functions, such as device resource management and memory management, are invoked.
- Calling through an AI framework: Functions, such as runtime management and single-operator calling, are invoked to use the computing capabilities of Ascend AI Processor.
- AI app development: You can call acl APIs to develop image classification and target recognition apps, and more.
- Development of third-party libraries: You can encapsulate acl APIs into third-party libraries to offer capabilities such as runtime management.
Advantages of acl APIs:
- High-level abstraction: The APIs for operator compilation, loading, and execution are unified. In this way, the number of APIs and complexity are greatly reduced.
- Backward compatibility: acl APIs are backward compatible to ensure that apps built based on an earlier version can still run on a later version.
- Smooth development experience: acl APIs work the same for Ascend AI Processor of different versions.
Basic Concepts
Term |
Description |
|---|---|
Synchronous/Asynchronous |
The synchronous and asynchronous mentioned in this document are from the perspective of the caller and executor.
|
Process/Thread |
Unless otherwise specified, the processes and threads mentioned in this document refer to the processes and threads in user apps. |
Channel |
An RGB image has three channels: red, green, and blue. HSV stands for hue, saturation, and value (brightness) and is an alternative representation of the RGB color model. |
If the PCIe of the Ascend AI Processor works in secondary mode, the form is called In |
|
If the PCIe of the Ascend AI Processor works in primary mode, the form is called In |
Document Usage Suggestions
If you are using this document for the first time and you have learned what acl APIs do but do not know how to develop apps, you can follow the suggestions below:
- Install the firmware, driver, and CANN software by referring to the CANN Software Installation Guide.
- Click Link to obtain the entry example, download the sample source code, compile and run the apps as instructed in README.md, and understand the key code logic of acl APIs through the source code.
- Learn the overall API categories and API calling process by referring to Header Files and Library Files and API Call Sequence.
- Learn how to develop other apps by referring to Single-Operator Calling, Media Data Processing (Including Images and Videos), and Model Management and other sections.
To understand this document better, you are supposed to have ability in C/C++ programming and a basic understanding of machine learning or deep learning.