QueueBarrier

Applicability

Product

Supported

Atlas 350 Accelerator Card

x

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

x

Atlas 200I/500 A2 inference product

x

Atlas inference product AI Core

x

Atlas inference product Vector Core

x

Atlas training product

x

Function Usage

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

Constraints

None