FreeAllEvent

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

Atlas inference product Vector Core

x

Atlas training product

Function Usage

Releases all synchronization events requested in a queue. The buffers allocated to the queue are associated with the event IDs of the synchronization events. The number of synchronization events is limited. If the number of queue buffers used at the same time exceeds the limit, no more queues can be requested. After this API is called to release the events in the queue, you can request a queue again. For details, see TQue Buffer Limit.

Prototype

1
__aicore__ inline void FreeAllEvent()

Parameters

None

Constraints

This API does not support inplace tensor operations. This means depth of TQue is set to 0.

Returns

None

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
// API: DeQue Tensor
AscendC::TPipe pipe;
AscendC::TQueBind<AscendC::TPosition::VECOUT, AscendC::TPosition::GM, 4> que;
int num = 4;
int len = 1024;
pipe.InitBuffer(que, num, len);
AscendC::LocalTensor<half> tensor1 = que.AllocTensor<half>();
que.EnQue(tensor1);
tensor1 = que.DeQue<half>(); // Move the tensor out of the VECOUT queue.
que.FreeTensor<half>(tensor1);
que.FreeAllEvent();