Programming Model Overview

An AI Core is the compute core of an AI processor. An AI processor usually integrates multiple AI Cores to implement parallel compute. Compared with traditional CPUs, AI processors are more suitable for model training and inference because they have more compute units and corresponding vector compute instructions. This enables a single hardware instruction to compute multiple groups of data. AI processors provide the following programming models:

The AI CPU is a processor on the device. It has the same memory access capability as the AI Core and can directly access the memory resources on the device. In addition, the AI CPU can perform data compute like the CPU on the host.

Table 1 Programming model classification

Programming Model

Compute Space

Characteristic

SIMD programming

AI Core

It is suitable for vector operators and fused operators that involve matrix compute and continuous compute. An advanced programming mode that combines SIMD and SIMT is supported.

SIMT programming

AI Core

It is suitable for discrete access and complex branch control scenarios.

AI CPU programming

AI CPU

It is a supplement to AI Core compute.