QueueBarrier

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

x

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

Blocks the BatchWrite communication tasks in the specified queue on the server until tasks in all queues in the specified range are completed, thereby synchronizing the queues in the specified range.

Prototype

1
2
template <ScopeType type = ScopeType::ALL>
__aicore__ inline void QueueBarrier(uint16_t queueID)

Parameters

Table 1 Template parameters

Parameter

Input/Output

Description

type

Input

Indicates the range of communication tasks that block the server. The type is ScopeType. The default value is ScopeType::ALL. Currently, this parameter can only be set to ScopeType::ALL.

ScopeType is defined as follows:

1
2
3
4
5
6
enum class ScopeType: uint8_t {
    ALL, // Blocks communication tasks in all queues.
    QUEUE, // Not supported currently.
    BLOCK, // Not supported currently.
    INVALID_TYPE // Not supported currently.
};
Table 2 API parameters

Parameter

Input/Output

Description

queueID

Input

Indicates the queue ID.

Returns

None

Restrictions

None