From 4ee8022230f2cde0cc59a327f85dc31ccb34f778 Mon Sep 17 00:00:00 2001 From: Stuart Brady Date: Thu, 4 Aug 2022 15:04:14 +0100 Subject: [PATCH] Remove unused variables in subgroup tests (#1460) Signed-off-by: Stuart Brady --- .../subgroups/subgroup_common_templates.h | 2 +- test_conformance/subgroups/subhelpers.h | 1 - test_conformance/subgroups/test_barrier.cpp | 1 - test_conformance/subgroups/test_subgroup.cpp | 17 ----------------- .../subgroups/test_subgroup_ballot.cpp | 15 +++------------ .../test_subgroup_clustered_reduce.cpp | 1 - 6 files changed, 4 insertions(+), 33 deletions(-) diff --git a/test_conformance/subgroups/subgroup_common_templates.h b/test_conformance/subgroups/subgroup_common_templates.h index c1a8316c..b2648c30 100644 --- a/test_conformance/subgroups/subgroup_common_templates.h +++ b/test_conformance/subgroups/subgroup_common_templates.h @@ -481,7 +481,7 @@ template struct SHF static void gen(Ty *x, Ty *t, cl_int *m, const WorkGroupParams &test_params) { - int i, ii, j, k, n, delta; + int i, ii, j, k, n; cl_uint l; int nw = test_params.local_workgroup_size; int ns = test_params.subgroup_size; diff --git a/test_conformance/subgroups/subhelpers.h b/test_conformance/subgroups/subhelpers.h index cc03fc4c..0944ffb3 100644 --- a/test_conformance/subgroups/subhelpers.h +++ b/test_conformance/subgroups/subhelpers.h @@ -1496,7 +1496,6 @@ template struct test size_t tmp; cl_int error; int subgroup_size, num_subgroups; - size_t realSize; size_t global = test_params.global_workgroup_size; size_t local = test_params.local_workgroup_size; clProgramWrapper program; diff --git a/test_conformance/subgroups/test_barrier.cpp b/test_conformance/subgroups/test_barrier.cpp index d415eefb..fb93ddb1 100644 --- a/test_conformance/subgroups/test_barrier.cpp +++ b/test_conformance/subgroups/test_barrier.cpp @@ -79,7 +79,6 @@ template struct BAR int ng = test_params.global_workgroup_size; int nj = (nw + ns - 1) / ns; ng = ng / nw; - int e; ii = 0; for (k = 0; k < ng; ++k) diff --git a/test_conformance/subgroups/test_subgroup.cpp b/test_conformance/subgroups/test_subgroup.cpp index aa9b32cb..75e9d4ae 100644 --- a/test_conformance/subgroups/test_subgroup.cpp +++ b/test_conformance/subgroups/test_subgroup.cpp @@ -134,23 +134,6 @@ template struct AA } }; -static const char *any_source = "__kernel void test_any(const __global Type " - "*in, __global int4 *xy, __global Type *out)\n" - "{\n" - " int gid = get_global_id(0);\n" - " XY(xy,gid);\n" - " out[gid] = sub_group_any(in[gid]);\n" - "}\n"; - -static const char *all_source = "__kernel void test_all(const __global Type " - "*in, __global int4 *xy, __global Type *out)\n" - "{\n" - " int gid = get_global_id(0);\n" - " XY(xy,gid);\n" - " out[gid] = sub_group_all(in[gid]);\n" - "}\n"; - - template int run_broadcast_scan_reduction_for_type(RunTestForType rft) { diff --git a/test_conformance/subgroups/test_subgroup_ballot.cpp b/test_conformance/subgroups/test_subgroup_ballot.cpp index b35520e6..3882311d 100644 --- a/test_conformance/subgroups/test_subgroup_ballot.cpp +++ b/test_conformance/subgroups/test_subgroup_ballot.cpp @@ -190,14 +190,13 @@ template struct BALLOT_BIT_EXTRACT static void gen(Ty *x, Ty *t, cl_int *m, const WorkGroupParams &test_params) { - int wi_id, sb_id, wg_id, l; + int wi_id, sb_id, wg_id; int gws = test_params.global_workgroup_size; int lws = test_params.local_workgroup_size; int sbs = test_params.subgroup_size; int sb_number = (lws + sbs - 1) / sbs; int wg_number = gws / lws; int limit_sbs = sbs > 100 ? 100 : sbs; - int non_uniform_size = gws % lws; for (wg_id = 0; wg_id < wg_number; ++wg_id) { // for each work_group @@ -235,7 +234,7 @@ template struct BALLOT_BIT_EXTRACT static test_status chk(Ty *x, Ty *y, Ty *mx, Ty *my, cl_int *m, const WorkGroupParams &test_params) { - int wi_id, wg_id, l, sb_id; + int wi_id, wg_id, sb_id; int gws = test_params.global_workgroup_size; int lws = test_params.local_workgroup_size; int sbs = test_params.subgroup_size; @@ -351,10 +350,6 @@ template struct BALLOT_INVERSE static void gen(Ty *x, Ty *t, cl_int *m, const WorkGroupParams &test_params) { - int gws = test_params.global_workgroup_size; - int lws = test_params.local_workgroup_size; - int sbs = test_params.subgroup_size; - int non_uniform_size = gws % lws; // no work here } @@ -398,9 +393,6 @@ template struct BALLOT_INVERSE { current_sbs = wg_offset + sbs > lws ? lws - wg_offset : sbs; } - // take index of array where info which work_item will - // be broadcast its value is stored - int midx = 4 * wg_offset + 2; // take subgroup local id of this work_item // Check result for (wi_id = 0; wi_id < current_sbs; ++wi_id) @@ -461,7 +453,6 @@ template struct BALLOT_COUNT_SCAN_FIND { wg_number++; } - int e; for (wg_id = 0; wg_id < wg_number; ++wg_id) { // for each work_group if (non_uniform_size && wg_id == wg_number - 1) @@ -683,7 +674,7 @@ template struct SMASK static void gen(Ty *x, Ty *t, cl_int *m, const WorkGroupParams &test_params) { - int wi_id, wg_id, l, sb_id; + int wi_id, wg_id, sb_id; int gws = test_params.global_workgroup_size; int lws = test_params.local_workgroup_size; int sbs = test_params.subgroup_size; diff --git a/test_conformance/subgroups/test_subgroup_clustered_reduce.cpp b/test_conformance/subgroups/test_subgroup_clustered_reduce.cpp index b016bf99..38652d51 100644 --- a/test_conformance/subgroups/test_subgroup_clustered_reduce.cpp +++ b/test_conformance/subgroups/test_subgroup_clustered_reduce.cpp @@ -102,7 +102,6 @@ template struct RED_CLU { int ii = j * ns; int n = ii + ns > nw ? nw - ii : ns; - int midx = 4 * ii + 2; std::vector clusters_results; int clusters_counter = ns / test_params.cluster_size; clusters_results.resize(clusters_counter);