Skip to content
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

[group_functions] Reduce test size to avoid overflow #713

Merged
merged 2 commits into from
Jun 26, 2023
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
15 changes: 10 additions & 5 deletions tests/group_functions/group_reduce.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
#include "group_functions_common.h"
#include <optional>

constexpr size_t init = 1412;
constexpr size_t init = 8;
constexpr size_t test_size = 4;
static const auto Dims = integer_pack<1, 2, 3>::generate_unnamed();

template <bool with_init, typename OpT, typename IteratorT>
Expand Down Expand Up @@ -103,7 +104,8 @@ void joint_reduce_group(sycl::queue& queue, const std::string& op_name) {
"std::iterator_traits<Ptr>::value_type joint_reduce(sub_group g, Ptr "
"first, Ptr last, BinaryOperation binary_op)"};

sycl::range<D> work_group_range = sycl_cts::util::work_group_range<D>(queue);
sycl::range<D> work_group_range =
sycl_cts::util::work_group_range<D>(queue, test_size);
size_t work_group_size = work_group_range.size();

const size_t sizes[3] = {5, work_group_size / 2, 3 * work_group_size};
Expand Down Expand Up @@ -209,7 +211,8 @@ void init_joint_reduce_group(sycl::queue& queue, const std::string& op_name) {
"T joint_reduce(sub_group g, Ptr first, Ptr last, T init, "
"BinaryOperation binary_op)"};

sycl::range<D> work_group_range = sycl_cts::util::work_group_range<D>(queue);
sycl::range<D> work_group_range =
sycl_cts::util::work_group_range<D>(queue, test_size);
size_t work_group_size = work_group_range.size();

const size_t sizes[3] = {5, work_group_size / 2, 3 * work_group_size};
Expand Down Expand Up @@ -315,7 +318,8 @@ void reduce_over_group(sycl::queue& queue, const std::string& op_name) {
"T reduce_over_group(group g, T x, BinaryOperation binary_op)",
"T reduce_over_group(sub_group g, T x, BinaryOperation binary_op)"};

sycl::range<D> work_group_range = sycl_cts::util::work_group_range<D>(queue);
sycl::range<D> work_group_range =
sycl_cts::util::work_group_range<D>(queue, test_size);
size_t work_group_size = work_group_range.size();

bool res = false;
Expand Down Expand Up @@ -432,7 +436,8 @@ void init_reduce_over_group(sycl::queue& queue, const std::string& op_name) {
"T reduce_over_group(sub_group g, V x, T init, BinaryOperation "
"binary_op)"};

sycl::range<D> work_group_range = sycl_cts::util::work_group_range<D>(queue);
sycl::range<D> work_group_range =
sycl_cts::util::work_group_range<D>(queue, test_size);
size_t work_group_size = work_group_range.size();

bool res = false;
Expand Down