Function: create_binary

Applicability

Product

Supported (√/x)

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

Function Usage

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, call acl.rt.destroy_binary.

Prototype

  • C Prototype
    1
    aclrtBinary aclrtCreateBinary(const void *data, size_t dataLen)
    
  • Python Function
    1
    binary = acl.rt.create_binary(data, data_len)
    

Parameter Description

Parameter

Description

data

  • Int, pointer address of the memory address for storing the operator binary file (.o file).
    • Allocate memory on the host or device based on where the app runs. For details about the memory allocation APIs, see Memory Management.

data_len

Int, memory size, in bytes.

Return Value Description

Return Value

Description

binary

Int, pointer address of the acl.rt.binary type.