Skip to content

How-ToGPU

How to Check How Your GPUs Are Connected With nvidia-smi Before Splitting a Local AI Model

Before you split a local AI model across two NVIDIA cards, check how they connect. We show how to use nvidia-smi to read the GPU topology matrix, check peer-to-peer and NVLink status, and choose llama.cpp split modes or vLLM parallelism to match.

By , Systems & Technical Editor

5 min read

How to Check How Your GPUs Are Connected With nvidia-smi Before Splitting a Local AI Model

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:

  • r: P2P read capability

  • w: P2P write capability

  • n: P2P NVLink capability

  • a: P2P atomics capability

  • p: P2P PCIe capability

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.

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.

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.

The bottom line

Run nvidia-smi -L to number your cards, then nvidia-smi topo -m to see how each pair connects: NV# means an NVLink bridge is working, while PIX, PXB, PHB, NODE or SYS mean traffic goes over PCIe. Use nvidia-smi topo -p2p to check peer-to-peer support and nvidia-smi nvlink -s to confirm a bridge is active, from Windows or Linux rather than WSL. With PCIe only, keep llama.cpp on its default layer split and try pipeline parallelism in vLLM, as its documentation advises for GPUs without NVLink.

Sources

  1. 01NVIDIA nvidia-smi documentation
  2. 02llama.cpp server README on GitHub
  3. 03vLLM documentation, Parallelism and Scaling
  4. 04NVIDIA GeForce RTX 3090 Family specifications
  5. 05NVIDIA RTX A6000 specifications
  6. 06NVIDIA GeForce RTX 4090 specifications

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Best NVLink Graphics Cards for Local AI in 2026

Best Picks

Best NVLink Graphics Cards for Local AI in 2026

NVLink has gone from NVIDIA's newer cards, but a bridged pair can still help some multi-GPU local AI setups. These are the best cards NVIDIA lists with a two-way NVLink bridge, from the 48GB RTX A6000 to the GeForce RTX 3090, with memory, power and fit compared.

Hannah Vance6 min

NVLink vs PCIe for Multi-GPU Local AI: Does a Bridge Still Matter?

Versus

NVLink vs PCIe for Multi-GPU Local AI: Does a Bridge Still Matter?

NVLink bridges once made multi-GPU setups faster, but current GeForce cards don't have them. We compare NVLink and PCIe for running local AI on two NVIDIA cards: which cards support a bridge, how llama.cpp and vLLM split models, and what to buy.

Callum Reid5 min

How to Use AMD Radeon Anti-Lag and Anti-Lag 2 to Cut Input Lag

How-To

How to Use AMD Radeon Anti-Lag and Anti-Lag 2 to Cut Input Lag

AMD has two latency features with almost the same name. Using AMD's documentation and driver release notes, we explain Radeon Anti-Lag vs Anti-Lag 2, which Radeon cards and Ryzen APUs support each, how to turn them on per game or with HYPR-RX, and how to use AMD's Latency Monitor.

Marcus Thorne5 min