函数:get_devices_topo
产品支持情况
产品 |
是否支持 |
---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
功能说明
获取两个Device之间的网络拓扑关系。
函数原型
- C函数原型
aclError aclrtGetDevicesTopo(uint32_t deviceId, uint32_t otherDeviceId, uint64_t *value)
- python函数
1
value, ret = acl.rt.get_devices_topo(device_id, other_device_id)
参数说明
参数名 |
说明 |
---|---|
device_id |
int,Device ID。 |
other_device_id |
int,Device ID。 |
返回值说明
返回值 |
说明 |
---|---|
ret |
int,返回0表示成功,返回其它值表示失败。 |
value |
int,两个Device之间互联的拓扑关系。 #define ACL_RT_DEVS_TOPOLOGY_HCCS 0x01ULL # 通过HCCS连接,HCCS是Huawei Cache Coherence System(华为缓存一致性系统),用于CPU/NPU之间的高速互联 #define ACL_RT_DEVS_TOPOLOGY_PIX 0x02ULL # 通过同一个PCIe Switch连接 #define ACL_RT_DEVS_TOPOLOGY_PIB 0x04ULL # 预留值 #define ACL_RT_DEVS_TOPOLOGY_PHB 0x08ULL # 通过PCIe Host Bridge连接 #define ACL_RT_DEVS_TOPOLOGY_SYS 0x10ULL # 通过SMP(Symmetric Multiprocessing)连接,NUMA节点之间通过SMP互连 #define ACL_RT_DEVS_TOPOLOGY_SIO 0x20ULL # 片内连接方式,两个DIE之间通过该方式连接 #define ACL_RT_DEVS_TOPOLOGY_HCCS_SW 0x40ULL # 通过HCCS Switch连接 |
父主题: Device管理