aclrtBinaryLoadFromFile

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

Loads and parses the operator binary file from a file, copies the operator binary file data to the device corresponding to the current context, and outputs the binHandle pointing to the operator binary file.

For AI Core operators, if this API is used to load and parse the operator binary file, the aclrtLaunchKernelWithConfig API must also be called to deliver a compute task.

Prototype

aclError aclrtBinaryLoadFromFile(const char* binPath, aclrtBinaryLoadOptions *options, aclrtBinHandle *binHandle)

Parameters

Parameter

Input/Output

Description

binPath

Input

Path of the operator binary file (*.o file). The path must be an absolute path.

For AI CPU operators, this parameter can be set to an operator library file (*.json).

options

Input

Optional parameter for loading the operator binary file.

binHandle

Output

Handle of the operator binary file.

Returns

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

Restrictions

The operator binary file generated during the compilation of a product model must be used on the product of the same model.