Skip to content

Commit 0bece74

Browse files
authored
[SYCL] Fix wrong checks in IsReduOptForFastReduce<> (#3763)
The check added in (#3227) was supposed to return true for int32/int64, but wrongly checked the type sizes in bits instead of bytes, which prohibited usage of group ADD algorithm for int32/int64 in reductions. Signed-off-by: Vyacheslav N Klochkov <[email protected]>
1 parent a9711a0 commit 0bece74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/include/CL/sycl/ONEAPI/reduction.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ using IsReduOptForFastAtomicFetch =
9494
template <typename T, class BinaryOperation>
9595
using IsReduOptForFastReduce =
9696
bool_constant<((is_sgeninteger<T>::value &&
97-
(sizeof(T) == 32 || sizeof(T) == 64)) ||
97+
(sizeof(T) == 4 || sizeof(T) == 8)) ||
9898
is_sgenfloat<T>::value) &&
9999
(IsReduPlus<T, BinaryOperation>::value ||
100100
IsReduMinimum<T, BinaryOperation>::value ||

0 commit comments

Comments
 (0)