int dcmi_get_device_component_count(int card_id, int device_id, unsigned int *component_count)
获取可升级组件的个数。
参数名称 |
输入/输出 |
类型 |
描述 |
|---|---|---|---|
card_id |
输入 |
int |
设备ID,当前实际支持的ID通过dcmi_get_card_list接口获取。 |
device_id |
输入 |
int |
芯片ID,通过dcmi_get_device_id_in_card接口获取。取值范围如下: NPU芯片:[0, device_id_max-1]。 说明:
device_id_max值为2,当device_id为0或1时表示NPU芯片;当device_id为2时表示MCU芯片。 |
component_count |
输出 |
unsigned int * |
返回组件的个数。 |
类型 |
描述 |
|---|---|
int |
处理结果:
|
无。
产品形态 |
物理机场景(裸机)root用户 |
物理机场景(裸机)运行用户组(非root用户) |
物理机+普通容器场景root用户 |
物理机+容器AVI场景root用户 |
|---|---|---|---|---|
Atlas 900 A3 SuperPoD 超节点 |
Y |
N |
Y |
NA |
Atlas 9000 A3 SuperPoD 集群算力系统 |
Y |
N |
Y |
NA |
Atlas 800T A3 超节点 |
Y |
N |
Y |
N |
Atlas 800I A3 系列硬件产品 |
Y |
N |
Y |
N |
A200T A3 Box8 系列硬件产品 |
Y |
N |
Y |
NA |
注:Y表示支持;N表示不支持;NA表示不涉及,当前未规划此场景。 |
||||
…
int ret = 0;
int card_id = 0;
int device_id = 0;
unsigned int component_num = 0;
ret =dcmi_get_device_component_count(card_id, device_id, &component_num);
if (ret != 0){
//todo:记录日志
return ret;
}
…