aclrtBinaryGetDevAddress

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

√

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

√

Function

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

Operator binary handle. 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.aclrtBinaryLoadOptionValue.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.