Home / use case

Ollama on an AMD Radeon: five silent ways it falls back to CPU

At a glance
Hardware
AMD Radeon RX 7900 XTX (24 GB) with a Ryzen 9 7950X3D
Models & engines
Models tested include gpt-oss:20b, gemma4, qwen3.8 and muse-glimmer
Key gotcha
Updating drivers, the BIOS or Ollama can leave it on CPU with no warning until it is restarted.

What they built

This is a field report from running local models with Ollama on a 24 GB Radeon RX 7900 XTX next to a Ryzen 9 7950X3D, measured over three weeks on Windows, native Linux and inside WSL2. Rather than an install guide, it lists five ways the setup breaks without saying so, with numbers for each and notes on what did not fix them.

The headline failure is that Ollama can start, answer correctly and still be running on the CPU. After a driver reinstall the author saw 15.89 tokens per second instead of 132.48, an 8.3x penalty, with no error in the log.

The post ends with a checklist the author now runs every time they touch the machine, plus a comparison of the ROCm and Vulkan backends on the same card.

Setup

  • AMD Radeon RX 7900 XTX (24 GB) with a Ryzen 9 7950X3D
  • Windows, native Linux and WSL2, with ROCm 7.1 and 7.2 and the Vulkan backend
  • Models tested include gpt-oss:20b, gemma4, qwen3.8 and muse-glimmer

How it works

  1. Ollama probes the GPU once at startup, so the author checks the library= line in the server log (server.log on Windows, journalctl -u ollama on Linux) and ollama ps for 100% GPU.
  2. On Ryzen chips with integrated graphics, ROCm lists the integrated GPU first and standalone llama-server picks it and crashes; disabling the integrated GPU in the BIOS fixed it, while Ollama masks the integrated GPU on its own.
  3. Inside WSL2, Ollama looks for GPUs through the KFD topology in sysfs, which WSL does not expose, so it falls back to CPU; the workaround is pointing WSL at Windows Ollama on localhost:11434 with mirrored networking.
  4. The real context length is read from /api/ps, because some models load with less context than requested.

Results & numbers

  • Disabling the integrated GPU took Ollama from 118 to 132.5 tokens per second and let standalone llama-server run at 136, at a cost of 0.2 GiB of VRAM.
  • Vulkan beat ROCm by 17.8% to 30.3% depending on the model, but left 0.6 GiB less VRAM free.
  • ollama ps underestimated real VRAM use by 4.3 to 6.8 GiB across four models; gpt-oss:20b showed 12.33 GiB but used 16.59.
  • qwen3.8 stayed 100% on GPU up to a 122,880-token context on ROCm, but only up to 98,304 on Vulkan.

Gotchas

  • Updating drivers, the BIOS or Ollama can leave it on CPU with no warning until it is restarted.
  • Every Ollama update reinstalls the ROCm bundle, which can quietly switch you back from Vulkan.
  • When a model does not fit, Ollama splits it between GPU and CPU and keeps answering, which only shows up in ollama ps.
  • Checks that require compute=gfx1100 or a pci_id fail on healthy Vulkan setups, which report compute=0.0 and an empty pci_id.
“Ollama probes the GPU exactly once, at startup, and never looks again.”— Marco Orta

Do it yourself

  1. If your Ryzen has integrated graphics, disable it in the BIOS.
  2. Restart Ollama after changing drivers, the BIOS or the Ollama version.
  3. Check the library= line in the startup log; if it says cpu, there is no GPU in use.
  4. Run ollama ps and make sure it shows 100% GPU before measuring anything.
  5. Read the real context_length from /api/ps instead of trusting the num_ctx you sent.
  6. Use the system VRAM counter, not ollama ps, to decide whether a model fits.
  7. If you develop in WSL2, call Windows Ollama on localhost:11434 instead of running Ollama inside WSL.
ollama ps
# NAME              SIZE     PROCESSOR
# gpt-oss:20b       16 GB    100% GPU
Source: Marco Orta (DEV Community) · Published 2026-10-28 · Added 2026-10-29. This write-up summarizes the original source; see it for full details.

Similar setups

Serving a local model on Kubernetes on your own laptop with kind and Ollama

Alex Jones wrote a tested guide to running Ollama in a kind cluster on CPU, Intel Arc, NVIDIA and AMD, then using the served model with k8sgpt to explain cluster failures without any data leaving the machine.

axjns.dev · 2026-11-09

Letting a coding agent tune llama.cpp on an 8 GB AMD GPU: 3x faster prompt reading for OpenCode

Cliff K had his coding agent benchmark llama.cpp backends and flags for a Qwen3.6 35B MoE on a Radeon RX 6600 XT, at the context depths OpenCode really uses, and turned the process into an open-source skill.

Cliff K (DEV Community) · 2026-11-01

A private OpenAI-compatible LLM API on an AMD GPU with llama.cpp

A Vietnamese developer's notes on building llama.cpp for AMD cards, choosing between Vulkan and ROCm, and running llama-server as a locked-down systemd service that existing OpenAI SDK code can call.

DEV Community (EME GUG) · 2026-11-27

Faster local Qwen on an AMD eGPU with the llama-cpp-rdna-boosts patches

A developer running a Qwen3.8-27B fine-tune on an AMD R9700 eGPU swapped vanilla llama.cpp for a small set of AMD-specific patches in a Podman image and roughly doubled prefill speed.

devnull.land · 2026-11-27