Skip to content

Commit 678ab2c

Browse files
committed
include more stuff and fix cuda
1 parent 15857a2 commit 678ab2c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

llama-cpp-sys-2/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ include = [
3939
"/llama.cpp/ggml-common.h",
4040
"/llama.cpp/ggml-cuda",
4141
"/llama.cpp/sgemm.h",
42+
"/llama.cpp/ggml-cuda/*",
43+
"/llama.cpp/ggml-cuda/template_instances/*",
4244
]
4345

4446
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

llama-cpp-sys-2/build.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,17 @@ fn compile_cuda(cx: &mut Build, cxx: &mut Build, featless_cxx: Build) -> &'stati
463463
.map(|f| f.unwrap())
464464
.filter(|entry| entry.file_name().to_string_lossy().ends_with(".cu"))
465465
.map(|entry| entry.path());
466+
467+
let template_instances = read_dir(cuda_path.join("template-instances"))
468+
.unwrap()
469+
.map(|f| f.unwrap())
470+
.filter(|entry| entry.file_name().to_string_lossy().ends_with(".cu"))
471+
.map(|entry| entry.path());
466472

467473
nvcc.include(cuda_path.as_path())
468474
.include(LLAMA_PATH.as_path())
469475
.files(cuda_sources)
476+
.files(template_instances)
470477
.file(LLAMA_PATH.join("ggml-cuda.cu"))
471478
.compile(lib_name);
472479

0 commit comments

Comments
 (0)