Memory Management and Synchronization Control
The Ascend C programming paradigm divides the processing program in the operator core into multiple pipeline tasks, completes inter-task communication and synchronization through queues, and manages resources such as memories and events through a unified resource management module (Pipe).
Ascend C provides a group of APIs for memory management and synchronization control. You can use these APIs to implement task synchronization and memory management.
The core APIs are as follows:
- AllocTensor: allocates tensors from the queue. The size of the tensor is the length of each memory block during InitBuffer.
- FreeTensor: releases specified tensors in the queue for subsequent use.
- EnQue: pushes tensors to the queue.
- DeQue: obtains tensors from the queue for subsequent processing.
Parent topic: Basic APIs