Skip to content

Commit

Permalink
style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuk committed Mar 19, 2024
1 parent 319696a commit 0e85ebc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 4 additions & 4 deletions crates/llm-chain-gemma-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ fn main() {
// is out of the support because of this.
// See: https://github.com/google/gemma.cpp/pull/6
cc::Build::new()
.cpp(true)
.file("src/bindings_win.cc")
.std("c++17")
.compile("bindings");
.cpp(true)
.file("src/bindings_win.cc")
.std("c++17")
.compile("bindings");
return;
}
let target = env::var("TARGET").unwrap();
Expand Down
12 changes: 9 additions & 3 deletions crates/llm-chain-gemma/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ impl GemmaContext {
},
);
if pool == std::ptr::null_mut() {
return Err(ExecutorCreationError::InnerError(Box::new(GemmaNotSupportedError{})))
return Err(ExecutorCreationError::InnerError(Box::new(
GemmaNotSupportedError {},
)));
}

let gemma = gcpp_Gemma_Gemma(
Expand All @@ -117,13 +119,17 @@ impl GemmaContext {
pool,
);
if gemma == std::ptr::null_mut() {
return Err(ExecutorCreationError::InnerError(Box::new(GemmaNotSupportedError{})))
return Err(ExecutorCreationError::InnerError(Box::new(
GemmaNotSupportedError {},
)));
}
gcpp_Gemma_SetModelTraining(gemma, model_training);

let gen = std_mt19937_mt19937();
if gen == std::ptr::null_mut() {
return Err(ExecutorCreationError::InnerError(Box::new(GemmaNotSupportedError{})))
return Err(ExecutorCreationError::InnerError(Box::new(
GemmaNotSupportedError {},
)));
}
std_mt19937_random_seed(gen);

Expand Down

0 comments on commit 0e85ebc

Please sign in to comment.