If you run local AI on an AMD Radeon card, you'll hit two competing backends: ROCm and Vulkan. Which one you use changes your tokens-per-second, your setup effort, and how many GPUs are supported. This guide explains the difference, how to set each up, and – based on our RX 6800M benchmarks – which to pick.
Source note: speed numbers below are lab-tested on an RX 6800M 12 GB laptop via llama.cpp (same engine Ollama uses) – full runs in the benchmark database. Install commands follow AMD docs and the llama.cpp build flags; support lists change, so check the linked official docs for your exact card before you commit to ROCm.
What's the difference?
Both are ways for software like llama.cpp and Ollama to talk to your GPU. They solve the same problem (run the model on the graphics card instead of the CPU) but go about it differently:
- ROCm is AMD's CUDA equivalent – a purpose-built compute stack with HIP (AMD's CUDA-like language). It's what AMD pushes for AI and HPC.
- Vulkan is a cross-vendor graphics and compute API. It's lower-level and more general, but llama.cpp's Vulkan backend works broadly because it doesn't depend on AMD-specific driver quirks.
The practical differences: ROCm is usually faster on supported cards, but officially supports a narrower list. Vulkan works on more GPUs (including older and unsupported Radeons) and is easier to get running, but can be a bit slower in some workloads.
Which one is faster?
The honest answer from our testing on an RX 6800M (12 GB): it depends on the workload.
- For Qwen 27B at 16K context (dense): Vulkan was ~20% faster at decode (21.8 vs 18.1 tok/s), while ROCm won prompt eval by ~45%.
- For Ornith 35B MoE at 262K: ROCm was ~30% faster at decode (25.6 vs 19.7 tok/s).
Why the flip? The bottleneck changes. On a dense model that's partially offloaded, the slower part is feeding bytes to the GPU – where Vulkan's simpler path wins. On a huge-context MoE with many CPU experts, the constraint moves elsewhere and ROCm's compute advantage shows. The full numbers are in the benchmark database and the MoE vs Dense Lab test.
How we tested (so you can reproduce)
Same laptop, same models, same prompts – only the backend changed. RX 6800M 12 GB
(gfx1031), Ubuntu, llama.cpp built twice: once -DLLAMA_HIPBLAS=ON (ROCm),
once -DLLAMA_VULKAN=ON. Each run reports prompt-eval speed (prefill, how fast
your prompt is absorbed) and decode speed (generation, what chat feels like), plus VRAM fit
and offload split. Qwen 27B Ridge ran at 16K context dense; Ornith 35B MoE at 262K with q8 KV –
the two extremes that expose each backend's strength.
Reproduce it: build both backends, run llama-bench -m your-model.gguf -p 512 -n 128
on each, and compare the same two numbers. Do not compare a ROCm prefill against a Vulkan decode –
that mistake makes either backend “win” by 10x. Keep context, quant, and KV identical; change one
variable at a time. Our exact per-run tables live in the
Qwen 27B test and
Ornith 35B test.
Setting up ROCm
ROCm is the more involved install. On Ubuntu, you use AMD's installer, choosing the
right GPU version flag for your card. Our step-by-step
ROCm on Ubuntu guide covers the full flow –
from the apt repo to rocminfo verifying your GPU is seen. The short
version:
sudo amdgpu-install --usecase=rocm,graphics --gfxversion=gfx1031 # RX 6800M rocminfo # verify the GPU shows up
Then build llama.cpp with ROCm support:
cmake .. -DLLAMA_HIPBLAS=ON. Note that RDNA2 (gfx1030) and RDNA3
(gfx1100) need different flags, and you may need --load-mode none in
llama.cpp to avoid splitting weights across GPU and CPU.
If you haven't run it directly before, start with the
llama.cpp guide – it covers install, GPU offload, and reading benchmark output.
Setting up Vulkan
Vulkan is simpler. Install the Vulkan drivers, then build llama.cpp with Vulkan:
# Ubuntu: install the Vulkan driver sudo apt install mesa-vulkan-drivers # llama.cpp with Vulkan cmake .. -DLLAMA_VULKAN=ON make -j$(nproc)
Ollama also ships Vulkan builds for AMD. The big win: if your card isn't on ROCm's official support list, Vulkan is almost certainly your working option.
Ollama backend choice in practice: the installer auto-detects, but you can force the issue.
If ollama ps shows CPU-only on a Radeon that should accelerate, check which build
you installed – ROCm builds need the ROCm runtime present (rocminfo must see the GPU
first), Vulkan builds need mesa drivers. When in doubt, start with the Vulkan build (fewer
dependencies), confirm GPU offload in ollama ps, then try the ROCm build and keep the
faster one for your main model. Full driver path is in the
ROCm install guide.
Failure modes we hit (so you don't)
- Wrong gfx flag: RDNA2 (gfx1030) vs RDNA3 (gfx1100) vs 6800M (gfx1031) – one wrong digit and ROCm builds but never sees the GPU.
rocminfoempty = flag or driver problem, not a model problem. - Weight splitting across GPU/CPU: default offload heuristics sometimes split badly on 12 GB cards;
--load-mode noneequivalent (keep resident layers together) fixed several “slow for no reason” runs. - Vulkan missing driver:
mesa-vulkan-driversabsent = llama.cpp builds fine but falls back to CPU silently. If decode is ~5 tok/s on a GPU that should do 40+, check the driver before the model. - KV OOM at long context: weights fit but 128K+ KV does not – halve context or switch KV to q4 before blaming the backend. See how much VRAM.
Read the numbers right: prefill vs decode
Every benchmark reports two speeds and beginners optimize the wrong one. Prompt eval (prefill) measures how fast your prompt is absorbed – matters for long documents and batch jobs. Decode measures token-by-token generation – what chat feels like. Our Qwen 27B run is the perfect example: ROCm won prefill by ~45% but lost decode by ~20%. If you chat, optimize decode; if you ingest 100-page PDFs, optimize prefill. Most “Vulkan is slow” complaints are really “I compared my decode against their prefill” – compare like with like.
Timebox rule for ROCm: give it 90 minutes. If rocminfo does not see your GPU by then,
or the build succeeds but offload stays at zero, switch to Vulkan and start working – a running model
today beats a perfect backend next week. Unsupported laptop Radeons (including several 6000M variants)
fall in this bucket by design; Vulkan there is not a compromise, it is the answer. Laptops add one more
variable: sustained decode throttles on heat – our 6800M numbers are with cooling maxed, so expect 10–15%
lower on a warm desk without a stand.
How to choose
| Your situation | Best backend |
|---|---|
| Officially supported Radeon, want max compute speed | ROCm |
| Unsupported / older / laptop Radeon | Vulkan |
| Chat (decode-bound) on a dense model | Vulkan (often) |
| Huge context / MoE workloads | ROCm (often) |
| Simplest setup, widest compatibility | Vulkan |
The safest advice: try both and benchmark. Building both backends and running the same prompt through each takes minutes, and the winner genuinely depends on your exact card and model. Our Lab does exactly this – see the Qwen 27B ROCm vs Vulkan test, Ornith 35B ROCm vs Vulkan test, and the Qwen3.8 GSQ-RCO quant test.
Ollama vs raw llama.cpp for backend testing: use llama.cpp when comparing backends (explicit flags, clean bench numbers), use Ollama for daily driving once you have picked a winner (auto-updates, library, API for tools). Our lab numbers come from llama.cpp precisely because the flags are visible – then the recommendation carries straight into Ollama, which wraps the same engine.
Bottom line
ROCm and Vulkan both run local AI on AMD, and neither is universally better. ROCm targets supported cards for max compute; Vulkan covers everything else and often wins on chat-speed. Start with the simplest backend that works on your card (usually Vulkan), and don't be afraid to benchmark the other – the numbers, not the marketing, should decide. Re-test after every major driver or llama.cpp release – backend leadership flips with versions as often as with models, so keep both builds handy.
Want to know what your Radeon can do? Check the benchmark database or the GPU AI Performance Calculator.
FAQ
Which is faster, ROCm or Vulkan on AMD?
Workload-dependent. RX 6800M lab: Vulkan won dense-27B decode ~20%, ROCm won 262K-MoE decode ~30%. Benchmark both on your card.
Does my AMD GPU support ROCm?
Check AMD's official support list for your exact ID. If absent, Vulkan is almost always the working option – broader, simpler.
Can I use Ollama with Vulkan or ROCm?
Yes – Ollama routes through llama.cpp. ROCm builds need the runtime + supported card; Vulkan builds need mesa drivers. Verify with ollama ps.