---
title: 函数：create_attr
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/aclpythondevg_01_0780.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/aclpythondevg_01_0780.html
indexId: 1c8f780df0dd77c6a1449e44a7086c127398441e000acafd703d4fc91142cdbd75
---
# 函数：create_attr

#### 产品支持情况

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


#### 功能说明

创建aclopAttr类型的数据，该数据类型用于保存算子的属性。

如需销毁aclopAttr类型的数据，请参见acl.op.destroy_attr。


#### 函数原型

- C函数原型
  1 aclopAttr *aclopCreateAttr()

- python函数
  1 attr = acl.op.create_attr()


#### 参数说明

无


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| attr | int，返回aclopAttr类型数据的指针地址。 |
