diff options
author | Joseph Stahl <1269177+josephst@users.noreply.github.com> | 2024-03-26 13:48:11 -0400 |
---|---|---|
committer | Joseph Stahl <1269177+josephst@users.noreply.github.com> | 2024-03-26 14:01:29 -0400 |
commit | e1ef3aaaccb554da9c581d684e96071b2f8cea95 (patch) | |
tree | d147512d0af5b0ad24a5d14ef4e585c1a1c5e61b | |
parent | 7aa588cc962d5c2fb4cbcedd548f444621292cce (diff) | |
download | nixlib-e1ef3aaaccb554da9c581d684e96071b2f8cea95.tar nixlib-e1ef3aaaccb554da9c581d684e96071b2f8cea95.tar.gz nixlib-e1ef3aaaccb554da9c581d684e96071b2f8cea95.tar.bz2 nixlib-e1ef3aaaccb554da9c581d684e96071b2f8cea95.tar.lz nixlib-e1ef3aaaccb554da9c581d684e96071b2f8cea95.tar.xz nixlib-e1ef3aaaccb554da9c581d684e96071b2f8cea95.tar.zst nixlib-e1ef3aaaccb554da9c581d684e96071b2f8cea95.zip |
llama-cpp: embed (don't pre-compile) metal shaders
port of https://github.com/ggerganov/llama.cpp/pull/6118, although compiling shaders with XCode disabled as it requires disabling sandbox (and only works on MacOS anyways)
-rw-r--r-- | pkgs/by-name/ll/llama-cpp/package.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/by-name/ll/llama-cpp/package.nix b/pkgs/by-name/ll/llama-cpp/package.nix index 928fbf6dfe27..ecd3167b9d93 100644 --- a/pkgs/by-name/ll/llama-cpp/package.nix +++ b/pkgs/by-name/ll/llama-cpp/package.nix @@ -131,7 +131,10 @@ effectiveStdenv.mkDerivation (finalAttrs: { # Should likely use `rocmPackages.clr.gpuTargets`. "-DAMDGPU_TARGETS=gfx803;gfx900;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack+;gfx90a:xnack-;gfx940;gfx941;gfx942;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102" ] - ++ optionals metalSupport [ (cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1") ]; + ++ optionals metalSupport [ + (cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1") + (cmakeBool "LLAMA_METAL_EMBED_LIBRARY" true) + ]; # upstream plans on adding targets at the cmakelevel, remove those # additional steps after that |