AMD GPU not detected / ROCm unsupported (Ollama & llama.cpp)
LinuxWindows
作者: Jakub Rusinowski · 最后更新: 2026年6月22日
AI 教育者、本地 LLM 部署工作坊讲师
The error
Error: no compatible GPUs were discovered
When you see it
You have a Radeon card but Ollama runs on the CPU, or a ROCm build reports no devices. Common variants include rocBLAS error: Could not initialize Tensile host: No devices found. The GPU is installed, but the AMD compute stack won't claim it.
What's actually going on
AMD GPU inference goes through ROCm, and ROCm officially supports a narrower list of cards than NVIDIA's CUDA does. Your GPU may be unsupported, only *partially* supported, or supported but reporting a gfx architecture version that the installed ROCm libraries don't ship kernels for. On Windows the situation is patchier still. So this is a detection/compatibility problem, not a memory one.
How to fix it
1. Confirm ROCm sees the GPU
Check whether the AMD stack detects the card at all. rocminfo lists detected agents and rocm-smi shows GPU status. If neither sees it, the problem is the ROCm install or an unsupported card — fix that before anything else.
rocminfo | grep gfx # shows the GPU architecture if detected
rocm-smi2. Override the gfx version for partially-supported cards
Many consumer Radeons work fine but report a gfx version ROCm doesn't officially target. Forcing a compatible version with HSA_OVERRIDE_GFX_VERSION makes ROCm use kernels built for a near sibling. For example, several RDNA3 cards run with 11.0.0. Set it before launching.
# RDNA3 example — match the value to your architecture
export HSA_OVERRIDE_GFX_VERSION=11.0.0
ollama serve3. Install the ROCm build / right driver
Make sure you have the ROCm-enabled Ollama (or a HIP/ROCm build of llama.cpp) and a matching AMD driver. A stock install can be CPU-only or built against a different ROCm version than you have. On Linux, confirm your user is in the render and video groups so it can access the device.
# Linux (bash) — device permissions; log out and back in afterwards
sudo usermod -aG render,video $USER
# Windows (PowerShell) — no group step exists; check you have the ROCm build
ollama --version4. If your card is unsupported, size the model for what you can run Most common fix
If ROCm genuinely won't support your GPU, you may be running on CPU for now — in which case a smaller, lower-quant model is the difference between usable and unbearable. Check which models run acceptably on your setup so you pick one that performs.
Open the VRAM checker →
同样影响: Windows
相关内容
- The Linux deep dive: HSA_OVERRIDE_GFX_VERSION and the Vulkan fallback
- Works under sudo, fails as your user — the /dev/kfd groups
- Passing an AMD GPU into a container
Frequently asked questions
Is my AMD GPU supported for local LLMs?
Check ROCm’s supported-GPU list and run rocminfo to see your gfx version. Recent RDNA2/RDNA3 cards generally work (sometimes via a gfx override); older or low-end cards may be unsupported, leaving CPU inference.
What does HSA_OVERRIDE_GFX_VERSION do?
It tells ROCm to treat your GPU as a specified architecture so it uses kernels built for a close relative. It is the standard workaround for cards that are capable but not officially targeted by the installed ROCm — set it to a value matching your GPU generation.
Does AMD work on Windows for this?
Support is improving but still more limited than on Linux. Many users get the best results with ROCm on Linux; on Windows, check that your specific tool ships a working AMD/Vulkan backend for your card.