Skip to content

[SYCL][Reduction] Fix unused variable warning #7345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sycl/include/sycl/reduction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ struct NDRangeReduction<reduction::strategy::local_atomic_and_atomic_cross_wg> {
static void run(handler &CGH, std::shared_ptr<detail::queue_impl> &Queue,
nd_range<Dims> NDRange, PropertiesT &Properties,
Reduction &Redu, KernelType &KernelFunc) {
std::ignore = Queue;
size_t NElements = Reduction::num_elements;
auto Out = Redu.getReadWriteAccessorToInitializedMem(CGH);
local_accessor<typename Reduction::result_type, 1> GroupSum{NElements, CGH};
Expand Down Expand Up @@ -904,6 +905,7 @@ struct NDRangeReduction<
static void run(handler &CGH, std::shared_ptr<detail::queue_impl> &Queue,
nd_range<Dims> NDRange, PropertiesT &Properties,
Reduction &Redu, KernelType &KernelFunc) {
std::ignore = Queue;
size_t NElements = Reduction::num_elements;
size_t WGSize = NDRange.get_local_range().size();
size_t NWorkGroups = NDRange.get_group_range().size();
Expand Down Expand Up @@ -1003,6 +1005,7 @@ template <> struct NDRangeReduction<reduction::strategy::range_basic> {
static void run(handler &CGH, std::shared_ptr<detail::queue_impl> &Queue,
nd_range<Dims> NDRange, PropertiesT &Properties,
Reduction &Redu, KernelType &KernelFunc) {
std::ignore = Queue;
size_t NElements = Reduction::num_elements;
size_t WGSize = NDRange.get_local_range().size();
size_t NWorkGroups = NDRange.get_group_range().size();
Expand Down Expand Up @@ -1121,6 +1124,7 @@ struct NDRangeReduction<reduction::strategy::group_reduce_and_atomic_cross_wg> {
static void run(handler &CGH, std::shared_ptr<detail::queue_impl> &Queue,
nd_range<Dims> NDRange, PropertiesT &Properties,
Reduction &Redu, KernelType &KernelFunc) {
std::ignore = Queue;
auto Out = Redu.getReadWriteAccessorToInitializedMem(CGH);
size_t NElements = Reduction::num_elements;

Expand Down Expand Up @@ -1158,6 +1162,7 @@ struct NDRangeReduction<
static void run(handler &CGH, std::shared_ptr<detail::queue_impl> &Queue,
nd_range<Dims> NDRange, PropertiesT &Properties,
Reduction &Redu, KernelType &KernelFunc) {
std::ignore = Queue;
auto Out = Redu.getReadWriteAccessorToInitializedMem(CGH);
size_t NElements = Reduction::num_elements;
size_t WGSize = NDRange.get_local_range().size();
Expand Down