Function: create_binary

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

Creates data of the acl.rt.binary type. This data type is used to describe the binary information of an operator. Only Ascend C custom operators are supported.

To destroy data of the acl.rt.binary type, see acl.rt.destroy_binary.

Prototype

  • C Prototype

    aclrtBinary aclrtCreateBinary(const void *data, size_t dataLen)
    
  • Python Function

    binary = acl.rt.create_binary(data, data_len)
    

Parameters

Parameter Description
data Int, pointer address of the memory address for storing the operator binary file (.o file).
data_len Int, memory size, in bytes.

Return Values

Return Value Description
binary Int, pointer address of the acl.rt.binary type.

Constraints

In Ascend EP standard mode, allocate memory on the host for the data parameter. In Ascend RC mode or open Ctrl CPU mode, allocate memory on the device for the data parameter.