int dcmi_get_topo_info_by_device_id (int card_id1, int device_id1, int card_id2, int device_id2, int * topo_type)
查询指定两个Device之间的拓扑关系。
参数名称 |
输入/输出 |
类型 |
描述 |
|---|---|---|---|
card_id1/card_id2 |
输入 |
int |
设备ID,当前实际支持的ID通过dcmi_get_card_list接口获取。 |
device_id1/device_id2 |
输入 |
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芯片。 |
topo_type |
输出 |
int * |
输出Device之间拓扑关系的数值,对应关系如下: typedef enum { DCMI_TOPO_TYPE_SELF = 0,//芯片本身 DCMI_TOPO_TYPE_SYS,//通过PCIe连接且穿过NUMA nodes,nodes之间通过SMP连接,如:QPI、UPI DCMI_TOPO_TYPE_PHB,//通过PCIe连接且穿过同一个CPU的PCIe host bridge DCMI_TOPO_TYPE_HCCS,//通过HCCS链接 DCMI_TOPO_TYPE_PXB,//通过PCIe连接穿过多个PCIe switch DCMI_TOPO_TYPE_PIX,//通过PCIe连接穿过一个PCIe switch DCMI_TOPO_TYPE_SIO,//通过SIO总线链接 DCMI_TOPO_TYPE_HCCS_SW,//通过交换机交换的HCCS链接 DCMI_TOPO_TYPE_BUTT,//未知关系 DCMI_TOPO_TYOE_MAX, }; |
类型 |
描述 |
|---|---|
int |
处理结果:
|
无。
产品形态 |
物理机场景(裸机)root用户 |
物理机场景(裸机)运行用户组(非root用户) |
物理机+普通容器场景root用户 |
物理机+容器AVI场景root用户 |
|---|---|---|---|---|
Atlas 900 A3 SuperPoD 超节点 |
Y |
Y |
Y |
NA |
Atlas 9000 A3 SuperPoD 集群算力系统 |
Y |
Y |
Y |
NA |
Atlas 800T A3 超节点 |
Y |
Y |
Y |
N |
Atlas 800I A3 系列硬件产品 |
Y |
Y |
Y |
N |
A200T A3 Box8 系列硬件产品 |
Y |
Y |
Y |
NA |
注:Y表示支持;N表示不支持;NA表示不涉及,当前未规划此场景。 |
||||
… int ret = 0; int card_id1 = 0; int card_id2 = 1; int device_id1 = 0; int device_id2 = 1; int result; ret = dcmi_get_topo_info_by_device_id(card_id1, device_id1, card_id2, device_id2, &result); …