Skip to content

Commit

Permalink
Merge pull request #75 from edgenai/fix/integer-overflow
Browse files Browse the repository at this point in the history
reduced number of gpu layers to not cause integer overflow
  • Loading branch information
pedro-devv authored Feb 20, 2024
2 parents abde22d + a98e37c commit 6040c75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/edgen_rt_llama_cpp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ async fn get_or_init_model(
args.n_gpu_layers = 0;
}
DevicePolicy::AlwaysDevice { .. } => {
args.n_gpu_layers = u32::MAX;
args.n_gpu_layers = i32::MAX as u32;
}
_ => {
unimplemented!()
Expand Down

0 comments on commit 6040c75

Please sign in to comment.