aclrtBinaryGetDevAddress

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Description

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

Prototype

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

Parameters

Parameter

Input/Output

Description

binHandle

Input

Handle of operator binary data. For details about the type definition, see aclrtBinHandle.

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; otherwise, failure. For details, see aclError.