]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
nix: make `xcrun` visible in Nix sandbox for precompiling Metal shaders (#6118)
authorJoseph Stahl <redacted>
Tue, 26 Mar 2024 00:51:46 +0000 (20:51 -0400)
committerGitHub <redacted>
Tue, 26 Mar 2024 00:51:46 +0000 (17:51 -0700)
commite190f1fca6f60d80944f9e8709d343a025c4d245
tree663056bce34e23f90eb95a53363660c9ba50bee1
parent280345968dabc00d212d43e31145f5c9961a7604
nix: make `xcrun` visible in Nix sandbox for precompiling Metal shaders (#6118)

* Symlink to /usr/bin/xcrun so that `xcrun` binary
is usable during build (used for compiling Metal shaders)

Fixes https://github.com/ggerganov/llama.cpp/issues/6117

* cmake - copy default.metallib to install directory

When metal files are compiled to default.metallib, Cmake needs to add this to the install directory so that it's visible to llama-cpp

Also, update package.nix to use absolute path for default.metallib (it's not finding the bundle)

* add `precompileMetalShaders` flag (defaults to false) to disable precompilation of metal shader

Precompilation requires Xcode to be installed and requires disable sandbox on nix-darwin
.devops/nix/package.nix
CMakeLists.txt