aclrtUnmapMem

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

Atlas training product

Description

Unmaps virtual memory from physical memory.

This API needs to be used with other APIs to allocate virtual memory with consecutive addresses and maximize the use of physical memory.
  1. Call aclrtReserveMemAddress to allocate virtual memory.
  2. Call aclrtMallocPhysical to allocate physical memory.
  3. Call aclrtMapMem to map the virtual memory to the physical memory.
  4. Call specific task APIs to execute tasks.
  5. Call aclrtUnmapMem to unmap the virtual memory from the physical memory.
  6. Call aclrtFreePhysical to free the physical memory.
  7. Call aclrtReleaseMemAddress to free the virtual memory.

Prototype

1
aclError aclrtUnmapMem(void *virPtr)

Parameters

Parameter

Input/Output

Description

virPtr

Input

Pointer to the virtual memory address to be unmapped.

Returns

0 on success; else, failure. For details, see aclError.

Restrictions

Atlas 200I/500 A2 inference product and Ascend RC: This API is not supported.

API Call Example

For the API call example, see Virtual Memory Management.