You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
llama-cpp uses the wrong cmake flag to build for ROCM
The cmake flag to enable ROCM support in llamacpp has changed from GGML_HIPBLAS to GGML_HIP. The llama-cpp package in Nixos still uses GGML_HIPBLAS to build on ROCM enabled systems, which results in llamacpp being built with only CPU support:
warning: not compiled with GPU offload support, --gpu-layers option will be ignored
warning: see main README.md for information on enabling GPU BLAS support
Steps To Reproduce
Steps to reproduce the behavior:
Add llama-cpp to environment.systemPackages in configuartion.nix
Rebuild the configuration with nixos-rebuild switch
Attempt to run a model using llama-server, which notifies you that llamacpp was not built with GPU support
Expected behavior
Llama-cpp being built with GPU support on AMD hardware.
Additional context
A workaround is to add an overlay to the package to include the new cmake flag:
HiroseKoichi
changed the title
llama-cpp won't build with GPU support on AMD hardware
llama-cpp uses the wrong cmake flag to build for ROCM
Dec 18, 2024
llama-cpp uses the wrong cmake flag to build for ROCM
The cmake flag to enable ROCM support in llamacpp has changed from
GGML_HIPBLAS
toGGML_HIP
. The llama-cpp package in Nixos still usesGGML_HIPBLAS
to build on ROCM enabled systems, which results in llamacpp being built with only CPU support:Steps To Reproduce
Steps to reproduce the behavior:
llama-cpp
toenvironment.systemPackages
in configuartion.nixnixos-rebuild switch
Expected behavior
Llama-cpp being built with GPU support on AMD hardware.
Additional context
A workaround is to add an overlay to the package to include the new cmake flag:
This results in llama-cpp successfully being built with GPU support on AMD hardware.
Metadata
"x86_64-linux"
Linux 6.12.2-zen1, NixOS, 24.11 (Vicuna), 24.11.710905.a0f3e10d9435
yes
yes
nix-env (Nix) 2.24.10
"nixos-24.11"
/nix/var/nix/profiles/per-user/root/channels/nixos
Notify maintainers
@dit7ya, @elohmeier, @philiptaron, @xddxdd
Note for maintainers: Please tag this issue in your PR.
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: