Arrive

Product Support

Product

Supported

Atlas A3 training products/Atlas A3 inference products

x

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference product's AI Core

x

Atlas inference product's Vector Core

x

Atlas training products

x

Function

Notifies other waiting AIVs that the current AIV has completed the tasks on which it depends.

Prototype

1
__aicore__ inline void Arrive(uint32_t arriveIndex)

Parameters

Table 1 API parameters

Parameter

Input/Output

Description

arriveIndex

Input

Index of the AIV in the Arrive group. Value range: [0, arriveSize – 1].

Returns

None

Restrictions

This API can be used in iterations. However, the maximum number of iterations cannot exceed 1,048,575 due to the limitation of the inter-core communication efficiency.

Example

1
2
3
4
if (id >= 0 && id < ARRIVE_NUM) {
  //Various Vector compute logic, which is implemented by users.
  barA.Arrive(id);                 // There are two AIVs in the Arrive group, block 0 and block 1, indicating that the two AIVs have completed tasks.
}