Skip to content

Commit

Permalink
Update to lastest main
Browse files Browse the repository at this point in the history
  • Loading branch information
setzer22 committed Mar 17, 2023
2 parents 28e28f9 + 36a04be commit e873a3e
Show file tree
Hide file tree
Showing 9 changed files with 547 additions and 229 deletions.
122 changes: 0 additions & 122 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions ggml-raw/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[build-dependencies.bindgen]
version = "^0.62.0"

[build-dependencies.cc]
version = "^1.0"

Expand Down
18 changes: 0 additions & 18 deletions ggml-raw/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::env;
use std::path::PathBuf;

fn main() {
// By default, this crate will attempt to compile ggml with the features of your host system if
Expand All @@ -14,7 +13,6 @@ fn main() {

// This is a very basic heuristic for applying compile flags.
// Feel free to update this to fit your operating system.

let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
let is_release = env::var("PROFILE").unwrap() == "release";
let compiler = build.get_compiler();
Expand Down Expand Up @@ -59,22 +57,6 @@ fn main() {
build.define("NDEBUG", None);
}
build.compile("ggml");

let bindings = bindgen::Builder::default()
.header("ggml/ggml.h")
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
.allowlist_function("ggml_.*")
.allowlist_type("ggml_.*")
.allowlist_var("ggml_.*")
.allowlist_file("ggml_.*")
.generate()
.expect("Unable to generate bindings");

let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());

bindings
.write_to_file(out_path.join("bindings.rs"))
.expect("Couldn't write bindings!");
}

fn get_supported_target_features() -> std::collections::HashSet<String> {
Expand Down
4 changes: 4 additions & 0 deletions ggml-raw/ggml/CREDITS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Vendored version: https://github.com/ggerganov/llama.cpp/commit/367946c668757532deed929e1d78673c6ac6bcb8

The ggml.c and ggml.h files are distributed under the terms of the MIT license.
Credit goes to the original authors: Copyright (c) 2023 Georgi Gerganov
Loading

0 comments on commit e873a3e

Please sign in to comment.