Rate This Document
Findability
Accuracy
Completeness
Readability

Determining the GPU Topology

Configuration Scheme 1

  1. Query GPU rendering nodes.
    1
    ll /dev/dri/by-path/ | grep renderD
    

    Example command output:

    1
    2
    lrwxrwxrwx 1 root root 13 Oct 25 10:58 pci-0000:03:00.0-render -> ../renderD128
    lrwxrwxrwx 1 root root 13 Oct 25 10:58 pci-0000:83:00.0-render -> ../renderD129
    

    This indicates that two AMD GPUs are inserted into the server, and the rendering nodes are renderD128 and renderD129.

  2. Query the NUMA node to which a GPU rendering node belongs.
    1
    cat /sys/bus/pci/devices/0000\:XX\:00.0/numa_node 
    

    Replace XX in the command with the IP address of a node queried in step 1. Take renderD128 as an example. The query command is as follows:

    1
    cat /sys/bus/pci/devices/0000\:03\:00.0/numa_node
    

    Command output:

    1
    0
    

    This indicates that renderD128 belongs to NUMA node 0.

Configuration Scheme 2

Check the NUMA node to which the GPU nodes belong.
1
lspci -vvv -d :0200 | grep NUMA
Each GCH GPU (DC1000) has four GPU nodes. Each line in the command output indicates the NUMA node of a GPU node (starting from renderD128). Example command output:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
NUMA node: 0
NUMA node: 0
NUMA node: 0
NUMA node: 0
NUMA node: 0
NUMA node: 0
NUMA node: 0
NUMA node: 0
NUMA node: 2
NUMA node: 2
NUMA node: 2
NUMA node: 2
NUMA node: 2
NUMA node: 2
NUMA node: 2
NUMA node: 2

The command output shows that, in the /dev/dri/ directory, rendering nodes renderD128 to renderD135 belong to NUMA0 and renderD136 to renderD143 belong to NUMA2.