NPU Architecture Version 300x

This section describes the hardware architecture and functions of the __NPU_ARCH__ version 300x. 300 indicates the IP core ID, and x indicates the configuration version of the same IP core. The corresponding product models are as follows:

Hardware Architecture

Compute Units

Deployment of the Cube Unit and Vector Unit on the same core

In this architecture, the Cube Unit and Vector Unit are deployed on the same core and share the same Scalar Unit.

Vector Unit

Cube 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

Resolving access conflicts of storage units to improve read/write performance

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. The read/write performance can be improved by optimizing bank allocation. For details, see Avoiding Bank Conflicts in the Unified Buffer.

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 ZZ. 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.

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:

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

Synchronization Control