SetFixpipeNz2ndFlag

Supported Products

Product

Supported/Unsupported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference product's AI Core

x

Atlas inference product's Vector Core

x

Atlas training products

x

Function Usage

This API is called to set the configuration related to format conversion (from NZ to ND) during the DataCopy (CO1->GM and CO1->A1) process.

Prototype

1
__aicore__ inline void SetFixpipeNz2ndFlag(uint16_t ndNum, uint16_t srcNdStride, uint16_t dstNdStride)

Parameters

Table 1 Parameters

Parameter

Input/Output

Meaning

ndNum

Input

Number of NDs. The type is uint16_t. Value range: ndNum ∈ [1, 65535].

srcNdStride

Input

Source stride in fractal size, indicating head-to-head offset between adjacent source NZ matrices.

Atlas 200I/500 A2 Inference Product: srcNdStride ∈ [1, 512] (unit: fractal_size 1024 bytes)

Atlas 200I/500 A2 Inference Product: srcNdStride ∈ [1, 512] (unit: fractal_size 1024 bytes)

Atlas 200I/500 A2 Inference Product: srcNdStride ∈ [1, 512] (unit: fractal_size 1024 bytes)

dstNdStride

Input

Head-to-head offset between adjacent destination ND matrices. The unit is element.

Atlas A2 training products/Atlas A2 inference products, dstNdStride∈[1, 65535].

Atlas A3 training products/Atlas A3 inference products, dstNdStride∈[1, 65535].

Atlas 200I/500 A2 inference products, dstNdStride∈[1, 65535].

Returns

None

Restrictions

None

Example

For details, see the complete example.

1
2
3
4
uint16_t ndNum = 2;
uint16_t srcNdStride = 2;
uint16_t dstNdStride = 1;
AscendC::SetFixpipeNz2ndFlag(ndNum, srcNdStride, dstNdStride);