SetFixpipeNz2ndFlag

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product AI Core

x

Atlas inference product Vector Core

x

Atlas training product

x

Function Usage

Sets the configuration related to real-time format conversion (from NZ to ND) during the DataCopy (CO1 -> GM and CO1 -> A1) process.

Prototype

1
2
3
__aicore__ inline void SetFixpipeNz2ndFlag(uint16_t ndNum, uint16_t srcNdStride, uint16_t dstNdStride)
// The following prototype is supported only by the Atlas 350 Accelerator Card.
__aicore__ inline void SetFixpipeNz2ndFlag(uint16_t ndNum, uint16_t srcNdStride, uint32_t dstNdStride)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

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 stride between adjacent source NZ matrices.

Atlas A2 training product/Atlas A2 inference product: srcNdStride ∈ [1, 512] (unit: fractal_size 1024 bytes)

Atlas A3 training product/Atlas A3 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 350 Accelerator Card: srcNdStride ∈ [0, 65535] (unit: C0_SIZE)

dstNdStride

Input

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

Atlas A2 training product/Atlas A2 inference product: dstNdStride ∈ [1, 65535]

Atlas A3 training product/Atlas A3 inference product: dstNdStride ∈ [1, 65535]

Atlas 200I/500 A2 inference product: dstNdStride ∈ [1, 65535]

Atlas 350 Accelerator Card: dstNdStride ∈ [1, 232 – 1]

Returns

None

Restrictions

None

Examples

For details about the complete example, see Complete Example.

1
2
3
4
uint16_t ndNum = 2;
uint16_t srcNdStride = 2;
uint16_t dstNdStride = 1;
AscendC::SetFixpipeNz2ndFlag(ndNum, srcNdStride, dstNdStride); // Set the parameters for converting data from NZ to ND using the FIX.