Skip to content

Commit

Permalink
fix dpcpp reduction for size=0 inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelKoch committed Jul 7, 2023
1 parent f70b9f6 commit a037db5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dpcpp/base/kernel_launch_reduction.dp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ void run_kernel_reduction_impl(std::shared_ptr<const DpcppExecutor> exec,
} else {
queue->submit([&](sycl::handler& cgh) {
generic_kernel_reduction_1d<DeviceConfig>(
cgh, static_cast<int64>(size), num_workgroups, fn, op, finalize,
identity, result, args...);
cgh, static_cast<int64>(size), 1, fn, op, finalize, identity,
result, args...);
});
}
}
Expand Down Expand Up @@ -240,9 +240,9 @@ void run_kernel_reduction_impl(std::shared_ptr<const DpcppExecutor> exec,
});
} else {
queue->submit([&](sycl::handler& cgh) {
generic_kernel_reduction_2d<DeviceConfig>(
cgh, rows, cols, num_workgroups, fn, op, finalize, identity,
result, args...);
generic_kernel_reduction_2d<DeviceConfig>(cgh, rows, cols, 1, fn,
op, finalize, identity,
result, args...);
});
}
}
Expand Down

0 comments on commit a037db5

Please sign in to comment.