- Clone ollama
git clone --recursive https://github.com/ollama/ollama.git
- go to directory
cd ollama
- Install dependencies
sudo pacman -S rocm-hip-sdk rocm-opencl-sdk clblast go
- Build ollama with env
AMDGPU_TARGET=gfx1030 ROCM_PATH=/opt/rocm CLBlast_DIR=/usr/lib/cmake/CLBlast go generate -tags rocm ./...
go build -tags rocm
- Now to run it
HSA_OVERRIDE_GFX_VERSION=10.3.0 ./ollama serve
More info : https://blog.rabu.me/ollama-running-on-an-amd-gpu/
GPU Support : https://github.com/ollama/ollama/blob/main/docs/gpu.md
Ollama supports the following AMD GPUs:
Family | Cards and accelerators |
---|---|
AMD Radeon RX | 7900 XTX 7900 XT 7900 GRE 7800 XT 7700 XT 7600 XT 7600 6950 XT 6900 XTX 6900XT 6800 XT 6800 Vega 64 Vega 56 |
AMD Radeon PRO | W7900 W7800 W7700 W7600 W7500 W6900X W6800X Duo W6800X W6800 V620 V420 V340 V320 Vega II Duo Vega II VII SSG |
AMD Instinct | MI300X MI300A MI300 MI250X MI250 MI210 MI200 MI100 MI60 MI50 |