Skip to content

Commit

Permalink
Updated llama.cpp, generated bindings, and removed MacOS/CLBlast refe…
Browse files Browse the repository at this point in the history
…rence from the documentation.
  • Loading branch information
darxkies committed Jun 18, 2023
1 parent b401251 commit abcf77b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions crates/ggml/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -840,10 +840,13 @@ extern "C" {
pub fn ggml_set_no_alloc(ctx: *mut ggml_context, no_alloc: bool);
}
extern "C" {
pub fn ggml_get_mem_buffer(ctx: *mut ggml_context) -> *mut ::std::os::raw::c_void;
pub fn ggml_get_mem_buffer(ctx: *const ggml_context) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn ggml_get_mem_size(ctx: *mut ggml_context) -> usize;
pub fn ggml_get_mem_size(ctx: *const ggml_context) -> usize;
}
extern "C" {
pub fn ggml_get_max_tensor_size(ctx: *const ggml_context) -> usize;
}
extern "C" {
pub fn ggml_new_tensor(
Expand Down
1 change: 1 addition & 0 deletions crates/ggml/sys/src/metal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ extern "C" {
name: *const ::std::os::raw::c_char,
data: *mut ::std::os::raw::c_void,
size: usize,
max_size: usize,
) -> bool;
}
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion doc/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cargo run --release --package generate-ggml-bindings

## Acceleration Support for Building

The `ggml-sys` crate includes various acceleration backends, selectable via `--features` flags. The availability of supported backends varies by platform, and `ggml-sys` can only be built with a single active acceleration backend at a time. If cublas and clblast are both specified, cublas is prioritized and clblast is ignored. On MacOS clblast is prioritized over metal.
The `ggml-sys` crate includes various acceleration backends, selectable via `--features` flags. The availability of supported backends varies by platform, and `ggml-sys` can only be built with a single active acceleration backend at a time. If cublas and clblast are both specified, cublas is prioritized and clblast is ignored.

| Platform/OS | `cublas` | `clblast` | `metal` |
| ----------- | ------------------ | ------------------ | ------------------ |
Expand Down

0 comments on commit abcf77b

Please sign in to comment.