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

#### 产品支持情况

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


#### 功能说明

获取指定Device的信息。


#### 函数原型

- C函数原型

```
aclError aclrtGetDeviceInfo(uint32_t deviceId, aclrtDevAttr attr, int64_t *value)
```


- python函数
  1 value, ret = acl.rt.get_device_info(device_Id, attr)


#### 参数说明

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


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| ret | int，错误码，返回0表示成功，返回其它值表示失败。 |
| value | int，device属性值。 |
