Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
chore: fix precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
philpax committed Nov 12, 2023
1 parent 2c127df commit eddf953
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions binaries/generate-ggml-bindings/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ fn generate_metal(ggml_path: &Path, src_path: &Path) {
generate_extra("metal", ggml_path, src_path, |b| {
b.header(ggml_path.join("ggml-metal.h").to_string_lossy())
.allowlist_file(r".*ggml-metal\.h")
.raw_line("use super::ggml_tensor;")
.raw_line("use super::ggml_log_callback;")
.raw_line("use super::ggml_cgraph;")
.raw_line("use super::ggml_log_callback;")
.raw_line("use super::ggml_tensor;")
});
}

Expand Down
4 changes: 2 additions & 2 deletions crates/ggml/sys/src/metal.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* automatically generated by rust-bindgen 0.65.1 */

use super::ggml_tensor;
use super::ggml_log_callback;
use super::ggml_cgraph;
use super::ggml_log_callback;
use super::ggml_tensor;

pub const GGML_METAL_MAX_BUFFERS: u32 = 16;
pub const GGML_METAL_MAX_COMMAND_BUFFERS: u32 = 32;
Expand Down
4 changes: 2 additions & 2 deletions crates/llm-base/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ impl TryFrom<u32> for FileType {

fn try_from(value: u32) -> Result<Self, Self::Error> {
let format = FileTypeFormat::try_from(
((value as u32) % ggml::QNT_VERSION_FACTOR) as ggml::sys::llama::llama_ftype,
(value % ggml::QNT_VERSION_FACTOR) as ggml::sys::llama::llama_ftype,
)?;

Ok(Self {
format,
quantization_version: (value as u32) / ggml::QNT_VERSION_FACTOR,
quantization_version: value / ggml::QNT_VERSION_FACTOR,
})
}
}
Expand Down

0 comments on commit eddf953

Please sign in to comment.