We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All
GuidesCANNAbout the Service

About the Service

Overview

Compute Architecture for Neural Networks (CANN) is a heterogeneous computing architecture launched by Huawei, designed for AI with device-cloud consistency. On HarmonyOS devices, CANN provides a unified access and running environment for various AI models and algorithms, oriented towards the Kirin hardware platform. Your app can leverage CANN's APIs and user data to perform intelligent inference, model training, and model optimization on the device, fully utilizing the local intelligent processing capabilities.

A model is the result of applying AI algorithms to a large amount of training data. You can use the model to perform intelligent inference and prediction based on new input data. Models can accomplish many complex tasks that are difficult or inefficient to implement with conventional code. For example, you can train a model to perform semantic segmentation on images, recognizing and precisely delineating different object classes within the images, or process voice data to enable voice wake-up, speech recognition, and speech synthesis.

You can use the CANN development platform provided by Huawei Ascend for model construction and training. Trained models can be converted to the format compatible with CANN, allowing seamless integration into your app. Additionally, you can develop models based on other open-source or self-developed machine learning frameworks and then adapt these models to the HarmonyOS ecosystem using the toolchain provided by CANN.

CANN efficiently optimizes on-device intelligent computing performance by coordinating the Neural Network Processing Unit (NPU), CPU, and other hardware resources. While enhancing computing efficiency, it minimizes memory and power consumption. Running models directly on the device reduces network dependency, ensuring the privacy and security of user data. This allows apps to maintain quick response times in various network environments, providing users with a smooth and intelligent interaction experience.

CANN is built on underlying hardware and optimized computing libraries, oriented toward the computing core of Huawei-developed Da Vinci NPU. It supports the Ascend C custom operator programming language and related toolchain, in conjunction with the cloud-side Ascend processors. This ensures that NPU-oriented development and optimization can be performed once and deployed across multiple devices.

Scenarios

  • CANN supports a dedicated set of AI instructions for neural network model operations, facilitating efficient parallel execution of more neural network operators.
  • CANN is capable of compiling a wide range of neural network operators, including convolution, pooling, activation, and full link, into dedicated AI instruction sequences for the NPU in offline mode, with data and weight rearranged to ensure optimized performance. The instructions and data are then integrated to generate an offline model. Furthermore, during offline compilation, inter-layer fusion between operators (convolution, pooling, and activation) reduces the read/write bandwidth of the Double Data Rate (DDR), and thus improves performance.
  • CANN automatically identifies the computing capability of the running environment, and performs adaptive graph partition and collaborative device scheduling for the neural network. The acceleration provided for NPU and CPU computing can provide higher hardware adaptability only via the CPU, and does not require the presence of an NPU.
  • CANN supports automatic optimization, from pre-trained models to device-side inference models. Model size reduction is oriented toward widely varying application scenarios, with a broad range of algorithms to automatically implement smaller and faster models via calibration or retraining, to meet stringent requirements for highly-precise solutions.
  • CANN supports computing capability enhancement, which allows for CANN device-cloud collaboration.

Restrictions

Supported Locations

For details about supported locations, please refer to Supported Locations.

Supported Platforms

For details, please refer to Supported Platforms.

Search
Enter a keyword.