Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing public header for ggml-backend.h and ggml-alloc.h #5011

Closed
65a opened this issue Jan 18, 2024 · 2 comments
Closed

Missing public header for ggml-backend.h and ggml-alloc.h #5011

65a opened this issue Jan 18, 2024 · 2 comments

Comments

@65a
Copy link
Contributor

65a commented Jan 18, 2024

The public header defined in CMakeLists.txt for llama.h (used for library level C FFI integrations) depends on the header ggml-backend.h now, but as it is not a defined public header in CMakeLists.h, it cannot be found in the CMake output. It seems like this is an omission, and the CMakeLists.txt should include this file as a public header.

@65a
Copy link
Contributor Author

65a commented Jan 18, 2024

Can add ggml-alloc.h to the list as well.

Builds and links correctly with something like this:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7bd64096..088245fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -846,7 +846,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LlamaConfig.cmake
               ${CMAKE_CURRENT_BINARY_DIR}/LlamaConfigVersion.cmake
         DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Llama)

-set(GGML_PUBLIC_HEADERS "ggml.h"
+set(GGML_PUBLIC_HEADERS "ggml.h" "ggml-backend.h" "ggml-alloc.h"
         "${GGML_HEADERS_CUDA}" "${GGML_HEADERS_OPENCL}"
         "${GGML_HEADERS_METAL}" "${GGML_HEADERS_MPI}" "${GGML_HEADERS_EXTRA}")

@65a 65a changed the title Missing public header for ggml-backend.h Missing public header for ggml-backend.h and ggml-alloc.h Jan 18, 2024
@65a
Copy link
Contributor Author

65a commented Jan 19, 2024

Thanks!

jordankanter pushed a commit to jordankanter/llama.cpp that referenced this issue Feb 3, 2024
hodlen pushed a commit to hodlen/llama.cpp that referenced this issue Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants