If you run a large local AI model across two or more NVIDIA graphics cards, how those cards talk to each other matters. Two cards joined by an NVLink bridge have a direct link. Two cards in ordinary slots send their traffic over PCIe, sometimes through the processor and sometimes through switches on the motherboard. nvidia-smi, the command-line tool installed with NVIDIA's driver, can show you exactly which you have, which helps you pick the right split mode in llama.cpp or the right parallelism setting in vLLM.
The commands and the meaning of each code come from NVIDIA's official nvidia-smi documentation, read on 2 December 2026. NVIDIA notes that nvidia-smi's output "is not guaranteed to be backwards compatible", so labels can change between driver versions.
What you need
Two or more NVIDIA graphics cards with the NVIDIA driver installed. nvidia-smi comes with the driver on Linux and 64-bit Windows.
A terminal: Terminal or PowerShell on Windows, or any shell on Linux.
Native Windows or Linux, not WSL. NVIDIA's documentation says "nvidia-smi topo" is supported on Linux and Windows but "WSL is not supported". If you run your AI tools in WSL 2, run the topology commands from Windows itself.
Step 1: List your GPUs
Run nvidia-smi -L. This lists every GPU with its index number and UUID. Note the index of each card, because the topology matrix and AI tools refer to cards by these numbers.
Step 2: Show the connection matrix
Run nvidia-smi topo -m. NVIDIA describes this as a matrix of connections between all GPUs and network cards, along with the CPU and memory affinity of each GPU. Find the row for GPU0 and the column for GPU1: the code where they meet tells you how traffic between them travels. NVIDIA's legend is:
Code | What NVIDIA says it means | In plain terms |
|---|
X | Self | The card itself |
NV# | Connection traversing a bonded set of # NVLinks | A direct NVLink connection; the number is how many links |
PIX | Connection traversing a single PCIe switch | Both cards hang off one PCIe switch |
PXB | Connection traversing multiple PCIe switches (without traversing the PCIe Host Bridge) | Several switches, but no trip through the processor |
PHB | Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU) | Traffic goes through the processor |
NODE | Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node | Between host bridges in one processor |
SYS | Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI) | Across processor sockets, usually on dual-CPU workstations |
Without a working NVLink bridge you will see one of the PCIe codes rather than NV#. If you have fitted a bridge and don't see NV#, check it with Step 4.
To hide NVLink and see only the PCIe route, run nvidia-smi topo -mp. NVIDIA says this "excludes NVLINK connections and shows PCI connections between GPUs", which is useful for checking which slots and switches your bridged cards also share.
Step 3: Check peer-to-peer support
Peer-to-peer (P2P) access lets one card read and write the other's memory directly, and nvidia-smi can show whether your cards support it. Run nvidia-smi topo -p2p followed by one capability letter. NVIDIA lists:
For example, nvidia-smi topo -p2p n shows whether each pair of cards can use NVLink for peer-to-peer transfers, and nvidia-smi topo -p2p p shows the same for PCIe.
To see the most direct PCIe path between a specific pair, run nvidia-smi topo -p -i 0,1, replacing 0 and 1 with your GPU indexes from Step 1.
Step 4: Check the NVLink bridge itself
If your cards support NVLink and you have fitted a bridge, run nvidia-smi nvlink -s (or --status). According to NVIDIA, if a link is Active the command displays its bandwidth; a link that is present but not active shows as Inactive, and one in a low-power state shows as Sleep. nvidia-smi nvlink -c shows each link's capabilities, and -i limits either command to particular GPUs, for example nvidia-smi nvlink -s -i 0.
Few current cards have NVLink at all. NVIDIA's specifications list NVLink as supported on the GeForce RTX 3090 and RTX 3090 Ti, and the RTX A6000 page lists a two-way NVLink bridge. The GeForce RTX 4090 specifications list NVLink as "No". If your cards don't have the connector, topo -m will show a PCIe code and that is normal. See our NVLink vs PCIe comparison for what that means for local AI. If you want cards that do support a bridge, see our best NVLink graphics cards for local AI.
Step 5: Check each card's PCIe link
The topology matrix shows the route but not how many lanes each card gets. A second slot wired to the chipset, or one that runs at fewer lanes, gives that card a narrower link. Our guide to checking your GPU's PCIe link speed shows how to confirm the generation and width each card is actually running at, and our PCIe x16 vs x8 comparison explains what a narrower slot means.
What to do with the result
In llama.cpp, the server documentation lists these split modes for --split-mode (-sm):
layer (the default): "split layers and KV across GPUs (pipelined)". Each card handles its own block of layers in turn. This is the default and the usual starting point for cards linked only by PCIe.
row: "split weight across GPUs by rows (parallelized)". The cards work on the same layers in parallel, so this is the mode where the link between them is most likely to matter.
tensor: "split weights and KV across GPUs (parallelized, EXPERIMENTAL)", as the documentation labels it.
none: use one GPU only.
--tensor-split (-ts) sets the proportion each card gets, for example 3,1, and --main-gpu picks the card for single-GPU mode or for intermediate results in row mode. Our guide to running a local LLM on two GPUs covers the equivalent settings in Ollama and LM Studio.
In vLLM, the parallelism documentation recommends tensor parallelism when a model is too large for one GPU but fits on one machine with several GPUs. It adds that "if the GPUs on the node do not have NVLINK interconnect", you should use pipeline parallelism instead "for higher throughput and lower communication overhead", by setting --tensor-parallel-size 1 and --pipeline-parallel-size to the number of GPUs. A PCIe code in your topology matrix is therefore a reason to try pipeline parallelism first. If you haven't installed vLLM yet, see how to install vLLM in WSL2, remembering that topology checks must be run from Windows.
While it runs
Once a model is split, our guide to seeing which apps use your GPU with nvidia-smi shows how to confirm that each card is holding part of the model. Two busy cards draw a lot of power, so check our best power supplies for dual-GPU local AI before adding a second card.