Skip to content

Commit 1788762

Browse files
committed
added cuda support (again)
1 parent 9f5b40f commit 1788762

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

llama-cpp-sys-2/build.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,9 @@ fn compile_cuda(cx: &mut Build, cxx: &mut Build, featless_cxx: Build) -> &'stati
450450
}
451451

452452
let lib_name = "ggml-cuda";
453-
let cuda_path = LLAMA_PATH.join("ggml-cuda");
453+
let ggml_path = LLAMA_PATH.join("ggml");
454+
let ggml_src = ggml_path.join("src");
455+
let cuda_path = ggml_src.join("ggml-cuda");
454456
let cuda_sources = read_dir(cuda_path.as_path())
455457
.unwrap()
456458
.map(|f| f.unwrap())
@@ -464,10 +466,11 @@ fn compile_cuda(cx: &mut Build, cxx: &mut Build, featless_cxx: Build) -> &'stati
464466
.map(|entry| entry.path());
465467

466468
nvcc.include(cuda_path.as_path())
467-
.include(LLAMA_PATH.as_path())
469+
.include(ggml_src.as_path())
470+
.include(ggml_path.join("include").as_path())
468471
.files(cuda_sources)
469472
.files(template_instances)
470-
.file(LLAMA_PATH.join("ggml-cuda.cu"))
473+
.file(ggml_src.join("ggml-cuda.cu"))
471474
.compile(lib_name);
472475

473476
lib_name

0 commit comments

Comments
 (0)