Skip to content

Conversation

@KenForever1
Copy link

Dear llama.cpp Official,

Hi, I'm writing to address this PR submission for allowing common lib to be compiled into both dynamic and static libraries, and export some c functions. In this way, we can load libcommon.so and call these functions with FFI call. For example, llama-cpp-python proj can call cpu_get_num_math function.

@bandoti
Copy link
Collaborator

bandoti commented Nov 18, 2024

@KenForever1 Although there are some useful routines in the common library, it is actually an implementation detail and not intended as a public interface. As such, if there are a couple of those routines needed (like the two in this PR: cpu_get_num_physical_cores and cpu_get_num_math), I recommend copying the logic and creating a custom shared library for your own needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants