Ollama not using AMD GPU on Arch Linux [Fixed]
Ollama not using AMD GPU on Arch Linux [Fixed]
This is an update to a previous post found at https://lemmy.world/post/27013201
Ollama uses the AMD ROCm library which works well with many AMD GPUs not listed as compatible by forcing an LLVM target.
The original Ollama documentation is wrong as the following can not be set for individual GPUs, only all or none, as shown at github.com/ollama/ollama/issues/8473
AMD GPU issue fix
- Check your GPU is not already listed as compatibility at github.com/ollama/ollama/blob/main/docs/gpu.md#linux-support
- Edit the Ollama service file. This uses the text editor set in the
$SYSTEMD_EDITOR
environment variable.
undefined
sudo systemctl edit ollama.service
- Add the following, save and exit. You can try different versions as shown at github.com/ollama/ollama/blob/main/docs/gpu.md#overrides-on-linux
undefined
[Service] Environment="HSA_OVERRIDE_GFX_VERSION=10.3.0"
- Restart the Ollama service.
undefined
sudo systemctl restart ollama