Overview
What Is pyacl?
Compute Architecture for Neural Networks (CANN) provides a Python language API library. 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 Python language API library, which is referred to as pyacl APIs in the following sections, contains APIs for runtime management, single-operator calling, model management, media data processing, and more.
Terminology
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. |
Ascend EP form |
If the PCIe of the Ascend AI Processor works in secondary mode, the form is called Ascend EP form. In Ascend EP form, the host works as the primary side, and the device works as the secondary side. Customers' AI service programs run on the host. The Ascend AI Processor functions as a device and connects to the host over the PCIe interface. The host interacts with the device over the PCIe interface and loads AI tasks to the Ascend AI Processor on the device. The device co-works with the host (namely, an x86 or Arm server) over the PCIe interface. The device provides only the NN compute capability for the host, and the central processing unit (CPU) resources on the device can be called only by the host. |
If the PCIe of the Ascend AI Processor works in active mode, the mode is called RC mode. 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 pyacl APIs through the source code.
- Learn the overall API categories and API calling process by referring to Programming APIs and API Call Sequence.
- Learn how to develop other apps by referring to in Single-Operator Calling, Media Data Processing (Including Images and Videos), Model Management and other sections.
To understand this document better, you are supposed to have ability in Python programming and a basic understanding of machine learning or deep learning.