How to Run llama.cpp on AMD GPUs: ROCm or Vulkan

Run llama.cpp on an AMD GPU with a prebuilt Vulkan or ROCm binary, or build it with -DGGML_VULKAN=ON or -DGGML_HIP=ON. Checked 1 Dec 2026.

Title card on white. The title run llama.cpp on an AMD GPU over a yellow underline, the lilac line two routes: a prebuilt binary or a build from source, and two soft white pills with lilac shadows reading Build b12774, published 26 Nov 2026 and gfx1100 corresponds to Radeon RX 7900XTX/XT/GRE, beside a yellow gear meshed with a smaller lilac gear.

To run llama.cpp on an AMD GPU, download a prebuilt Vulkan or ROCm binary from the releases page, or build it with -DGGML_VULKAN=ON or -DGGML_HIP=ON, the flags the build docs give. HIP needs ROCm installed; a Vulkan build needs the Vulkan SDK or your distro’s packages. Checked 1 Dec 2026.

New to the project? Our llama.cpp 1.0 explainer covers its version rules, and the Guides hub has more setups. Before you load a GGUF file from an account you do not know, read how to check a GGUF model before you run it.

What are the ways to run llama.cpp on AMD?

There are two routes: a prebuilt binary or a build from source, each with a Vulkan or a HIP backend. The build docs also describe a third, experimental HRX backend. As read on 1 Dec 2026:

Backend What you install Build flag Prebuilt asset, build b12774 Operating systems
Vulkan Vulkan SDK, or libvulkan-dev glslc spirv-headers on Debian / Ubuntu -DGGML_VULKAN=ON (Linux steps: =1) llama-b12774-bin-win-vulkan-x64.zip, llama-b12774-bin-ubuntu-vulkan-x64.tar.gz Build steps for Windows, Linux and macOS; prebuilt for Windows x64 and Ubuntu x64
HIP (ROCm) ROCm -DGGML_HIP=ON llama-b12774-bin-win-rocm-10.0-x64.zip, llama-b12774-bin-ubuntu-rocm-10.0-x64.tar.gz Build steps for Linux and Windows; prebuilt for Windows x64 and Ubuntu x64
HRX HRX SDK v0.2.0; “ROCm is not required” -DGGML_HRX=ON None listed Not stated

For HRX, the docs say “The backend is experimental” and that this version “targets TinyStories-15M”.

Animation. On a white background, a blue gearbox with a soft white lever sits between two gears: a yellow gear labelled Vulkan and a lilac gear labelled HIP. The lever slides, the gearbox shifts from one gear to the other, and the engaged gear turns a mint shaft. Tapping the gearbox shifts it to the other gear.
Vulkan and HIP both have build steps in the docs and prebuilt x64 binaries in build b12774. Read 1 Dec 2026.

Where do you get a prebuilt AMD binary?

From build b12774, which the v1.1.0 release of 26 Nov 2026 names as its “Nightly build”. The v1.1.0 page itself lists one asset, nightly-tag.txt. Build b12774, published 26 Nov 2026, lists “Windows x64 (Vulkan)”, “Ubuntu x64 (Vulkan)”, “Windows x64 (ROCm 10.0)” and “Ubuntu x64 (ROCm 10.0)”, with the file names in the table above.

To see a list of available devices, the docs give the --list-devices option, and --device to pick which to use.

How do you build llama.cpp with ROCm?

Install ROCm, then run CMake with -DGGML_HIP=ON and your GPU’s target. The build docs print this for Linux, “assuming a gfx1030-compatible AMD GPU”:

HIPCXX="$(hipconfig -l)/clang" HIP_PATH="$(hipconfig -R)" \
    cmake -S . -B build -DGGML_HIP=ON -DGPU_TARGETS=gfx1030 -DCMAKE_BUILD_TYPE=Release \
    && cmake --build build --config Release -- -j 16

The docs note: “GPU_TARGETS is optional, omitting it will build the code for all GPUs in the current system.” On Windows, in the x64 Native Tools Command Prompt for VS:

set PATH=%HIP_PATH%\bin;%PATH%
cmake -S . -B build -G Ninja -DGPU_TARGETS=gfx1100 -DGGML_HIP=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release
cmake --build build

The docs say gfx1100 “corresponds to Radeon RX 7900XTX/XT/GRE”. To find yours, they say: “Find your gpu version string by matching the most significant version information from rocminfo | grep gfx | head -1 | awk '{print $2}' with the list of processors, e.g. gfx1035 maps to gfx1030.” The list is LLVM’s processor table.

Animation. On a white background, a blue anvil holds a soft white bar under a sky sign that reads ROCm. A yellow hammer drops on its own and strikes the bar, a mint spark flies, and the word gfx1100 appears stamped on the bar in lilac. Tapping the anvil strikes the bar again.
The build docs say gfx1100 corresponds to Radeon RX 7900XTX/XT/GRE. Read 1 Dec 2026.

What if ROCm does not support your GPU?

The build docs offer HSA_OVERRIDE_GFX_VERSION, set to a similar GPU, and note it is not supported on Windows. Their examples: “10.3.0 on RDNA2 (e.g. gfx1030, gfx1031, or gfx1035) or 11.0.0 on RDNA3”. HIP_VISIBLE_DEVICES picks which GPUs are used.

Check AMD’s list first. The ROCm 10.2.0 compatibility matrix, dated 26 Aug 2026 and read 1 Dec 2026, “Applies to Linux and Windows” and lists Radeon GPUs such as the AMD Radeon RX 9070 XT (gfx1201), AMD Radeon RX 7900 XTX (gfx1100) and AMD Radeon RX 7600 (gfx1102). Our view: if your card is missing there, try Vulkan, since the Vulkan steps in the docs do not ask for ROCm.

How do you build llama.cpp with Vulkan?

Install the Vulkan SDK or your distro’s packages, check vulkaninfo, then build with -DGGML_VULKAN=1 on Linux. On Debian / Ubuntu the docs give:

sudo apt-get install libvulkan-dev glslc spirv-headers
vulkaninfo
cmake -B build -DGGML_VULKAN=1
cmake --build build --config Release

The llama.cpp docs name no GPU maker for Vulkan. AMD’s GPUOpen Vulkan page, read 1 Dec 2026, describes an open source Vulkan driver for AMD Radeon graphics adapters on Linux and lists the Vulkan version in each Radeon Software Adrenalin driver release.

The Windows steps (w64devkit, Git Bash or MSYS2) use cmake -B build -DGGML_VULKAN=ON. On Linux, the docs then test the build with a model:

./build/bin/llama-cli -m "PATH_TO_MODEL" -p "Hi you how are you" -ngl 99

The docs say -ngl 99 “should offload all of the layers to GPU for most (if not all) models”, and that you should see in the output that “ggml_vulkan detected your GPU”.

Animation. On a white background, a sky desk fan with yellow blades stands beside a lilac card that reads model. The card slides into a soft white slot labelled ggml_vulkan, the blades spin up, and a mint light glows. Tapping the fan stops the blades and spins them up again.
After a Vulkan build, the output should show ggml_vulkan detected your GPU. llama.cpp build docs, read 1 Dec 2026.

What was the AMD llama.cpp story on Hacker News?

It was a post titled “AMD-specific fork of llama.cpp”, submitted to Hacker News on 26 Nov 2026. The post on devnull.land, dated the same day, says: “I recommend using llama-cpp-rdna-boosts if you have an AMD graphics card.”

The post calls llama-cpp-rdna-boosts “a minimal set of changes that you apply against a pinned commit of llama.cpp” and “in essence a fork”. Its author writes that the fork “increased my token generation from 35 to 55 tokens/second, and my prefill from 700 to 1300 tokens per second. YMMV.” The setup was “an AMD R9700”. These are the author’s own figures for llama-cpp-rdna-boosts, from the 26 Nov 2026 post, not figures for llama.cpp itself.

Can an agent team use your local model?

It can, when the agent app accepts your local engine. Munder Difflin is free and open source: a desktop app that runs a team of AI agents for all kinds of knowledge work, coding included, on your own computer. Its README, read 1 Dec 2026, says: “API keys and local models (Ollama, LM Studio, vLLM) go in Settings → Agents & Models.” It does not name llama.cpp. The install guide walks through setup.

FAQ

Does llama.cpp work on AMD GPUs?

Yes. Its build docs, read 1 Dec 2026, give a HIP backend, which "provides GPU acceleration on HIP-supported AMD GPUs" and needs ROCm, and a Vulkan backend. Build b12774 of 26 Nov 2026 ships prebuilt Vulkan and ROCm 10.0 binaries for Windows x64 and Ubuntu x64.

What is the llama.cpp ROCm build flag?

`-DGGML_HIP=ON`, with `GPU_TARGETS` set to your GPU's target, for example `-DGPU_TARGETS=gfx1100`. The build docs say `GPU_TARGETS` is optional, and omitting it builds for all GPUs in the current system.

What is the llama.cpp Vulkan build flag?

`-DGGML_VULKAN=ON` in the Windows steps of the build docs and `-DGGML_VULKAN=1` in the Linux steps. On Linux, the docs say to run `vulkaninfo` first and build only when it shows no errors.

Which gfx target is my Radeon card?

The build docs say `gfx1100` corresponds to Radeon RX 7900XTX/XT/GRE, and give `rocminfo | grep gfx | head -1 | awk '{print $2}'` to read yours. AMD's ROCm 10.2.0 compatibility matrix lists each Radeon GPU with its target.

What was the AMD llama.cpp story on Hacker News?

A post titled "AMD-specific fork of llama.cpp", submitted on 26 Nov 2026. It recommends llama-cpp-rdna-boosts, a set of patches applied to a pinned llama.cpp commit, so it is a fork, not llama.cpp itself.