Interpreting GPU fabric topology#

The amd-smi topology command reports the fabric connections between the GPUs in a node. It is the primary tool for verifying that the AMD Infinity Fabric™ (xGMI) mesh is fully cabled and that every GPU can reach every other GPU over the expected link type. This page explains how to read its output, with particular attention to what the hops and weight tables actually count, because both are easily misread.

Run the topology query#

amd-smi topology

The command emits several square matrices. Each matrix is indexed by PCIe BDF (domain:bus:device.function); the diagonal corresponds to a GPU paired with itself. The example below is from a fully-cabled 8x MI300X system.

$ amd-smi topology
ACCESS TABLE:
             0000:0c:00.0 0000:22:00.0 0000:38:00.0 0000:5c:00.0 0000:9f:00.0 0000:af:00.0 0000:bf:00.0 0000:df:00.0
0000:0c:00.0 ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED
0000:22:00.0 ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED
0000:38:00.0 ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED
0000:5c:00.0 ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED
0000:9f:00.0 ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED
0000:af:00.0 ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED
0000:bf:00.0 ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED
0000:df:00.0 ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED      ENABLED
WEIGHT TABLE:
             0000:0c:00.0 0000:22:00.0 0000:38:00.0 0000:5c:00.0 0000:9f:00.0 0000:af:00.0 0000:bf:00.0 0000:df:00.0
0000:0c:00.0 0            15           15           15           15           15           15           15
0000:22:00.0 15           0            15           15           15           15           15           15
0000:38:00.0 15           15           0            15           15           15           15           15
0000:5c:00.0 15           15           15           0            15           15           15           15
0000:9f:00.0 15           15           15           15           0            15           15           15
0000:af:00.0 15           15           15           15           15           0            15           15
0000:bf:00.0 15           15           15           15           15           15           0            15
0000:df:00.0 15           15           15           15           15           15           15           0
HOPS TABLE:
             0000:0c:00.0 0000:22:00.0 0000:38:00.0 0000:5c:00.0 0000:9f:00.0 0000:af:00.0 0000:bf:00.0 0000:df:00.0
0000:0c:00.0 0            1            1            1            1            1            1            1
0000:22:00.0 1            0            1            1            1            1            1            1
0000:38:00.0 1            1            0            1            1            1            1            1
0000:5c:00.0 1            1            1            0            1            1            1            1
0000:9f:00.0 1            1            1            1            0            1            1            1
0000:af:00.0 1            1            1            1            1            0            1            1
0000:bf:00.0 1            1            1            1            1            1            0            1
0000:df:00.0 1            1            1            1            1            1            1            0
LINK TYPE TABLE:
             0000:0c:00.0 0000:22:00.0 0000:38:00.0 0000:5c:00.0 0000:9f:00.0 0000:af:00.0 0000:bf:00.0 0000:df:00.0
0000:0c:00.0 SELF         XGMI         XGMI         XGMI         XGMI         XGMI         XGMI         XGMI
0000:22:00.0 XGMI         SELF         XGMI         XGMI         XGMI         XGMI         XGMI         XGMI
0000:38:00.0 XGMI         XGMI         SELF         XGMI         XGMI         XGMI         XGMI         XGMI
0000:5c:00.0 XGMI         XGMI         XGMI         SELF         XGMI         XGMI         XGMI         XGMI
0000:9f:00.0 XGMI         XGMI         XGMI         XGMI         SELF         XGMI         XGMI         XGMI
0000:af:00.0 XGMI         XGMI         XGMI         XGMI         XGMI         SELF         XGMI         XGMI
0000:bf:00.0 XGMI         XGMI         XGMI         XGMI         XGMI         XGMI         SELF         XGMI
0000:df:00.0 XGMI         XGMI         XGMI         XGMI         XGMI         XGMI         XGMI         SELF

Weight: a qualitative cost metric#

The weight table is a qualitative cost metric the kernel assigns to each link, similar in spirit to the NUMA distances reported by numactl. Lower values indicate closer or faster connections.

Each value comes from the KFD io_link weight property exposed at /sys/class/kfd/kfd/topology/nodes/<n>/io_links/<m>/properties. For multi-segment PCIe routes, the SMI library sums the segment weights (GPU→CPU + CPU→CPU + CPU→GPU). The amdgpu driver computes each xGMI io_link weight as KFD_CRAT_XGMI_WEIGHT × num_hops — 15 per physical xGMI hop on a single-partition system — while PCIe segments contribute a fixed cost of 20.

Because the weight is derived from the physical hop count, it carries distance information that the abstracted hops table does not. On an 8x MI300X system every GPU pair is one physical xGMI hop apart, so every off-diagonal weight is 15. On a non-uniform fabric, larger weights (for example 30 or 45) indicate pairs separated by two or three physical xGMI hops respectively.

Result#

  • PASSED: Every off-diagonal access entry is ENABLED, every off-diagonal link type entry is XGMI, and the hops and weight tables match the expected pattern for your platform (for a fully-cabled 8x MI300X system, all off-diagonal hops are 1 and all off-diagonal weights are 15).

  • FAILED: Any off-diagonal pair reports DISABLED access, a PCIE link type where xGMI is expected, or weights higher than expected for the platform.

    • Action: A PCIE link type or DISABLED access between GPUs that should be xGMI-connected usually indicates a missing or improperly seated Infinity Fabric bridge. Verify the physical fabric cabling and reseat the bridges, then rerun the query.