Add vulkan device list function.
This commit is contained in:
parent
de30f9c23d
commit
dac152cad4
4 changed files with 89 additions and 2 deletions
12
sys/build.rs
12
sys/build.rs
|
|
@ -119,10 +119,18 @@ fn main() {
|
|||
let _: u64 = std::fs::copy("src/bindings.rs", out.join("bindings.rs"))
|
||||
.expect("Failed to copy bindings.rs");
|
||||
} else {
|
||||
let bindings = bindgen::Builder::default().header("wrapper.h");
|
||||
let mut bindings = bindgen::Builder::default().header("wrapper.h");
|
||||
|
||||
#[cfg(feature = "metal")]
|
||||
let bindings = bindings.header("whisper.cpp/ggml/include/ggml-metal.h");
|
||||
{
|
||||
bindings = bindings.header("whisper.cpp/ggml/include/ggml-metal.h");
|
||||
}
|
||||
#[cfg(feature = "vulkan")]
|
||||
{
|
||||
bindings = bindings
|
||||
.header("whisper.cpp/ggml/include/ggml-vulkan.h")
|
||||
.clang_arg("-DGGML_USE_VULKAN=1");
|
||||
}
|
||||
|
||||
let bindings = bindings
|
||||
.clang_arg("-I./whisper.cpp/")
|
||||
|
|
|
|||
|
|
@ -1,2 +1,6 @@
|
|||
#include <include/whisper.h>
|
||||
#include <ggml/include/ggml.h>
|
||||
|
||||
#ifdef GGML_USE_VULKAN
|
||||
#include "ggml-vulkan.h"
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue