-
Notifications
You must be signed in to change notification settings - Fork 89
[KHR] Tests for sycl_khr_max_work_group_queries extension #1073
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
Formatting to be fixed? |
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.
Thanks!
A few remarks.
tests/extension/khr_max_num_work_groups/max_num_work_groups_min.cpp
Outdated
Show resolved
Hide resolved
tests/extension/khr_max_num_work_groups/max_num_work_groups_submission.cpp
Outdated
Show resolved
Hide resolved
…n.cpp Co-authored-by: Ronan Keryell <[email protected]>
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.
Thanks!
return; | ||
auto max_work_groups = | ||
dev.get_info<khr::info::device::max_num_work_groups<DIMENSION>>(); | ||
|
||
for (int i = 0; i < DIMENSION; i++) { | ||
CHECK(max_work_groups[i] >= 1); | ||
} | ||
} | ||
} |
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.
return; | |
auto max_work_groups = | |
dev.get_info<khr::info::device::max_num_work_groups<DIMENSION>>(); | |
for (int i = 0; i < DIMENSION; i++) { | |
CHECK(max_work_groups[i] >= 1); | |
} | |
} | |
} | |
return; | |
auto max_work_groups = | |
dev.get_info<khr::info::device::max_num_work_groups<DIMENSION>>(); | |
for (int i = 0; i < DIMENSION; i++) { | |
CHECK(max_work_groups[i] >= 1); | |
} | |
} |
One }
seems to be redundant.
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.
Please, add an option to https://github.com/KhronosGroup/SYCL-CTS/blob/main/CMakeLists.txt and build locally with any implementation that supports it. I suspect there are some syntax errors in the current version.
add_cts_option(SYCL_CTS_ENABLE_MAX_NUM_WORK_GROUPS
"Enable ..." OFF
FORCE_ON ${SYCL_CTS_ENABLE_KHR_TESTS})
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.
Okay done, I fixed a few syntax issues.
I compiled the CTS with acpp from this PR which supports the extension (removing most of the other CTS tests).
one more review required after resolving above comments. |
@@ -0,0 +1,5 @@ | |||
if(SYCL_CTS_ENABLE_MAX_NUM_WORK_GROUPS) |
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 am confused. Should it be SYCL_CTS_ENABLE_KHR_MAX_NUM_WORK_GROUPS
instead?
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.
Looks like a bug vs line 130
"the max_num_work_groups extension defines the " | ||
"SYCL_KHR_MAX_NUM_WORK_GROUPS macro", | ||
"[khr_max_num_work_groups]") { | ||
#ifndef SYCL_KHR_MAX_NUM_WORK_GROUPS |
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.
Where/how is this macro set?
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.
This macro is set by the SYCL implementation
It's a requirement when the extension is implemented, the macro should be defined
(See https://github.com/Aympab/SYCL-Docs/blob/khr-max-num-wg/adoc/extensions/sycl_khr_max_num_work_groups.adoc#L15 )
Co-authored-by: Ronan Keryell <[email protected]>
Co-authored-by: Alexey Bader <[email protected]>
I've updated the PR following the discussion in KhronosGroup/SYCL-Docs#712 |
tests/extension/khr_max_work_group_queries/max_work_group_queries_macro.cpp
Outdated
Show resolved
Hide resolved
tests/extension/khr_max_work_group_queries/max_work_group_queries_macro.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Alexey Bader <[email protected]>
Co-authored-by: Alexey Bader <[email protected]>
WG approved to merge |
The CTS for the khr extension proposal for the device descriptor
max_num_work_groups
.There is a PR for an implementation in AdaptiveCpp.