-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
ggml : unified CMake build #6913
Comments
This issue was closed because it has been inactive for 14 days since being marked as stale. |
I think a big part of this issue has been completed since the Regarding the build-time generated configurations that were discussed, I'm not sure how to spec and implement this, so maybe we can do this within another issue. @slaren Do you have any advise how to improve the CMake build system even further or if there is anything lacking atm? |
I am starting to work now on a significant change to the build system to allow building the backends as shared libraries. To do so, we need to split the ggml build into a small common library that backends can link to statically, and a bundle library that also includes the backends linked into the build. I am thinking that it may make sense to move each backend to a different directory with its own |
Currently the ggml, llama.cpp and whisper.cpp projects share the same source of the
ggml
library, but have different CMake scripts. The scripts are adapted to the specifics of the projects and are quite similar with each other - all of them buildggml
. Still, there are differences due to manually rewriting them and applying changes from one repo to anotherThe goal in this task is to unify, deduplicate and streamline the build process of
ggml
with proper CMake scripts that are shared across the projects. This will simplify changes in the future and will also help other 3rd party projects that depend onggml
More on this topic has been discussed in:
To achieve that, the
ggml
-related sources inllama.cpp
andwhisper.cpp
would likely have to be reorganized in a subfolder to emulate a submodule. We avoid usage of actualgit
submodules since I consider that it has some disadvantages. Instead, we do manual synchronization with sync scripts across the 3 repos. In any case, after we complete this task it would be much simpler to switch to aggml
submodule if we decide to do so in the futureRegarding the existing Makefiles in
llama.cpp
andwhisper.cpp
- we should keep those as an alternative build system. It does not have to support all possible backends and configurations as the primary CMake build would do so. Makefile maintenance will be low priorityAfter the build system is improved, we can consider extending it with build-time generated configuration (e.g.
config.h
) for increased compatibility as suggested in #5890. But for now this remains low priorityThe text was updated successfully, but these errors were encountered: