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

Add SYCL version check #989

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dklochkov-emb
Copy link

@dklochkov-emb dklochkov-emb commented Nov 18, 2024

Check of SYCL version was added according to agreement, see details:
KhronosGroup/SYCL-Docs#634

@dklochkov-emb dklochkov-emb requested a review from a team as a code owner November 18, 2024 15:46
@CLAassistant
Copy link

CLAassistant commented Nov 18, 2024

CLA assistant check
All committers have signed the CLA.

@@ -45,6 +45,7 @@ class TEST_NAME : public util::test_base {
#define TEST_FAIL
log.note("SYCL_LANGUAGE_VERSION not present");
#else
static_assert(SYCL_LANGUAGE_VERSION, "202012L");
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be something like:

static_assert(SYCL_LANGUAGE_VERSION == 202012L)

Followed by a check that the type is really long.

Copy link
Author

Choose a reason for hiding this comment

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

Agree, fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

Followed by a check that the type is really long.

Something like:

static_assert(std::is_same_v<decltype(SYCL_LANGUAGE_VERSION), long>);

@@ -45,6 +45,7 @@ class TEST_NAME : public util::test_base {
#define TEST_FAIL
log.note("SYCL_LANGUAGE_VERSION not present");
#else
static_assert(SYCL_LANGUAGE_VERSION, "202012L");
log.note("SYCL_LANGUAGE_VERSION = %d", static_cast<int>(SYCL_LANGUAGE_VERSION));
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this log message is still useful since we are now checking for a specific value.

Copy link
Author

Choose a reason for hiding this comment

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

As for me, we can remove this log message due to static_assert.

@dklochkov-emb
Copy link
Author

Ping

Copy link
Member

@keryell keryell left a comment

Choose a reason for hiding this comment

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

Thanks.
By the way, it is better to write SYCL in uppercase everywhere, even in the commit messages.

@keryell keryell changed the title Add sycl version check Add SYCL version check Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants