Skip to content

[SYCL] Improve SYCL library versioning mechanism #2250

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

Open
mlychkov opened this issue Aug 4, 2020 · 0 comments · May be fixed by #16137
Open

[SYCL] Improve SYCL library versioning mechanism #2250

mlychkov opened this issue Aug 4, 2020 · 0 comments · May be fixed by #16137
Labels
confirmed enhancement New feature or request

Comments

@mlychkov
Copy link
Contributor

mlychkov commented Aug 4, 2020

Currently users can check which SYCL library version they use with __SYCL_COMPILER_VERSION macro. This macro is set in CL/sycl/version.hpp file to a date when the library is built.
However, there are some disadvantages of this approach.
At first, the name of this variable is not accurate. It isn't compiler version, but library version.
At second, building time may not correlate with the last changes in the library. The same source code may be built on the 1st January of 2020 and on the 31st December of 2030.
It would be nice to have a versioning mechanism so that the version of the library is unambiguously correlated with the changes it contains.

@AlexeySachkov AlexeySachkov added the enhancement New feature or request label Dec 25, 2020
jsji pushed a commit that referenced this issue Dec 7, 2023
Replace instances of `getInt8PtrTy` after llvm commit 6cd7500
("[llvm][IR] Remove method IRBuilderBase::getInt8PtrTy (#74096)",
2023-12-01).

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@0348aa3
AlexeySachkov added a commit to AlexeySachkov/llvm that referenced this issue Nov 20, 2024
We have a macro `__SYCL_COMPILER_VERSION` which only corresponds to a
date when build was performed - it does not give any indication of the
actual compiler version, nor does it give any indication of the actual
library build.

This patch attempts to deprecate that old macro and replaces it with
`__LIBSYCL_TIMESTAMP` which contains a date of the latest commit
included into the SYCL library (and therefore SYCL headers) build. Using
commit date is more relibable than build date and its naming speicifally
refers to library instead of the compiler.

"Attempts" above is because it is a bit tricky to deprecate a macro and
heavily depends on the compiler which is being used. Not every 3rd-party
host compiler is covered, i.e. deprecation message may only be emitted
from device compilation pass in certain cases.

Resolves intel#2250
@AlexeySachkov AlexeySachkov linked a pull request Nov 20, 2024 that will close this issue
Chenyang-L pushed a commit that referenced this issue Feb 18, 2025
[DevAsan] Add an option to enable/disable leak detection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants