Capture CUDA logging output#7298
Merged
slaren merged 6 commits intoggml-org:masterfrom May 18, 2024
Merged
Conversation
Contributor
ggerganov
approved these changes
May 15, 2024
Member
Most of the printfs there are during Debug builds - these are not a problem. |
slaren
reviewed
May 15, 2024
slaren
reviewed
May 16, 2024
slaren
reviewed
May 16, 2024
Co-authored-by: slaren <slarengh@gmail.com>
Co-authored-by: slaren <slarengh@gmail.com>
slaren
approved these changes
May 18, 2024
Seunghhon
pushed a commit
to Seunghhon/llama.cpp
that referenced
this pull request
Apr 26, 2026
* logging: output capture in cuda module * fix compile error * fix: vsnprintf terminates with 0, string use not correct * post review * Update llama.cpp Co-authored-by: slaren <slarengh@gmail.com> * Update llama.cpp Co-authored-by: slaren <slarengh@gmail.com> --------- Co-authored-by: slaren <slarengh@gmail.com>
phuongncn
pushed a commit
to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4
that referenced
this pull request
Apr 28, 2026
* logging: output capture in cuda module * fix compile error * fix: vsnprintf terminates with 0, string use not correct * post review * Update llama.cpp Co-authored-by: slaren <slarengh@gmail.com> * Update llama.cpp Co-authored-by: slaren <slarengh@gmail.com> --------- Co-authored-by: slaren <slarengh@gmail.com>
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.




Addresses logging capture issues reported here #5797.
This PR adds a CUDA logging callback similar to that in
ggml-metal.h:https://github.com/ggerganov/llama.cpp/blob/583fd6b000ec9ad1b465b5c98524f4a0ae388077/ggml-metal.h#L43
However, the issue OP has certainly experienced other uncaptured log messages. For example:
As evident methods in
ggml-alloc.c, e.g.ggml_gallocr_reserve_n, use directlystderr. So that begs the question whether the internal logging inllama.cppshould not be made commonly available, e.g. incommon.h.