Function: binary_load

Applicable Products

Product

Supported (√/x)

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas training products

√

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

Parses and loads the operator binary file, outputs the binHandle pointing to the operator binary file, and copies the operator binary file data to the device corresponding to the current context. Only Ascend C custom operators are supported.

Prototype

  • C Prototype
    1
    aclError aclrtBinaryLoad(const aclrtBinary binary, aclrtBinHandle *binHandle)
    
  • Python Function
    1
    bin_handle, ret= acl.rt.binary_load(binary)
    

Parameters

Parameter

Description

binary

Int, binary information of the operator. Call the acl.rt.create_binary API to obtain the pointer to the data of the acl.rt.binary type.

Return Values

Return Value

Description

bin_handle

Int, pointer address of the binary handle.

ret

Int, error code. 0 on success; else, failure.