FreeAllEvent

Product Support

Product

Supported

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference product 's AI Core

Atlas inference product 's Vector Core

x

Atlas training products

Function

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

Restrictions

This API does not support inplace tensor operations, that is, the scenario where the 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();