aclrtBinaryGetDevAddress

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Obtains the memory address and memory size of the operator binary data on a device.

Prototype

aclError aclrtBinaryGetDevAddress(const aclrtBinHandle binHandle, void **binAddr, size_t *binSize)

Parameters

Parameter

Input/Output

Description

binHandle

Input

Handle of operator binary data.

Call aclrtBinaryLoadFromFile or aclrtBinaryLoadFromData to obtain the operator binary handle and pass it as an input parameter.

binAddr

Output

Memory address of the operator binary data on a device.

If lazy loading is set (by setting aclrtBinaryLoadOptions.aclrtBinaryLoadOption.isLazyLoad to 1) for operator binary data loading, the binAddr obtained by calling this API is a null pointer.

binSize

Output

Size of the operator binary data, in bytes.

Returns

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