函数:get_device_info
产品支持情况
产品 |
是否支持 |
---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
功能说明
获取指定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属性值。 |
父主题: Device管理