ggml: Skip backend library linking code when GGML_BACKEND_DL=ON #15094
Merged
ckastner merged 1 commit intoggml-org:masterfrom Aug 7, 2025
Merged
ggml: Skip backend library linking code when GGML_BACKEND_DL=ON #15094ckastner merged 1 commit intoggml-org:masterfrom
ckastner merged 1 commit intoggml-org:masterfrom
Conversation
Collaborator
Author
|
Eh, more succinctly:
|
slaren
reviewed
Aug 5, 2025
Any available libraries are found and loaded dynamically at runtime.
c364253 to
cd497c1
Compare
slaren
approved these changes
Aug 7, 2025
blime4
referenced
this pull request
in blime4/llama.cpp
Feb 5, 2026
Any available libraries are found and loaded dynamically at runtime.
Seunghhon
pushed a commit
to Seunghhon/llama.cpp
that referenced
this pull request
Apr 26, 2026
…-org#15094) Any available libraries are found and loaded dynamically at runtime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@slaren, it appears that #15074 yesterday was incomplete. I overlooked that the ggml CMake package generated requires all backends from configure-time to be installed (eg when building llama.cpp), or otherwise errors out.
This doesn't really make sense in contexts where
GGML_BACKEND_DL=ONis most useful. For example, a user with a GPU will probably install the HIP or the CUDA backend (if shipped as separate packages) but unlikely both.This PR removes this requirement. But is this OK? Can it negatively affect a build result if not all backends are present?
I also wonder though whether it should include a check for t least one CPU backend.
Side note: this PR also includes a small fix for a misplacement of
$GGML_BACKEND_DIRyesterday, it was in the wrongfind_package. This was very weird. I didn't do this manually, I transferred a change from an older branch usingpatch(1)where this was correct. Maybe some heuristic failed.