Skip to content

Commit e1ef3aa

Browse files
committed
llama-cpp: embed (don't pre-compile) metal shaders
port of ggml-org/llama.cpp#6118, although compiling shaders with XCode disabled as it requires disabling sandbox (and only works on MacOS anyways)
1 parent 7aa588c commit e1ef3aa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkgs/by-name/ll/llama-cpp/package.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ effectiveStdenv.mkDerivation (finalAttrs: {
131131
# Should likely use `rocmPackages.clr.gpuTargets`.
132132
"-DAMDGPU_TARGETS=gfx803;gfx900;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack+;gfx90a:xnack-;gfx940;gfx941;gfx942;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102"
133133
]
134-
++ optionals metalSupport [ (cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1") ];
134+
++ optionals metalSupport [
135+
(cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1")
136+
(cmakeBool "LLAMA_METAL_EMBED_LIBRARY" true)
137+
];
135138

136139
# upstream plans on adding targets at the cmakelevel, remove those
137140
# additional steps after that

0 commit comments

Comments
 (0)