Skip to content

Commit 648845f

Browse files
[SYCL][Reduction] Implement identityless reductions (#8562)
This commit implements SYCL 2020 identities without a known or specified identity. This is done by adding information about when identities are specified explicitly to the reduction objects and is propagated to reducers through the "identity container" object, which may or may not contain an identity. Based on this information, the reduction kernels may pick different patch depending on whether or not the identity is available. --------- Signed-off-by: Larsen, Steffen <[email protected]>
1 parent cf245f6 commit 648845f

File tree

3 files changed

+385
-263
lines changed

3 files changed

+385
-263
lines changed

sycl/include/sycl/handler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2806,7 +2806,7 @@ class __SYCL_EXPORT handler {
28062806
// Make reduction friends to store buffers and arrays created for it
28072807
// in handler from reduction methods.
28082808
template <typename T, class BinaryOperation, int Dims, size_t Extent,
2809-
typename RedOutVar>
2809+
bool ExplicitIdentity, typename RedOutVar>
28102810
friend class detail::reduction_impl_algo;
28112811

28122812
friend inline void detail::reduction::finalizeHandler(handler &CGH);

0 commit comments

Comments
 (0)