Skip to content

Commit f4bac4a

Browse files
authored
Merge pull request #207 from anagri/macos-failing-test
Fix failing tests on MacOS
2 parents 7d9dc05 + 909e8d4 commit f4bac4a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

llama-cpp-2/src/model/params.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ impl LlamaModelParams {
180180
/// ```
181181
/// # use llama_cpp_2::model::params::LlamaModelParams;
182182
/// let params = LlamaModelParams::default();
183+
/// #[cfg(not(target_os = "macos"))]
183184
/// assert_eq!(params.n_gpu_layers(), 0, "n_gpu_layers should be 0");
185+
/// #[cfg(target_os = "macos")]
186+
/// assert_eq!(params.n_gpu_layers(), 999, "n_gpu_layers should be 999");
184187
/// assert_eq!(params.main_gpu(), 0, "main_gpu should be 0");
185188
/// assert_eq!(params.vocab_only(), false, "vocab_only should be false");
186189
/// assert_eq!(params.use_mmap(), true, "use_mmap should be true");

llama-cpp-sys-2/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ fn main() {
130130
llama_cpp.define("GGML_USE_ACCELERATE", None);
131131
llama_cpp.define("ACCELERATE_NEW_LAPACK", None);
132132
llama_cpp.define("ACCELERATE_LAPACK_ILP64", None);
133-
println!("cargo:rustc-link-arg=framework=Accelerate");
133+
println!("cargo:rustc-link-lib=framework=Accelerate");
134134

135135
metal_hack(&mut ggml);
136136
ggml.include("./llama.cpp/ggml-metal.h");

0 commit comments

Comments
 (0)