Run Ollama with full GPU acceleration on AMD's newest
consumer GPUs (Radeon RX 9070, RX 9070 XT, RX 9060 XT — internally gfx1201)
under Windows 11.
This repository contains the recipe — and either a pre-built binary or a push-button self-build script — to get local LLMs running on your GPU instead of falling back to CPU.
Status (May 2026): Verified working with Ollama 0.16.1 and Ollama 0.24.0. Discovery in ~1.3 s (vs. 30 s timeout on stock Ollama),
ollama psreports100% GPUfor 14B-class models on the 16 GB RX 9070 XT.
- Why this exists
- Which path is for you?
- Hardware requirements
- Path A — Use the pre-built ZIP (≈ 10 min)
- Path B — Build it yourself (≈ 60 min)
- After it works
- Maintenance: Ollama updates
- Troubleshooting
- How this actually works
- Disclaimer & credits
The official Ollama Windows installer ships acceleration libraries compiled
against ROCm 6.4.2. The Radeon RX 9000 series (RDNA 4) is too new for that
ROCm version — its compute architecture (gfx1201) is only supported by
ROCm 7.x.
The result on a stock install: Ollama discovers your GPU correctly, then hangs for 30 seconds trying to initialise it, gives up, and falls back to CPU. You end up running 9B+ models on your CPU at single-digit tokens per second when your GPU could do an order of magnitude better.
This repository ships the missing piece: an ml/backend/ggml/ggml/src/ggml-hip
build linked against ROCm 7.1.1, with amdhip64_7.dll and 56 Tensile
kernel files specifically for gfx1201. Drop it on top of a normal Ollama
install and the GPU works.
No patches to Ollama are required — the mainline source already supports
gfx1201. The trick is simply building it against ROCm 7 instead of ROCm 6.
| Question | Path A (Pre-built) | Path B (Self-build) |
|---|---|---|
| Time | ≈ 10 min | ≈ 60 min |
| Disk space | ≈ 2.5 GB | ≈ 15 GB |
| Tools required | HIP SDK + Ollama only | + VS 2022, CMake, Ninja, Git |
| Customisation possible | No | Yes — different GPU, newer Ollama, etc. |
| You trust someone else's compile | Yes | No |
If you just want it to work and you have an RX 9070 XT (or any other gfx1201
GPU) on Windows 11, Path A is the right choice. If you want full control,
need a different GPU target, or just don't run other people's binaries, do
Path B.
Both paths need the same hardware:
| Component | Requirement |
|---|---|
| GPU | AMD Radeon RX 9070, RX 9070 XT, or RX 9060 XT (compute capability gfx1201) |
| OS | Windows 11 (Windows 10 may work but is untested) |
| RAM | 16 GB minimum, 32 GB recommended for the 32B-class models |
| Disk | 5 GB free for HIP SDK + Ollama; +15 GB if you build yourself |
How do I check my GPU's compute architecture? After installing the HIP SDK (next section), run
"C:\Program Files\AMD\ROCm\7.1\bin\hipinfo.exe"— look for thegcnArchNameline. It should readgfx1201. If it doesn't, this repo won't help you (but you might be in luck with a different ROCm support repo — search for yourgcnArchon GitHub).
You need a reasonably modern AMD Adrenalin driver. 26.5.1 or newer is verified; anything from early 2026 onwards should work.
- Download from https://www.amd.com/en/support
- Run the installer, choose Full Install, reboot when prompted.
- Verify in Device Manager → Display adapters that your GPU is listed without a warning triangle.
This provides the GPU runtime libraries that Ollama needs. Without this, Ollama will not see your GPU, no matter what else you do.
- Go to https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html
- Download HIP SDK for Windows, version 7.1 (≈ 2 GB).
- Run the installer. Accept all defaults. Default install path is
C:\Program Files\AMD\ROCm\7.1\— keep that. - Reboot. The installer sets
HIP_PATHand adds entries to yourPATHthat only get picked up after a restart. - After reboot, verify by opening PowerShell and running:
You should see a wall of text starting with
& "C:\Program Files\AMD\ROCm\7.1\bin\hipinfo.exe"
Name: AMD Radeon RX 9070 XT(or whatever your card is) andgcnArchName: gfx1201. Ifhipinfohangs or errors out, the SDK isn't installed correctly — fix that before continuing.
- Download the official Windows installer from https://ollama.com/download
(
OllamaSetup.exe). - Run it. Default install path is
C:\Users\<YOU>\AppData\Local\Programs\Ollama\— keep that. - Let it start once. The tray icon will appear. You will see CPU-only inference at this point — that's expected, we fix it next.
- Quit Ollama before continuing: right-click the tray icon → Quit
Ollama. Also stop any background
ollama.exeprocesses (open Task Manager if unsure). The ROCm files are locked while Ollama runs and you can't replace them.
The pre-built ZIP deliberately does not contain amdhip64_7.dll — that
file is part of AMD's proprietary HIP runtime. You already have it on disk
from Step 2 (inside C:\Program Files\AMD\ROCm\7.1\bin\); the bundled
deploy script just copies it from there. This keeps the redistributed
archive limited to MIT-licensed files only.
- Download
ollama-rocm-gfx1201.zip(≈ 85 MB) from the Releases page of this repository. - Extract it anywhere (Desktop, Downloads — doesn't matter). You'll get a
folder containing:
ollama-rocm-gfx1201\ ├─ rocm\ │ ├─ ggml-hip.dll (57 MB) │ ├─ rocblas.dll (39 MB) │ ├─ libhipblas.dll │ ├─ libhipblaslt.dll │ └─ rocblas\library\… (~890 Tensile files) ├─ deploy.ps1 ← run this ├─ README.txt ├─ LICENSE └─ THIRD_PARTY_LICENSES.md - Open the extracted folder. Right-click
deploy.ps1→ Run with PowerShell. (Alternative: open a PowerShell window inside that folder and run.\deploy.ps1.) - The script will:
- Stop any running Ollama processes
- Back up the existing
rocmfolder torocm.bak.<timestamp> - Copy the MIT-licensed files from the ZIP
- Copy
amdhip64_7.dllfrom your local HIP SDK install - Verify the result and tell you it's done
If the script can't find Ollama or the HIP SDK in their default locations, it will say so with a clear error. You can override the defaults:
.\deploy.ps1 -OllamaPath "D:\Ollama" -HipPath "C:\Program Files\AMD\ROCm\7.1"-
Start Ollama from the Start Menu (or run
ollama servein a terminal). -
Open a new PowerShell or Command Prompt and run:
ollama ps
Initially you'll see no models loaded. That's fine.
-
Pull a small model to test (this downloads ≈ 9 GB):
ollama pull deepseek-r1:14b -
Run it with any prompt:
ollama run deepseek-r1:14b "Say hello in one sentence."
-
While it's responding, open another terminal and run
ollama ps:NAME PROCESSOR CONTEXT UNTIL deepseek-r1:14b 100% GPU 4096 4 minutes from nowIf you see
100% GPUin the PROCESSOR column — congratulations, it worked. If you see100% CPUorX%/Y% CPU/GPU, something went wrong; jump to Troubleshooting.
For deeper verification, the server log shows GPU discovery details:
Get-Content "$env:LOCALAPPDATA\Ollama\server.log" -Tail 30The magic line to look for:
inference compute id=0 library=ROCm compute=gfx1201 name=ROCm0
description="AMD Radeon RX 9070 XT" total="15.9 GiB" available="14.5 GiB"
This path produces the same files as the ZIP in Path A, but you control the build. Useful if:
- You have a non-RX-9070-XT
gfx1201device (e.g. RX 9060 XT) - You want to target multiple GPUs (e.g.
gfx1200;gfx1201) - A newer Ollama or HIP SDK version comes out and you don't want to wait for a pre-built release
- You don't run other people's binaries on principle
You still need the driver (Step 1), HIP SDK (Step 2), and Ollama (Step 3) from Path A above. Do those first. Don't bother with Step 4 (the ZIP) — you'll produce its contents yourself.
If you've already done Path A and now want to switch to a custom build, that's fine. Path B's deploy script handles backups properly and won't lose your existing setup.
Open an administrator PowerShell (Windows key, type "powershell", right-click → "Run as administrator") and run these one at a time:
winget install Git.Git -e
winget install Kitware.CMake -e
winget install Ninja-build.Ninja -e
winget install Microsoft.VisualStudio.2022.BuildTools -e --override "--quiet --wait --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"The last one is the big one (≈ 3 GB download, the VS 2022 C++ build tools). This will run for several minutes silently before returning.
Important — do NOT install the newer VS Build Tools 18 / "VS 2025" generation as your only MSVC. Its
cmathheaders (MSVC 14.51) conflict with HIP 7.1's__clang_hip_cmath.hand the build will fail with cryptic "cannot overload__host__ __device__ function" errors. The script deliberately targets MSVC 14.4x from VS 2022 BuildTools.
After all four succeed, close and reopen your PowerShell so new tools land in
PATH.
cd $HOME\Documents # or wherever you keep code
git clone https://github.com/xnyzer/ollama-rocm.git
cd ollama-rocm.\scripts\build-rocm.ps1 -Mode CheckThis inspects every tool and prints what's missing. Each missing item comes
with the exact winget install … command to fix it. Re-run until all lines
say [OK].
Typical successful output:
=== Pre-flight Check ===
[OK] git 2.54.0.windows.1
[OK] cmake version 4.3.2
[OK] ninja 1.13.2
[OK] VS 2022 BuildTools (C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools)
[OK] MSVC 14.44.35207
[OK] HIP SDK 7.1.51803
[OK] GPU: AMD Radeon RX 9070 XT (gcnArchName: gfx1201)
[OK] Ollama-Source: ...\ollama-rocm\ollama ← FAIL here, expected at first run
Voraussetzungen unvollstaendig - siehe [FAIL]-Eintraege oben.
The Ollama-Source [FAIL] is expected at this point — we clone it next.
Inside the ollama-rocm directory:
git clone https://github.com/ollama/ollama.git ollama
git -C ollama checkout v0.24.0This pulls the official Ollama mainline source (≈ 800 MB with history) and switches to the verified stable tag.
Why v0.24.0? It's the last stable release with
gfx1201support inCMakePresets.jsonand a cleangfx(120[01])regex filter inCMakeLists.txt. Newer release candidates (v0.25.0-rc0, v0.30.0-rcN) work too but are less battle-tested. Use-ExpectedTagto change the warning threshold.
Re-run the check to confirm it's happy:
.\scripts\build-rocm.ps1 -Mode CheckEvery line should now say [OK].
.\scripts\build-rocm.ps1 -Mode AllWhat this does:
- Loads
vcvars64.batfrom VS 2022 BuildTools (needed for the Windows SDK and linker). - Sets the ROCm environment variables (
HIPCXX,CC,CXX,CMAKE_PREFIX_PATH,HIP_PLATFORM) per Ollama's CI pattern. - Runs
cmake --preset "ROCm 7" -G Ninjawith the correctCMAKE_HIP_COMPILERoverride. - Builds the
ggml-hiptarget with--parallel 4(deliberately not higher — thetopk-moe.cutranslation unit hits a race condition with 8+ parallel compile jobs). - Runs
cmake --installto assembleggml-hip.dllplus the ROCm runtime DLLs and Tensile kernels intoollama/dist/lib/ollama/rocm/. - Copies that to
dist/rocm-gfx1201/and zips it.
Total time: ≈ 25 min on a modern CPU for the first build, < 5 min for subsequent rebuilds (Ninja is incremental).
If the build fails with
topk-moe.cuand no clear error message, you hit the race condition. Run again with-ParallelJobs 2.
.\scripts\rocm-deploy.ps1This stops Ollama, backs up its current rocm folder as
rocm.bak.<timestamp>, copies your fresh build into place, and verifies the
result. Start Ollama again from the tray icon and verify per Path A
Step 5.
There are exactly two scripts in scripts/:
-Mode |
What it does |
|---|---|
Check (default) |
Inspect tools, GPU, source; report what's missing. Never modifies anything. |
Configure |
Just run cmake configure — useful when tweaking flags. |
Build |
Configure + build + install. |
All |
Build + snapshot (master copy + ZIP, ready for deploy). |
Clean |
Delete ollama/build/rocm/ and ollama/dist/. |
Useful parameters:
-AmdGpuTargets "gfx1200;gfx1201"— build for multiple GPUs.-HipPath "C:\Program Files\AMD\ROCm\8.0"— when ROCm 8 ships.-ParallelJobs 2— if your CPU is overloaded or you hit race conditions.-ExpectedTag "v0.25.0"— silence the version-mismatch warning if you intentionally use a different Ollama tag.
-Mode |
What it does |
|---|---|
Deploy (default) |
Copy dist/rocm-gfx1201/ → Ollama's lib\ollama\rocm\. Stops Ollama, backs up the old folder, replaces it. Idempotent — does nothing if the target already matches the source (SHA-256 check on ggml-hip.dll). |
Snapshot |
Take the current build output and update dist/rocm-gfx1201/ + the ZIP. Run this after a successful build before deploying. |
Verify |
Read-only sanity check — is the deployed rocm folder really our ROCm-7 build? Useful after Ollama updates. |
Useful parameters:
-StartAfter— startollama serveautomatically in the background after deploy.-NoBackup— skip therocm.bak.<timestamp>(saves 300 MB per deploy if you iterate a lot).
| Ollama | Verified | Notes |
|---|---|---|
| 0.24.0 | ✅ Full GPU | Recommended. All current model formats load (including Gemma 4). |
| 0.16.1 | ✅ Full GPU | Works, but cannot load newer model architectures (e.g. gemma4). |
In theory any Ollama version that includes a "ROCm 7" preset in its
CMakePresets.json and gfx1201 in the AMDGPU_TARGETS regex of its
CMakeLists.txt should work with this ROCm-7 build — those landed in
mainline before v0.24.0. If a newer Ollama release ships, install it, then
re-run .\scripts\rocm-deploy.ps1 to put our ROCm-7 build back over the
official ROCm-6 files.
Verified on Ollama 0.24.0 + our ROCm-7 build on a 16 GB RX 9070 XT:
| Model | Size | PROCESSOR | Notes |
|---|---|---|---|
gemma4:e4b |
9.6 GB | 100 % GPU | Loads on 0.24.0; fails on 0.16.1 (architecture too new) |
deepseek-r1:14b |
9.0 GB | 100 % GPU | Fast reasoning model |
deepseek-r1:32b |
19 GB | Split CPU/GPU | Too large for 16 GB VRAM — partial GPU |
qwen2.5-coder:32b |
19 GB | Split CPU/GPU | Same |
Anything ≤ 14 GB (after Q4 quantisation) fits in 16 GB VRAM and runs GPU-only. Bigger models work but partly on CPU.
The Ollama installer (whether via auto-update or manual OllamaSetup.exe)
overwrites lib\ollama\rocm\ with the official ROCm-6 files. Every time
Ollama updates, you need one command to put our ROCm-7 build back.
If you used Path A (the ZIP): open the extracted folder again and re-run the bundled script.
.\deploy.ps1If you used Path B (self-build): run the repo's deploy script.
.\scripts\rocm-deploy.ps1Either way, the script auto-stops Ollama, backs up the freshly-installed ROCm-6 folder, drops your build back in, and you're ready to go.
Status check without changing anything (Path B only — has a verify mode):
.\scripts\rocm-deploy.ps1 -Mode VerifyMost likely the ROCm files aren't where Ollama expects (often after an Ollama auto-update). Re-run the deploy script you used to install:
- Path A:
.\deploy.ps1from the extracted ZIP folder - Path B:
.\scripts\rocm-deploy.ps1(or… -Mode Verifyfirst to confirm)
If it says UNSER Self-Build but you still see 100% CPU, check the server
log:
Get-Content "$env:LOCALAPPDATA\Ollama\server.log" -Tail 80 |
Select-String -Pattern "ROCm|gfx|library=|inference compute"Look for library=ROCm compute=gfx1201. If absent, see next item.
The discovery silently failed. Often a transient issue right after install — restart Ollama from the tray icon (right-click → Quit, then re-launch from Start Menu). If that doesn't help, run with debug logging:
$env:OLLAMA_DEBUG="DEBUG"
Stop-Process -Name "ollama*" -Force
& "$env:LOCALAPPDATA\Programs\Ollama\ollama.exe" serveThen look at server.log for discover / runner / gfx lines. The most
common reasons:
- HIP SDK 7.1 missing or not on PATH → fix by re-installing HIP SDK and rebooting.
- Driver too old → update to AMD Adrenalin 26.x.
amdhip64_7.dllis missing fromlib\ollama\rocm\→ run the deploy script.
You're using the wrong MSVC version. This is the cmath-conflict mentioned in
Step 2 of Path B. Install VS 2022 BuildTools (not VS 2025). If both are
installed, vswhere should still find VS 2022 — verify by running
-Mode Check and reading the MSVC line.
You hit the race condition with high --parallel values. Re-run:
.\scripts\build-rocm.ps1 -Mode All -ParallelJobs 2Your Ollama version is too old for that model format. Run the latest
OllamaSetup.exe, then re-run your deploy script (see Maintenance:
Ollama updates) to restore your ROCm build.
The model architecture is unrelated to GPU support.
Means the HIP compiler isn't on PATH and CMAKE_HIP_COMPILER wasn't
overridden. The build script handles this; if you're running CMake by hand,
add:
-DCMAKE_HIP_COMPILER="C:/Program Files/AMD/ROCm/7.1/bin/clang++.exe"
For the curious, three key insights make this work:
- The GPU stack is fine —
hipinfo.exefrom HIP SDK 7.1.1 detectsgfx1201in 1.5 s on a stock system with no extra config. The HIP runtime, AMD driver, and HSA initialisation all work out of the box. - Ollama's source code is fine —
ml/backend/ggml/ggml/src/ggml-hip/compiles cleanly against ROCm 7's headers, andCMakePresets.jsonships with a"ROCm 7"preset that already includesgfx1201inAMDGPU_TARGETS. No source patches are needed. - The official binaries are the problem — Ollama's CI (see
.github/workflows/release.yaml:109-113in the ollama repo) builds exclusively against ROCm 6.2, because that's the LCD that supports the widest set of GPUs. Their pre-builtggml-hip.dlland bundledamdhip64_6.dllcannot talk to a ROCm 7 driver stack at runtime.
The build pipeline here is intentionally close to Ollama's own
scripts/build_windows.ps1: same compiler ($HIP_PATH\bin\clang++.exe),
same env vars (HIPCXX, HIP_PLATFORM, CMAKE_PREFIX_PATH), same flags
(-parallel-jobs=4 -Wno-ignored-attributes -Wno-deprecated-pragma). The
only deviations:
- preset
"ROCm 7"instead of"ROCm 6" -DCMAKE_HIP_COMPILERis set explicitly (CMake'scheck_language(HIP)doesn't auto-detect it on Windows reliably)-DAMDGPU_TARGETS="gfx1201"to skip building kernels for 12 other GPUs we don't need (cuts build time by ~75 % and DLL size from 914 MB to 57 MB)
This is an unofficial community recipe. It is not endorsed by Ollama, AMD,
or anyone else. If it breaks your install, your warranty does not get
voided, but you'll have to fix it yourself — the rocm.bak.<timestamp>
folders created by rocm-deploy.ps1 are your fallback.
Builds from this repository contain no modifications to Ollama or HIP — the sources are pulled fresh from their upstream repositories and built with the arguments described here.
This project is built using Claude Code (Anthropic) — see AI-DISCLOSURE.md for details on the human/AI collaboration model.
Maintainer notes (how to build a new version, cut a release, run sanity checks) live in MAINTAINING.md.
The redistributed ZIP only contains MIT-licensed files. Everything in the archive is built from or is a part of:
| File(s) | Upstream | License |
|---|---|---|
ggml-hip.dll |
Built from ollama/ollama source | MIT |
rocblas.dll + rocblas/library/* |
ROCm/rocBLAS | MIT |
libhipblas.dll |
ROCm/hipBLAS | MIT |
libhipblaslt.dll |
ROCm/hipBLASLt | MIT |
amdhip64_7.dll is deliberately excluded. This file is part of AMD's
proprietary HIP runtime and ships with the AMD Adrenalin driver and the HIP
SDK installer under AMD's own EULA. The deploy script copies it at install
time from your own C:\Program Files\AMD\ROCm\7.1\bin\ — you already have
it because the HIP SDK is a prerequisite (Step 2 of either path).
This keeps the redistribution strictly within MIT-licensed territory and avoids questions about redistributing AMD's runtime binaries.
The scripts (scripts/build-rocm.ps1, scripts/rocm-deploy.ps1) and the
documentation in this repository are released under the MIT License,
same as Ollama upstream.
Inspiration / prior art:
- doroch.com — AI on AMD Radeon RX 9000 (the original community workaround using the ROCBLAS_TENSILE_LIBPATH env var — worked with Ollama 0.16.1 + Adrenalin 25.1.x, no longer sufficient with newer combinations).
- likelovewant/ollama-for-amd — fork shipping fat binaries with many AMD architectures. Heavyweight (≈ 1 GB) but covers more cards.
- ByronLeeeee/Ollama-For-AMD-Installer — automated installer wrapping the fork above.
Filed bugs (track upstream progress):
ollama/ollama#13236— gfx1201 discovery timeoutollama/ollama#13000— native gfx1201 support PRROCm/ROCm#5812— rocminfo/HSA-init on RDNA 4 Windows
If upstream Ollama eventually ships ROCm-7 binaries by default, this repository becomes obsolete and that's a good thing. Until then, here we are.