Skip to content
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

SYCL: Fix GGML_SYCL_DEBUG macro #11995

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

qnixsynapse
Copy link
Contributor

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
Contributor 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.

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