Introduction
AscendCL provides a collection of C language APIs for use in the development of DNN inference apps on the Ascend platform. These APIs are designed for runtime resource and memory management, model and operator loading and execution, as well as media data processing, facilitating deep learning inference computing, graphics and image preprocessing, and single-operator accelerated computing on the Ascend CANN platform by leveraging Ascend hardware compute resources. In a nutshell, AscendCL is a unified API framework used to invoke every resource.
The compute resource layer serves as the hardware compute capability basis of the Ascend AI Processor, and performs matrix-related computation of neural networks (NNs), general computation and execution control of control operators, scalars, and vectors, as well as image and video data preprocessing. This layer is fundamental to executing DNN computing.
Figure 1 Logical architecture
AscendCL Application Scenarios
- App development: You can call the AscendCL APIs to develop image classification and target recognition apps, and more.
- Calling through a third-party framework: You can call the AscendCL APIs through a third-party framework to use the compute capabilities of Ascend AI Processor.
- Development of third-party libraries: You can encapsulate AscendCL into third-party libraries to offer the runtime and resource management capabilities of Ascend AI Processor.
Advantages of AscendCL
- High-level abstraction: The APIs for operator compilation, loading, and execution are unified. In this way, AscendCL greatly cuts the number of APIs and reduces complexity.
- Backward compatibility: AscendCL is backward compatible to ensure that apps built based on an older version can still run on the new version after a software update.
- Chip-unaware development: AscendCL works the same for Ascend AI Processor of different versions thanks to a unified set of APIs.