- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Single variable reduction seems to be possible with sycl::reduction interface.
According to "SYCL 2020 Specification (revision 4)", array reduction will be achieved via reduction interface with std::span, which does not exist in current oneAPI release.
template <typename T, typename Extent, typename BinaryOperation>
__unspecified__ reduction(span<T, Extent> vars, const T& identity, BinaryOperation combiner, const property_list &propList = {});
Is there any way to do array reduction at this point?
Thank you in advance for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
Yes, you are correct array reduction will be achieved via reduction interface with std::span, and is not supported in current oneAPI release. We will discuss with the Developer team and come back with an update soon.
Thanks & Regards,
Noorjahan
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
Yes, you are correct array reduction will be achieved via reduction interface with std::span, and is not supported in current oneAPI release. We will discuss with the Developer team and come back with an update soon.
Thanks & Regards,
Noorjahan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
DPC++ supports built-in reduction operations, for more information, please refer to this guide https://www.intel.com/content/www/us/en/develop/documentation/oneapi-gpu-optimization-guide/top/kernels/reduction.html
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you everyone!
I'm going to implement array reduction by using the built-in reduction operation multiple time.
I will move to the std::span interface, once it is supported!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for accepting our solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found that ruduction of sycl::float2/3/4/8/16 and sycl::double2/3/4/8/16 does the trick for me.
I hope arbitrary-size array reduction will be supported soon!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page