-
Notifications
You must be signed in to change notification settings - Fork 792
[SYCL] set __SYCL_COMPILER_VERSION from CMake variable or git commit timestamp #19845
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whilst this is definitely better than what we have today, I would deprecate __SYCL_COMPILER_VERSION
all together, simply because latest commit timestamp is not a compiler version at all.
My attempt at this is in #16137, but I'd never figured out those pre-commit failures (perhaps using WORKING_DIRECTORY
instead of -- $dir
is a better approach, the format is also slightly different from what I used: %cd
vs %ad
) and then it never left my backlog.
Working directory seems to be what's used in e.g. I think Wrt. the Pre Commit issues, on your PR the logs are expired, so no idea on that end. On this one they seem(?) unrelated to the actual changes |
@intel/llvm-reviewers-runtime, @againull, please share your feedback |
I agree that @AlexeySachkov - Do you have any plans to revive #16137? If so, might it make sense to also add some information about the hash of the most recent commit? I don't think that should be a macro definition and it would not serve the same purpose, but while we are already looking up the most recent commit it might make sense to include as much info as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense to merge this PR, because it aligns __SYCL_COMPILER_VERSION
macro with how it is actually used in practice by users. For example, https://github.com/uxlfoundation/oneDNN/blob/main/src/gpu/intel/sycl/l0/utils.cpp#L39-L41 (if we build really old sources - without l0 support - today, then that condition will not work as expected)
Deprecation and introducing macro with the new name can be done #16137 or other follow up.
I.e. they sound like two separate changes to me.
I don't have immediate plans. I think that we can proceed with the current PR and deprecate the macro or do any follow-ups in a separate commit. |
The CI stuff looks unrelated to me, should I maybe rebase onto a newer commit? |
@intel/llvm-gatekeepers please consider merging |
This PR changes the way CMake sets
__SYCL_COMPILER_VERSION
from using the date of compilation to:-DSYCL_COMPILER_VERSION=...
if setSee #19692 for the rationale behind this. TL;DR: Make
__SYCL_COMPILER_VERSION
reproducible. Closes #19692.