NPU Architecture Version 351x

This section describes the hardware architecture and functions of the __NPU_ARCH__ version 351x.

Hardware Architecture

As shown in the following figure, the AI Core in this architecture consists of two independent cores: AIC and AIV, which are used for cube computation and vector computation, respectively. The core ratio of AIC and AIV cores is 1:2. Each core has its own Scalar Unit and can independently load its own code segments.

The architecture has the following key features:

Compute Units

Separated deployment of the Cube Unit and Vector Unit

In this architecture, the Cube Unit and Vector Unit are deployed on the AIC and AIV cores, respectively. Each core has its own Scalar Unit and can independently load its own code segments.

Vector Unit

Cube Unit

Scalar Unit

Storage Units

Obtaining the memory size of a storage unit

You can query the memory size of each storage unit by calling the platform information acquisition API.

Minimum access granularities (alignment requirements) of each storage unit

Core

Storage Unit

Alignment Requirement

AIV

Unified Buffer

32-byte aligned.

AIC

L1 Buffer

32-byte aligned.

L0A Buffer

512-byte aligned.

L0B Buffer

512-byte aligned.

L0C Buffer

64-byte aligned.

BiasTable Buffer

64-byte aligned.

Fixpipe Buffer

64-byte aligned.

Recommended data layout formats for each storage unit

Access conflicts of storage units

The following figure shows the UB structure in this NPU architecture. When multiple operations attempt to access the same bank or bank group of the Unified Buffer at the same time, bank conflicts may occur, including the read-write conflict, write-write conflict, and read-read conflict. As a result, the accesses queue and the performance deteriorates. In NPU architecture version 220x, a bank group has only one group of read and write ports, and at most one read or one write operation can be completed in one cycle. In this NPU architecture, each bank group has two groups of read and write ports, and at most two read operations and no write operations or one read operation and one write operation can be performed at the same time. The related read and write constraints are as follows:

Figure 3 UB bank diagram of this architecture version

Register

DMA Units

Alignment requirements during movement

The size of the data to be moved is subject to certain requirements because the moved data is used for computation. The size of the data moved to the Unified Buffer must be aligned based on the data block size. The data moved to other storage units must be aligned based on the fractal requirements. For example, when data is moved from the L1 Buffer to the L0A Buffer, the data format needs to be converted from NZ to ZN. The size of the data to be moved must be aligned based on the fractal size. If the remaining size of the L1 Buffer is less than one fractal, an exception will occur during hardware execution.

MTE hard channel

FixPipe hardware acceleration

FixPipe is an acceleration module that hardens typical operations on the NPU. It is located inside the AIC and works with the Cube Unit to complete on-the-fly computation. Its main functions are as follows:

Channel Merge supports the S8, U8, S4, and U4 data types, while Channel Split supports the FP32 data type.

AIC-AIV Inter-Core Communication

This architecture supports inter-core communication with the AIC:AIV ratio of 1:1 or 1:2. The inter-core communication is implemented through the SSBuf, which is different from the NPU220 architecture where the inter-core communication is implemented through the global memory.

Synchronization Control