aclrtcGetBinDataSize

Product Support

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference product's AI Core

x

Atlas inference product's Vector Core

x

Atlas training products

x

Function

Obtains the size of the compiled binary data. This function is used to allocate memory space of the corresponding size when aclrtcGetBinData is called to obtain the binary data.

Prototype

1
aclError aclrtcGetBinDataSize(aclrtcProg prog, size_t *binDataSizeRet)

Parameters

Table 1 API parameters

Parameter

Input/Output

Description

prog

Input

Handle to the program to be compiled at runtime.

binDataSizeRet

Output

Size of the binary data generated on the device after compilation.

Returns

aclError is of the int type. For details, see RTC Error Codes.

Restrictions

None

Example

1
2
3
aclrtcProg prog;
size_t binDataSizeRet = 0;
aclError result = aclrtcGetBinDataSize(prog, &binDataSizeRet);