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::info::platform::version lacks "0" #1426

Open
al42and opened this issue Apr 2, 2024 · 2 comments
Open

sycl::info::platform::version lacks "0" #1426

al42and opened this issue Apr 2, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@al42and
Copy link
Contributor

al42and commented Apr 2, 2024

Bug summary

platform.get_info<sycl::info::platform::version>() (and hipsycl::sycl::detail::version_string) report version AdaptiveCpp 24.2.0+abcd instead of AdaptiveCpp 24.02.0+abcd.

To Reproduce

$ acpp --acpp-version | grep 'AdaptiveCpp version'
  AdaptiveCpp version: 24.02.0+git.0359cac9.20240401.branch.develop.dirty

$ cat test.cpp 
#include <iostream>
#include <sycl/sycl.hpp>

int main()
{
    std::cout << hipsycl::sycl::detail::version_string() << std::endl;
    sycl::platform p;
    std::cout << p.get_info<sycl::info::platform::version>() << std::endl;
}

$ acpp -O2 test.cpp && ./a.out
AdaptiveCpp 24.2.0+git.0359cac9.20240401.branch.develop.dirty
AdaptiveCpp 24.2.0+git.0359cac9.20240401.branch.develop.dirty

Expected behavior

AdaptiveCpp 24.02.0+git.0359cac9.20240401.branch.develop.dirty is returned in both cases.

Describe your setup

  • ACpp 0359cac
  • Describe the dependencies that AdaptiveCpp sits on top of in your setup:
    • Clang 17.0.6

Additional context

Nothing major or critical, just slightly annoying to have a discrepancy in reported versions.

@al42and al42and added the bug Something isn't working label Apr 2, 2024
@illuhad
Copy link
Collaborator

illuhad commented Apr 2, 2024

This is probably because the ACPP_VERISON_* macros are ints, which makes sense for the purpose of programmatically comparing version numbers. We'd have to enforce leading zeros in the version string formatting here: https://github.com/AdaptiveCpp/AdaptiveCpp/blob/develop/include/hipSYCL/sycl/version.hpp

@al42and
Copy link
Contributor Author

al42and commented Apr 3, 2024

Yes, looks like that. And BTW, the year in acpp --acpp-version | grep Copyright is out-of-date too.

Shall this get a "good first issue" label? I don't think there's any rush in solving it before the late June? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants