Skip to content

Commit c74a69d

Browse files
Address review comments
1 parent 186b828 commit c74a69d

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

sycl/include/CL/sycl/handler.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ class __SYCL_EXPORT handler {
462462
MStreamStorage.push_back(Stream);
463463
}
464464

465-
/// Helper utility for operation widely used throught different reduction
465+
/// Helper utility for operation widely used through different reduction
466466
/// implementations.
467467
/// @{
468468
template <class FunctorTy>
@@ -1654,7 +1654,7 @@ class __SYCL_EXPORT handler {
16541654
if constexpr (!Reduction::has_fast_atomics &&
16551655
!Reduction::has_atomic_add_float64) {
16561656
// The most basic implementation.
1657-
parallel_for_Impl<KernelName>(Range, Redu, KernelFunc);
1657+
parallel_for_impl<KernelName>(Range, Redu, KernelFunc);
16581658
return;
16591659
} else { // Can't "early" return for "if constexpr".
16601660
std::shared_ptr<detail::queue_impl> QueueCopy = MQueue;
@@ -1672,7 +1672,7 @@ class __SYCL_EXPORT handler {
16721672
Range, Redu);
16731673
} else {
16741674
// Resort to basic implementation as well.
1675-
parallel_for_Impl<KernelName>(Range, Redu, KernelFunc);
1675+
parallel_for_impl<KernelName>(Range, Redu, KernelFunc);
16761676
return;
16771677
}
16781678
} else {
@@ -1702,7 +1702,7 @@ class __SYCL_EXPORT handler {
17021702

17031703
template <typename KernelName, typename KernelType, int Dims,
17041704
typename Reduction>
1705-
void parallel_for_Impl(nd_range<Dims> Range, Reduction Redu,
1705+
void parallel_for_impl(nd_range<Dims> Range, Reduction Redu,
17061706
KernelType KernelFunc) {
17071707
// This parallel_for() is lowered to the following sequence:
17081708
// 1) Call a kernel that a) call user's lambda function and b) performs

sycl/include/sycl/ext/oneapi/reduction.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,10 +2160,6 @@ void reduCGFuncImplAtomic64(handler &CGH, KernelType KernelFunc,
21602160
template <typename KernelName, typename KernelType, int Dims, class Reduction>
21612161
void reduCGFuncAtomic64(handler &CGH, KernelType KernelFunc,
21622162
const nd_range<Dims> &Range, Reduction &Redu) {
2163-
// static_assert(
2164-
// Reduction::has_atomic_add_float64,
2165-
// "Expected to be called for reductions with atomic add FP64 support!");
2166-
21672163
auto Out = Redu.getReadWriteAccessorToInitializedMem(CGH);
21682164
reduCGFuncImplAtomic64<KernelName, KernelType, Dims, Reduction>(
21692165
CGH, KernelFunc, Range, Redu, Out);
@@ -2452,7 +2448,7 @@ void reduSaveFinalResultToUserMemHelper(
24522448
bool IsHost, Reduction &Redu, RestT... Rest) {
24532449
// Reductions initialized with USM pointer currently do not require copying
24542450
// because the last kernel writes directly to the USM memory.
2455-
if constexpr (!Reduction::is_usm)
2451+
if constexpr (!Reduction::is_usm) {
24562452
if (Redu.hasUserDiscardWriteAccessor()) {
24572453
event CopyEvent =
24582454
handler::withAuxHandler(Queue, IsHost, [&](handler &CopyHandler) {
@@ -2465,6 +2461,7 @@ void reduSaveFinalResultToUserMemHelper(
24652461
});
24662462
Events.push_back(CopyEvent);
24672463
}
2464+
}
24682465
reduSaveFinalResultToUserMemHelper(Events, Queue, IsHost, Rest...);
24692466
}
24702467

0 commit comments

Comments
 (0)