Displaying the Device Topology

Function

Query the topology between multiple cards in a single device.

Commands for Querying Test Parameters

You can run either of the following commands to list the parameters of the command for displaying the device topology information:

ascend-dmi --topo -h

ascend-dmi --topo --help

Table 1 describes the parameters.

Table 1 Parameter description

Parameter

Description

Mandatory

[-topo, --topo, --topology]

Displays the topology between multiple cards in a device. -topo is supported, but --topo or --topology is recommended.

Yes

[-fmt, --fmt, --format]

Specifies the output format. The value can be normal or json. If this parameter is not specified, the default value normal is used.

No

Example

The command output on an inference server is similar to that on a training server. The following uses the screenshots on an inference server as an example.

  • Display the topology.

    ascend-dmi --topo

    If information shown in Figure 1 is displayed, the tool is running properly. For details about the parameters, see Table 2.

    Figure 1 Displaying the device topology
  • Specify the output format to JSON.

    ascend-dmi --topo --fmt json

    If information shown in Figure 2 is displayed, the tool is running properly. For details about the parameters, see Table 2.
    Figure 2 Displaying the device topology in the JSON format
Table 2 Parameter description

Parameter

Description

NPUx

Indicates the NPU installed on the server. x indicates the NPU ID.

SYS

Indicates two chips using the SMP protocol are located and used on two different NUMA nodes. (Chips directly connected to the HCCS cannot be obtained and are irrelevant to the topology information.)

NODE

Indicates that two chips are connected through PCIe, the connection passes through different CPUs, and the CPUs are located on the same NUMA node.

PHB

Indicates that two chips are connected to the same CPU through PCIe, and the connection passes through the CPU.

PXB

Indicates that two chips are connected to the same CPU through PCIe, and the connection need not pass through the CPU but traverses multiple PCIe switches.

PIX

Indicates two chips are connected to the same CPU through PCIe, and the connection need not pass through the CPU but traverses a PCIe switch.

CPU Affinity

Indicates the affinity between devices and CPUs on a NUMA node.

As shown in Figure 1, 0-3 and 8-11 under CPU Affinity indicate that the NPUs have affinity with CPUs 0 to 3 and 8 to 11.