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

#### 产品支持情况

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


#### 功能说明

查询device特性是否支持。


#### 函数原型

- C函数原型

```
aclError aclrtGetDeviceCapability(int32_t deviceId, aclrtDevFeatureType devFeatureType, int32_t *value)
```


- python函数
  1 value, ret = acl.rt.get_device_capability(device_id, dev_feature_type)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| device\_id | int，Device ID。 |
| dev\_feature\_type | int, 枚举值，具体请参见新增数据结构aclrtDevFeatureType。 |


#### 返回值说明

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