mstxMemRegionsUnregister
| Product | Supported |
|---|---|
| Ascend 910_95 AI Processors | √ |
| Atlas A3 training products/Atlas A3 inference products | √ |
| Atlas A2 training products/Atlas A2 inference products | √ |
| Atlas 200I/500 A2 inference products | √ |
| Atlas inference products | √ |
| Atlas training products | √ |
Unregisters secondary allocation of a memory pool.
void mstxMemRegionsUnregister(mstxDomainHandle_t domain, mstxMemRegionsUnregisterBatch_t const *desc)
Table 1 Parameter description
Either globalDomain or the handle returned by mstxDomainCreateA. |
||
The input description information must be the input description information from a previous mstxMemHeapRegister call; otherwise, the tool will print an error message. typedef enum mstxMemRegionRefType { // Describes a memory reference via a pointer MSTX_MEM_REGION_REF_TYPE_POINTER = 0, // Describes a memory reference via a handle MSTX_MEM_REGION_REF_TYPE_HANDLE } mstxMemRegionRefType; typedef struct mstxMemRegionRef_t { mstxMemRegionRefType refType; // Describes how the memory is referenced union { void const* pointer; // When the current memory reference is described by a pointer, this stores the memory region pointer mstxMemRegionHandle_t handle; // When the memory reference is described by a handle, this stores the handle of the memory region }; } mstxMemRegionRef_t; typedef struct mstxMemRegionsUnregisterBatch_t { size_t refCount; // Number of memory references mstxMemRegionRef_t const *refArray; // Array of memory region references to unregister } mstxMemRegionsUnregisterBatch_t; |
None
mstxMemRegionsUnregisterBatch_t refsDesc = {}
refsDesc.refCount = 1;
refsDesc.refArray = regionRef;
mstxMemRegionsUnregister(globalDomain, &refsDesc); // Unregister secondary allocationster Secondary Allocation