From 1788762c8a2f085e8de968e35e589fa194f3c87a Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 9 Jul 2024 16:29:22 -0700 Subject: [PATCH] added cuda support (again) --- llama-cpp-sys-2/build.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/llama-cpp-sys-2/build.rs b/llama-cpp-sys-2/build.rs index aa3c9257..a24d751f 100644 --- a/llama-cpp-sys-2/build.rs +++ b/llama-cpp-sys-2/build.rs @@ -450,7 +450,9 @@ fn compile_cuda(cx: &mut Build, cxx: &mut Build, featless_cxx: Build) -> &'stati } let lib_name = "ggml-cuda"; - let cuda_path = LLAMA_PATH.join("ggml-cuda"); + let ggml_path = LLAMA_PATH.join("ggml"); + let ggml_src = ggml_path.join("src"); + let cuda_path = ggml_src.join("ggml-cuda"); let cuda_sources = read_dir(cuda_path.as_path()) .unwrap() .map(|f| f.unwrap()) @@ -464,10 +466,11 @@ fn compile_cuda(cx: &mut Build, cxx: &mut Build, featless_cxx: Build) -> &'stati .map(|entry| entry.path()); nvcc.include(cuda_path.as_path()) - .include(LLAMA_PATH.as_path()) + .include(ggml_src.as_path()) + .include(ggml_path.join("include").as_path()) .files(cuda_sources) .files(template_instances) - .file(LLAMA_PATH.join("ggml-cuda.cu")) + .file(ggml_src.join("ggml-cuda.cu")) .compile(lib_name); lib_name