diff --git a/sycl/include/sycl/reduction.hpp b/sycl/include/sycl/reduction.hpp index bc84422033fbe..af985bbdaad9a 100644 --- a/sycl/include/sycl/reduction.hpp +++ b/sycl/include/sycl/reduction.hpp @@ -854,6 +854,7 @@ struct NDRangeReduction { static void run(handler &CGH, std::shared_ptr &Queue, nd_range NDRange, PropertiesT &Properties, Reduction &Redu, KernelType &KernelFunc) { + std::ignore = Queue; size_t NElements = Reduction::num_elements; auto Out = Redu.getReadWriteAccessorToInitializedMem(CGH); local_accessor GroupSum{NElements, CGH}; @@ -904,6 +905,7 @@ struct NDRangeReduction< static void run(handler &CGH, std::shared_ptr &Queue, nd_range 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(); @@ -1003,6 +1005,7 @@ template <> struct NDRangeReduction { static void run(handler &CGH, std::shared_ptr &Queue, nd_range 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(); @@ -1121,6 +1124,7 @@ struct NDRangeReduction { static void run(handler &CGH, std::shared_ptr &Queue, nd_range NDRange, PropertiesT &Properties, Reduction &Redu, KernelType &KernelFunc) { + std::ignore = Queue; auto Out = Redu.getReadWriteAccessorToInitializedMem(CGH); size_t NElements = Reduction::num_elements; @@ -1158,6 +1162,7 @@ struct NDRangeReduction< static void run(handler &CGH, std::shared_ptr &Queue, nd_range 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();