CachyOS / CachyOS/distribution
[Bug]: ollama-rocm missing comgr dependency — GPU falls back to CPU (gfx1031 / RX 6750 XT)
- Dominant language
- No language data
- Stars
- 27
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
### Package name
ollama-rocm
### Package version
0.32.1-1.1
### Issue type
Build failure
### Description
ollama-rocm fails to detect the AMD GPU and silently falls back to CPU-only
inference, despite ROCm working correctly at the system level (rocminfo and
rocm-smi both detect the GPU without issue).
Root cause: libggml-hip.so (shipped by ollama-rocm) depends on
libamd_comgr.so (COMGR — Code Object Manager), which is not declared as a
dependency of the ollama-rocm package and is not present anywhere on a fresh
system unless manually installed via the separate comgr package (extra/comgr).
### Steps to reproduce
1. Install ollama-rocm on a system with an AMD RDNA2 GPU (tested on RX 6750 XT, gfx1031)
2. Set HSA_OVERRIDE_GFX_VERSION=10.3.0 (required for gfx1031, unsupported officially by ROCm)
3. Start the ollama service and run any model
4. Inference runs on CPU despite ROCm being otherwise functional
### Relevant logs or error output
```shell
$ AMD_LOG_LEVEL=4 ollama gpu-discover --lib-dir /usr/lib/ollama --lib-dir /usr/lib/ollama/rocm_v7_2
:1:comgrctx.cpp:66: Failed to load COMGR library.
:1:rocdevice.cpp:621: Code object manager initialization failed for HSA device gfx1030 (PCI ID 73df)
:1:rocdevice.cpp:426: Error creating new instance of Device.
ggml_cuda_init: failed to initialize ROCm: no ROCm-capable device is detected
$ find / -iname "libamd_comgr*" 2>/dev/null
(no output — not present anywhere on the system)
Fix that resolves the issue:
$ sudo pacman -S comgr
After installing comgr (provides /opt/rocm/lib/libamd_comgr.so) and adding
/opt/rocm/lib to LD_LIBRARY_PATH for the ollama service, GPU is detected:
msg="inference compute" id=0 library=ROCm compute=gfx1030 name=ROCm0
description="AMD Radeon RX 6750 XT" total="12.0 GiB" available="11.9 GiB"
```
### CachyOS bug report
sudo cachyos-bugreport.sh
which cachyos-bugreport.sh
OS: CachyOS (rolling)
Kernel: 7.1.3-2-cachyos
GPU: AMD Radeon RX 6750 XT (gfx1031, RDNA2)
CPU: AMD Ryzen 7 3800X
### Additional context
$ ldd /usr/lib/ollama/rocm_v7_2/libggml-hip.so | grep "not found"
librocsolver.so.0 => not found
librocblas.so.5 => not found
(non-fatal fallback — real blocker below)
$ AMD_LOG_LEVEL=4 ollama gpu-discover --lib-dir /usr/lib/ollama --lib-dir /usr/lib/ollama/rocm_v7_2
:1:comgrctx.cpp:66: Failed to load COMGR library.
:1:rocdevice.cpp:621: Code object manager initialization failed for HSA device gfx1030 (PCI ID 73df)
ggml_cuda_init: failed to initialize ROCm: no ROCm-capable device is detected
$ find / -iname "libamd_comgr*" 2>/dev/null
(no output — not present anywhere on the system)
Fix: sudo pacman -S comgr
After installing comgr (provides /opt/rocm/lib/libamd_comgr.so) and adding
/opt/rocm/lib to LD_LIBRARY_PATH for the ollama service, GPU is detected:
msg="inference compute" id=0 library=ROCm compute=gfx1030 name=ROCm0
description="AMD Radeon RX 6750 XT" total="12.0 GiB" available="11.9 GiB"
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.