Skip to content

SYCL: Fix GGML_SYCL_DEBUG macro #11995

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

Merged
merged 1 commit into from
Feb 24, 2025
Merged

Conversation

qnixsynapse
Copy link
Collaborator

Originally, this work was part of #11515. Currently this macro doesn't work on files other than ggml-sycl.cpp because of a variable g_ggml_sycl_debug which gets initialized as a local variable only on ggml-sycl.cpp.
This change enables the macro on other files.

I have also added debug logs to softmax OP function which I removed it then because of the mentioned issue.

@github-actions github-actions bot added ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language labels Feb 21, 2025
Copy link
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, what is the purpose of having GGML_SYCL_DEBUG - you can simply use GGML_LOG_DEBUG.

@qnixsynapse
Copy link
Collaborator Author

Btw, what is the purpose of having GGML_SYCL_DEBUG - you can simply use GGML_LOG_DEBUG.

It enables the backend specific logging system only when GGML_SYCL_DEBUG=1 is set in env.

I previously tried to use GGML_LOG_DEBUG but the maintainers of the SYCL backend told me that it is way too verbose to separate the backend logs from the rest of the logging system for debugging purposes.

@Alcpz
Copy link
Collaborator

Alcpz commented Feb 21, 2025

To be fair to ggerganov's question we could rework it to have GGML_SYCL_DEBUG prepend a prefix like [SYCL] to debug messages and print stuff through GGML_LOG_DEBUG. It is fine either way for me.

@qnixsynapse
Copy link
Collaborator Author

I think this should be merged now.

@Alcpz Alcpz merged commit 8303e8b into ggml-org:master Feb 24, 2025
46 checks passed
@qnixsynapse qnixsynapse deleted the fix/debug_macro branch February 24, 2025 15:47
orca-zhang pushed a commit to orca-zhang/llama.cpp that referenced this pull request Feb 26, 2025
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Feb 26, 2025
mglambda pushed a commit to mglambda/llama.cpp that referenced this pull request Mar 8, 2025
mostlyuseful pushed a commit to mostlyuseful/llama.cpp that referenced this pull request May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants