We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The sycl::reqd_work_group_size attribute (and sycl::work_group_size_hint) does not accept a parameter pack expansion.
sycl::reqd_work_group_size
sycl::work_group_size_hint
#include <sycl/sycl.hpp> using namespace sycl; template <int... Dims> void foo1(queue &q) { range r(Dims...); nd_range ndr(r, r); q.parallel_for(ndr, [=](auto id) [[sycl::reqd_work_group_size(Dims...)]] {}); } template <int... Dims> void foo2(queue &q) { range r(Dims...); nd_range ndr(r, r); q.parallel_for(ndr, [=](auto id) [[sycl::work_group_size_hint(Dims...)]] {}); } int main() { queue q; foo1<2>(q); foo1<2, 2>(q); foo1<2, 2, 2>(q); foo2<2>(q); foo2<2, 2>(q); foo2<2, 2, 2>(q); }
Compiling this results with this error:
error: attribute 'reqd_work_group_size' does not support argument pack expansion 9 | q.parallel_for(ndr, [=](auto id) [[sycl::reqd_work_group_size(Dims...)]] {}); | ^ error: attribute 'work_group_size_hint' does not support argument pack expansion 16 | q.parallel_for(ndr, [=](auto id) [[sycl::work_group_size_hint(Dims...)]] {});
note that sycl::device_has does support parameter pack expansions; the following similar code compiles:
sycl::device_has
template <aspect... Aspects> void foo(queue &q) { q.parallel_for(1, [=](auto id) [[sycl::device_has(Aspects...)]] {}); }
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is your feature request related to a problem? Please describe
The
sycl::reqd_work_group_size
attribute (andsycl::work_group_size_hint
) does not accept a parameter pack expansion.Compiling this results with this error:
note that
sycl::device_has
does support parameter pack expansions; the following similar code compiles:Describe the solution you would like
No response
Describe alternatives you have considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: