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

#### 产品支持情况

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


#### 功能说明

查询运行环境是否支持指定的CANN特性。


#### 函数原型

- C函数原型
  1 aclError aclGetCannAttribute(aclCannAttr cannAttr, int32_t *value)

- python函数
  1 value, ret = acl.get_cann_attribute(cann_attr)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| cann\_attr | int，特性列表枚举值，一次查询可指定其中一项，具体请参见aclCannAttr。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| value | int，是否支持。 1：支持 0：不支持 |
| ret | int，错误码，返回0表示成功，返回其它值表示失败。 |
