Function: free_physical

Applicable Products

Product

Supported (√/x)

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas training products

√

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

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

If the physical memory is mapped to the virtual memory, the physical memory will not be freed here. The physical memory is actually freed only after the mapping between the physical memory and the virtual memory is canceled by calling acl.rt.unmap_mem.

Prototype

  • C Prototype
    1
    aclError aclrtFreePhysical(aclrtDrvMemHandle handle)
    
  • Python Function
    1
    ret = acl.rt.free_physical(handle)
    

Parameters

Parameter

Description

handle

Int, handle of the physical address to be freed.

Return Values

Return Value

Description

ret

Int, error code. 0 on success; else, failure.

Restrictions

Atlas 200I/500 A2 inference products in Ascend RC form: This API is not supported.