From affcb485cbaff8f3a5254fbc2f1b11afea3be19a Mon Sep 17 00:00:00 2001 From: boxbeam Date: Fri, 1 Mar 2024 16:29:29 -0500 Subject: [PATCH] Vulkan support working --- crates/llama-cpp-bindings/build.rs | 1 + crates/llama-cpp-bindings/llama.cpp | 2 +- crates/llama-cpp-bindings/src/engine.cc | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/llama-cpp-bindings/build.rs b/crates/llama-cpp-bindings/build.rs index 44458d4c0627..22e3001bdf65 100644 --- a/crates/llama-cpp-bindings/build.rs +++ b/crates/llama-cpp-bindings/build.rs @@ -84,6 +84,7 @@ fn build_llama_cpp() { } if cfg!(feature = "vulkan") { config.define("LLAMA_VULKAN", "ON"); + println!("cargo:rustc-link-lib=vulkan"); } // By default, this value is automatically inferred from Rust’s compilation profile. diff --git a/crates/llama-cpp-bindings/llama.cpp b/crates/llama-cpp-bindings/llama.cpp index 4af25481fc9e..807ee66dbfb9 160000 --- a/crates/llama-cpp-bindings/llama.cpp +++ b/crates/llama-cpp-bindings/llama.cpp @@ -1 +1 @@ -Subproject commit 4af25481fc9e00e34da6de3e9eada975ab8f5696 +Subproject commit 807ee66dbfb9e395362388a7cfb12684a41d1d09 diff --git a/crates/llama-cpp-bindings/src/engine.cc b/crates/llama-cpp-bindings/src/engine.cc index 7277380ec9d4..7954329a3366 100644 --- a/crates/llama-cpp-bindings/src/engine.cc +++ b/crates/llama-cpp-bindings/src/engine.cc @@ -362,7 +362,7 @@ struct BackendInitializer { g_llama_cpp_log_level = std::stoi(level); } llama_log_set(llama_log_callback, nullptr); - llama_backend_init(false); + llama_backend_init(); } ~BackendInitializer() {