Function: free_physical
Applicable Products
- Ascend 950PR&950DT products: Supported
- Atlas A3 products: supported
- Atlas A2 products: Supported
- Atlas 200I/500 A2 inference products: Supported
- Atlas inference products: Supported
- Atlas training products: Supported
Function
Frees the physical memory allocated by calling acl.rt.malloc_physical.
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
aclError aclrtFreePhysical(aclrtDrvMemHandle handle) -
Python Function
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. If 0 is returned, the operation is successful. If other values are returned, the operation fails. |
Constraints
On Atlas 200I/500 A2 inference products, this API cannot be called in Ascend RC mode.