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

#### 产品支持情况

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


#### 功能说明

设置指定属性列表的数据类型。


#### 函数原型

- C函数原型
  1 aclError aclopSetAttrListDataType(aclopAttr *attr, const char *attrName, int numValues, const aclDataType values[])

- python函数
  1 attr, ret = acl.op.set_attr_list_data_type(attr, attr_name, values)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| attr | int，aclopAttr类型数据的指针地址。 需提前调用acl.op.create\_attr接口创建aclopAttr类型数据。 |
| attr\_name | str，属性名。 |
| values | list，属性值的列表。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| attr | int，aclopAttr类型的指针地址。 需提前调用create\_attr接口创建aclopAttr类型。 |
