Route B detail: WSL2, with one hand-built bridge
Route B is Linux userland inside Windows: ROCm running in WSL2 Ubuntu 24.04, talking to the Windows AMD driver through AMD's librocdxg. Choose it when the box must stay a Windows desktop and serve models to your LAN — and when you want to compile everything yourself while still living in Windows.
The situation in June 2026
The official position was still "RX 9060 XT on Windows ROCm: unsupported" — but ROCm inside WSL2 worked against the Windows driver through the DXG bridge. Prerequisites from my notes: the Windows AMD driver installed, WSL2 with Ubuntu 24.04 running, and outbound networking working inside WSL (test this first — see the trap below).
Step 1 — install ROCm inside WSL
sudo apt install -y cmake make g++ wget https://repo.radeon.com/amdgpu-install/latest/ubuntu/noble/amdgpu-install_7.2.3.70204-1_all.deb sudo apt install ./amdgpu-install_7.2.3.70204-1_all.deb sudo apt update && sudo apt install rocm-hip-sdk
Step 2 — build the bridge against the Windows SDK
librocdxg compiles against Windows SDK headers that WSL sees under /mnt/c — so the Windows side needs the SDK installed (Visual Studio Build Tools' "Windows 11 SDK" component is enough):
git clone https://github.com/ROCm/librocdxg.git && cd librocdxg
export win_sdk="/mnt/c/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0"
mkdir -p build && cd build
cmake .. -DWIN_SDK="${win_sdk}/shared"
make && sudo make install
Step 3 — prove the bridge before touching llama.cpp
This is the check that tells you whether the bridge actually works, before you spend an afternoon debugging llama.cpp:
export HSA_ENABLE_DXG_DETECTION=1 ls -l /dev/dxg # must exist rocminfo # should list your GPU hipconfig --full
If rocminfo sees the card, everything above it can too. If it does not, stop — nothing downstream will.
Step 4 — build llama.cpp inside WSL
Build llama.cpp with HIP enabled for your exact gfx target, exactly as on the bare-Linux route:
cmake -B build \ -DGGML_HIP=ON -DGGML_HIPBLAS=ON \ -DCMAKE_BUILD_TYPE=Release \ -DAMDGPU_TARGETS=gfx1200 # RX 9060 XT / RX 9070 (RDNA 4)
The flag set and its per-card targets are documented in full on Route C's detail page; the same flags apply here, plus the bridge environment from step 3. AMD's official ROCm build guide for llama.cpp is the upstream reference: Building llama.cpp with AMD optimizations.
Two gotchas, both network-shaped
1. The .wslconfig trap. A customized .wslconfig (mirrored networking) broke outbound access for me — pip install failed, wget stalled; deleting it restored connectivity under the default NAT mode. If WSL cannot reach the internet, check .wslconfig before checking anything else.
2. NAT hides the server from your LAN. Under NAT mode, other machines cannot reach the server inside WSL — which defeats the point of a two-box design. The fix I used is a Windows-side port forward (run in an elevated PowerShell; the WSL address changes per boot unless you pin it):
# make a WSL2 server reachable from the LAN netsh interface portproxy add v4tov4 listenport=8080 listenaddress=0.0.0.0 ` connectport=8080 connectaddress=192.0.2.10 # WSL's NAT address, documentation form
And remember the two Windows settings from Route A's detail page — the TDR timeouts and the firewall scope apply to this route too, because the same GPU still draws your Windows desktop.
What I did not verify
- I did not measure tok/s for Route B on my hardware; treat WSL DXG passthrough as having overhead versus bare metal (Route C) and benchmark before trusting any claim, including mine.
- The amdgpu-install deb version (7.2.3.70204) and the SDK include path (10.0.26100.0) are quoted exactly as they were in June 2026 notes — both move.
- The librocdxg repository was hand-built by AMD's ROCm org at note time; check its current README before building.
Honesty note. All steps above are from my dated notes (June 2026) on the hardware described (RX 9060 XT 16 GB, Windows 11, WSL2 Ubuntu 24.04). No tok/s claims. Machine names and addresses do not appear; 192.0.2.10 is the IETF documentation range. Overview: The Three Routes That Actually Work. No affiliate links in this article.