I havent kept up with this package, i switched from NVIDIA to AMD (GFX1201) earlier this year.
@wgottwalt But i can confirm the configure script is not detecting HIP at all now, ROCM is properly installed as is hipblas, both are 6.4.4 (and from arch-packaging afaik).
I will debug this, but can you also test it?
UPDATE: Ok, confirmed, while the HIP libraries are in my user path(due to edits i did to rocm.sh), the current profile.d/rocm.sh is a mess. it relies a update_path function. -- i didnt reboot after editing it however.
After adding
"-DOLLAMA_LLVM_DIR=/opt/rocm/llvm -DHIP_COMPILER=hipcc -DHIP_PATH=/opt/rocm \"
and
export PATH=/opt/rocm/bin:$PATH
export HIP_PATH=/opt/rocm
export CMAKE_PREFIX_PATH=/opt/rocm
to the PKGBUILD, HIP was detected, and it started building. I also installed vulkan-headers just to be safe. Vulkan backend was added a while ago, and while im not sure "ROCM" builds would find it necessary, i think its a good option as a fallback (As you leave CPU interference enabled, it doesnt make much sense to not add another generic backend)
Ill report back after testing to confirm its all working.
UPDATE1: While it successfully built with no issues, at runtime it ignores ROCM (atleast for my RX 9070XT | GFX1201), it does work in windows (with patched rocm libraries), but refuses here. -- ive tried everything and while it will work with vulkan (NOT inside of systemd for some reason... despite every effort), it simply refuses to use ROCM.
UPDATE2: After double-checking the ROCM support matrix, RDNA4/CDNA4 is NOT supported by ROCM-6.4.4 (which Archlinux is packaging), current ROCM is 7.0.2... its significantly out of date. -- trying with opencl-amd*
UPDATE3: for some reason this package tries to force hip-runtime-amd(due to requesting newer than a ancient version?) that doesnt align with opencl-amd, so i explicitly specified opencl-amd; Maintainer, you should look into this as well | Discovered Ollama doesnt detect ROCM 7.x due to a change in layout... it doesnt even try with symlinks and file copies. (keyboard headbashing continues)
Pinned Comments
wgottwalt commented on 2024-11-09 10:46 (UTC) (edited on 2024-11-26 15:23 (UTC) by wgottwalt)
Looks like the ROCm 6.2.2-1 SDK has a malfunctioning compiler. It produces a broken ollama binary (fp16 issues). You may need to stay with ROCm 6.0.2 for now. I don't know if this got fixed in a newer build release. But the initial SDK version "-1" is broken.
ROCm 6.2.4 fixes this issue completely.