Skip to content

Commit 9a0bf8e

Browse files
committed
enable the vulkan and native features
1 parent 06eef67 commit 9a0bf8e

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

llama-cpp-2/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ tracing = { workspace = true }
1717
[features]
1818
cuda = ["llama-cpp-sys-2/cuda"]
1919
metal = ["llama-cpp-sys-2/metal"]
20+
vulkan = ["llama-cpp-sys-2/vulkan"]
21+
native = ["llama-cpp-sys-2/native"]
2022
sampler = []
2123

2224
[target.'cfg(all(target_os = "macos", any(target_arch = "aarch64", target_arch = "arm64")))'.dependencies]

llama-cpp-sys-2/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,5 @@ once_cell = "1.19.0"
5555
[features]
5656
cuda = []
5757
metal = []
58-
58+
vulkan = []
59+
native = []

llama-cpp-sys-2/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@ fn compile_vulkan(cx: &mut Build, cxx: &mut Build) -> &'static str {
607607
.include(LLAMA_PATH.as_path())
608608
.file(LLAMA_PATH.join("ggml-vulkan.cpp"))
609609
.compile(lib_name);
610+
println!("cargo:rustc-link-lib=vulkan");
610611

611612
lib_name
612613
}

0 commit comments

Comments
 (0)