Function: free_physical

C Prototype

aclError aclrtFreePhysical(aclrtDrvMemHandle handle)

Python Function

ret = acl.rt.free_physical(handle)

Function Usage

Frees the physical memory allocated by the acl.rt.malloc_physical call.

The Atlas 200/300/500 Inference Product does not support this API.

Input Description

handle: handle of the physical address to be released.

Return Value

ret: int, error code.

Restrictions

  • This API is not supported in Ascend RC form.
  • If the physical memory is mapped to virtual memory, you need to unmap them by calling acl.rt.unmap_mem before freeing the physical memory.