Function: binary_load

Applicable Products

  • Ascend 950PR&950DT products: Supported
  • Atlas A3 products: Supported
  • Atlas A2 products: Supported
  • Atlas 200I/500 A2 inference products: Supported
  • Atlas inference products: Supported
  • Atlas training products: Supported

Function

Parses and loads the operator binary file, outputs 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

    aclError aclrtBinaryLoad(const aclrtBinary binary, aclrtBinHandle *binHandle)
    
  • Python Function

    bin_handle, ret = acl.rt.binary_load(binary)
    

Parameters

Parameter Description
binary Int, binary information of the operator. Call acl.rt.create_binary to obtain the pointer to 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. If 0 is returned, the operation is successful. If other values are returned, the operation fails.