Function: get_devices_topo

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas training product

Atlas inference product

Atlas 200I/500 A2 inference product

For the Atlas 200I/500 A2 inference product, this API cannot be called in Ascend RC form.

Description

Obtains the network topology of the interconnection between two devices.

Prototype

  • C Prototype
    aclError aclrtGetDevicesTopo(uint32_t deviceId, uint32_t otherDeviceId, uint64_t *value)
  • Python Function
    1
    value, ret = acl.rt.get_devices_topo(device_id, other_device_id)
    

Parameters

Parameter

Description

device_id

Int, device ID.

other_device_id

Int, device ID.

Return Value

Return Value

Description

ret

Int, 0 on success; else failure.

value

int, topology relationship between two devices.

#define ACL_RT_DEVS_TOPOLOGY_HCCS     0x01ULL  # Connected through the Huawei Cache Coherence System (HCCS), which is used for high-speed interconnection between CPUs and NPUs.
#define ACL_RT_DEVS_TOPOLOGY_PIX      0x02ULL  # Connection through the same PCIe switch
#define ACL_RT_DEVS_TOPOLOGY_PIB      0x04ULL  # Reserved value
#define ACL_RT_DEVS_TOPOLOGY_PHB      0x08ULL  # Connection through the PCIe host bridge
#define ACL_RT_DEVS_TOPOLOGY_SYS      0x10ULL  # Connection through Symmetric Multiprocessing (SMP). NUMA nodes are interconnected through SMP.
#define ACL_RT_DEVS_TOPOLOGY_SIO      0x20ULL  # Intra-chip connection (Two dies are connected through this mode.)
#define ACL_RT_DEVS_TOPOLOGY_HCCS_SW  0x40ULL  # Connection through HCCS switch