aclrtMemRetainAllocationHandle

Applicability

  

Supported

Atlas A3 Training Series Product

Atlas A2 Training Series Product/Atlas 800I A2 Inference Product

Atlas 200/500 A2 Inference Product

Atlas Inference Series Product

Atlas Training Series Product

Description

Obtains the handle to the physical memory based on the virtual memory address.

If this API is called multiple times, you need to call aclrtFreePhysical the same number of times to free the physical memory handle.

Prototype

aclError aclrtMemRetainAllocationHandle(void* virPtr, aclrtDrvMemHandle *handle)

Parameters

Parameter

Input/Output

Description

virPtr

Input

Pointer to "the pointer to the allocated virtual memory address".

The value must be the same as the aclrtMapMem API's virPtr address.

handle

Output

Handle for storing physical memory information.

Returns

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

Restrictions

This API is not supported in the Ascend RC form.