---
title: 函数：create_binary
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclpythondevg_01_0984.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclpythondevg_01_0984.html
indexId: 7b164189a8eb12cfa55912ff7ef8be4f9fd5dcec8c9fc0fb4e77d6476eb340c871
---
# 函数：create_binary

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |


#### 功能说明

创建acl.rt.binary类型的数据，该数据类型用于描述算子二进制信息。仅支持Ascend C自定义算子。

如需销毁acl.rt.binary类型的数据，请参见acl.rt.destroy_binary。


#### 函数原型

- C函数原型
  1 aclrtBinary aclrtCreateBinary(const void *data, size_t dataLen)

- python函数
  1 binary = acl.rt.create_binary(data, data_len)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| data | int，存放算子二进制文件（\*.o文件）数据的内存地址指针地址。 应用运行在Host时，此处需申请Host上的内存；应用运行在Device时，此处需申请Device上的内存。内存申请接口请参见内存管理。 |
| data\_len | int，内存大小，单位Byte。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| binary | int，返回acl.rt.binary类型的指针地址。 |
