fix(metal): fix metal build of tabby (#1601)

This commit is contained in:
Meng Zhang 2024-03-01 14:34:31 -08:00 committed by GitHub
parent 60f472ded6
commit ef15f97385
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "crates/llama-cpp-bindings/llama.cpp"]
path = crates/llama-cpp-bindings/llama.cpp
url = https://github.com/TabbyML/llama.cpp
url = https://github.com/ggerganov/llama.cpp

View File

@ -23,9 +23,13 @@ fn build_llama_cpp() {
let mut config = Config::new("llama.cpp");
config.define("LLAMA_NATIVE", "OFF");
config.define("INS_ENB", "ON");
if cfg!(not(debug_assertions)) {
config.define("CMAKE_BUILD_TYPE", "Release");
}
if cfg!(target_os = "macos") {
config.define("LLAMA_METAL", "ON");
config.define("LLAMA_METAL_EMBED_LIBRARY", "ON");
println!("cargo:rustc-link-lib=framework=Foundation");
println!("cargo:rustc-link-lib=framework=Accelerate");
println!("cargo:rustc-link-lib=framework=Metal");

@ -1 +1 @@
Subproject commit 807ee66dbfb9e395362388a7cfb12684a41d1d09
Subproject commit c29af7e2252d288f2ea58a7d437c1cb7c0abf160