Skip to content

Commit

Permalink
Remove 'variant' from argmaxpool tester, it is unused
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 728088414
  • Loading branch information
dsharletg authored and xnnpack-bot committed Feb 18, 2025
1 parent de5a083 commit dee9b0d
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 49 deletions.
9 changes: 2 additions & 7 deletions test/argmaxpool-microkernel-tester.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@

class ArgMaxPoolMicrokernelTester {
public:
enum class Variant {
Native,
Scalar,
};

ArgMaxPoolMicrokernelTester& output_pixels(size_t output_pixels) {
assert(output_pixels != 0);
this->output_pixels_ = output_pixels;
Expand Down Expand Up @@ -143,7 +138,7 @@ class ArgMaxPoolMicrokernelTester {
return this->iterations_;
}

void Test(xnn_f32_argmaxpool_unipass_ukernel_fn argmaxpool, Variant variant = Variant::Native) const {
void Test(xnn_f32_argmaxpool_unipass_ukernel_fn argmaxpool) const {
xnnpack::ReplicableRandomDevice rng;
std::uniform_real_distribution<float> f32dist;

Expand Down Expand Up @@ -208,7 +203,7 @@ class ArgMaxPoolMicrokernelTester {
}
}

void Test(xnn_f32_argmaxpool_multipass_ukernel_fn argmaxpool, Variant variant = Variant::Native) const {
void Test(xnn_f32_argmaxpool_multipass_ukernel_fn argmaxpool) const {
xnnpack::ReplicableRandomDevice rng;
std::uniform_real_distribution<float> f32dist;

Expand Down
80 changes: 40 additions & 40 deletions test/f32-argmaxpool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ TEST(F32_ARGMAXPOOL_4X__SCALAR_C1, channels_eq_1_unipass_fulltile) {
.pooling_elements(4)
.pooling_tile(4)
.channels(channel_tile)
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1);
}

TEST(F32_ARGMAXPOOL_4X__SCALAR_C1, channels_eq_1_unipass_fulltile_with_input_offset) {
Expand All @@ -1115,7 +1115,7 @@ TEST(F32_ARGMAXPOOL_4X__SCALAR_C1, channels_eq_1_unipass_fulltile_with_input_off
.pooling_tile(4)
.channels(channel_tile)
.input_offset(3)
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1);
}

TEST(F32_ARGMAXPOOL_4X__SCALAR_C1, channels_eq_1_unipass_subtile) {
Expand All @@ -1125,7 +1125,7 @@ TEST(F32_ARGMAXPOOL_4X__SCALAR_C1, channels_eq_1_unipass_subtile) {
.pooling_elements(pooling_elements)
.pooling_tile(4)
.channels(channel_tile)
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1);
}
}

Expand All @@ -1137,7 +1137,7 @@ TEST(F32_ARGMAXPOOL_4X__SCALAR_C1, channels_eq_1_unipass_subtile_with_input_offs
.pooling_tile(4)
.channels(channel_tile)
.input_offset(3)
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1);
}
}

Expand All @@ -1147,7 +1147,7 @@ TEST(F32_ARGMAXPOOL_4X__SCALAR_C1, channels_gt_1_unipass_fulltile) {
.pooling_elements(4)
.pooling_tile(4)
.channels(channels)
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1);
}
}

Expand All @@ -1158,7 +1158,7 @@ TEST(F32_ARGMAXPOOL_4X__SCALAR_C1, channels_gt_1_unipass_fulltile_with_input_off
.pooling_tile(4)
.channels(channels)
.input_offset(3)
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1);
}
}

Expand All @@ -1169,7 +1169,7 @@ TEST(F32_ARGMAXPOOL_4X__SCALAR_C1, channels_gt_1_unipass_subtile) {
.pooling_elements(pooling_elements)
.pooling_tile(4)
.channels(channels)
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1);
}
}
}
Expand All @@ -1182,7 +1182,7 @@ TEST(F32_ARGMAXPOOL_4X__SCALAR_C1, channels_gt_1_unipass_subtile_with_input_offs
.pooling_tile(4)
.channels(channels)
.input_offset(3)
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1);
}
}
}
Expand All @@ -1196,7 +1196,7 @@ TEST(F32_ARGMAXPOOL_4X__SCALAR_C1, few_output_pixels) {
.pooling_elements(pooling_elements)
.pooling_tile(4)
.channels(channels)
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1);
}
}
}
Expand All @@ -1212,7 +1212,7 @@ TEST(F32_ARGMAXPOOL_4X__SCALAR_C1, few_output_pixels_with_input_offset) {
.pooling_tile(4)
.channels(channels)
.input_offset(7)
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1);
}
}
}
Expand All @@ -1228,7 +1228,7 @@ TEST(F32_ARGMAXPOOL_4X__SCALAR_C1, few_output_pixels_with_output_stride) {
.pooling_tile(4)
.channels(channels)
.output_stride(7)
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1);
}
}
}
Expand All @@ -1246,7 +1246,7 @@ TEST(F32_ARGMAXPOOL_4X__SCALAR_C1, few_output_pixels_with_step) {
.step(step)
.channels(channels)
.output_stride(7)
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_4x__scalar_c1);
}
}
}
Expand Down Expand Up @@ -2343,7 +2343,7 @@ TEST(F32_ARGMAXPOOL_9X__SCALAR_C1, channels_eq_1_unipass_fulltile) {
.pooling_elements(9)
.pooling_tile(9)
.channels(channel_tile)
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1);
}

TEST(F32_ARGMAXPOOL_9X__SCALAR_C1, channels_eq_1_unipass_fulltile_with_input_offset) {
Expand All @@ -2353,7 +2353,7 @@ TEST(F32_ARGMAXPOOL_9X__SCALAR_C1, channels_eq_1_unipass_fulltile_with_input_off
.pooling_tile(9)
.channels(channel_tile)
.input_offset(3)
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1);
}

TEST(F32_ARGMAXPOOL_9X__SCALAR_C1, channels_eq_1_unipass_subtile) {
Expand All @@ -2363,7 +2363,7 @@ TEST(F32_ARGMAXPOOL_9X__SCALAR_C1, channels_eq_1_unipass_subtile) {
.pooling_elements(pooling_elements)
.pooling_tile(9)
.channels(channel_tile)
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1);
}
}

Expand All @@ -2375,7 +2375,7 @@ TEST(F32_ARGMAXPOOL_9X__SCALAR_C1, channels_eq_1_unipass_subtile_with_input_offs
.pooling_tile(9)
.channels(channel_tile)
.input_offset(3)
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1);
}
}

Expand All @@ -2385,7 +2385,7 @@ TEST(F32_ARGMAXPOOL_9X__SCALAR_C1, channels_gt_1_unipass_fulltile) {
.pooling_elements(9)
.pooling_tile(9)
.channels(channels)
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1);
}
}

Expand All @@ -2396,7 +2396,7 @@ TEST(F32_ARGMAXPOOL_9X__SCALAR_C1, channels_gt_1_unipass_fulltile_with_input_off
.pooling_tile(9)
.channels(channels)
.input_offset(3)
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1);
}
}

Expand All @@ -2407,7 +2407,7 @@ TEST(F32_ARGMAXPOOL_9X__SCALAR_C1, channels_gt_1_unipass_subtile) {
.pooling_elements(pooling_elements)
.pooling_tile(9)
.channels(channels)
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1);
}
}
}
Expand All @@ -2420,7 +2420,7 @@ TEST(F32_ARGMAXPOOL_9X__SCALAR_C1, channels_gt_1_unipass_subtile_with_input_offs
.pooling_tile(9)
.channels(channels)
.input_offset(3)
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1);
}
}
}
Expand All @@ -2434,7 +2434,7 @@ TEST(F32_ARGMAXPOOL_9X__SCALAR_C1, few_output_pixels) {
.pooling_elements(pooling_elements)
.pooling_tile(9)
.channels(channels)
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1);
}
}
}
Expand All @@ -2450,7 +2450,7 @@ TEST(F32_ARGMAXPOOL_9X__SCALAR_C1, few_output_pixels_with_input_offset) {
.pooling_tile(9)
.channels(channels)
.input_offset(7)
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1);
}
}
}
Expand All @@ -2466,7 +2466,7 @@ TEST(F32_ARGMAXPOOL_9X__SCALAR_C1, few_output_pixels_with_output_stride) {
.pooling_tile(9)
.channels(channels)
.output_stride(7)
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1);
}
}
}
Expand All @@ -2484,7 +2484,7 @@ TEST(F32_ARGMAXPOOL_9X__SCALAR_C1, few_output_pixels_with_step) {
.step(step)
.channels(channels)
.output_stride(7)
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9x__scalar_c1);
}
}
}
Expand Down Expand Up @@ -4014,7 +4014,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, channels_eq_1_twopass_fulltile) {
.pooling_elements(17)
.pooling_tile(9, 8)
.channels(channel_tile)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}

TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, channels_eq_1_twopass_fulltile_with_input_offset) {
Expand All @@ -4024,7 +4024,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, channels_eq_1_twopass_fulltile_with_input_o
.pooling_tile(9, 8)
.channels(channel_tile)
.input_offset(3)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}

TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, channels_eq_1_twopass_subtile) {
Expand All @@ -4034,7 +4034,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, channels_eq_1_twopass_subtile) {
.pooling_elements(pooling_elements)
.pooling_tile(9, 8)
.channels(channel_tile)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}
}

Expand All @@ -4046,7 +4046,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, channels_eq_1_twopass_subtile_with_input_of
.pooling_tile(9, 8)
.channels(channel_tile)
.input_offset(3)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}
}

Expand All @@ -4056,7 +4056,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, channels_gt_1_twopass_fulltile) {
.pooling_elements(17)
.pooling_tile(9, 8)
.channels(channels)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}
}

Expand All @@ -4067,7 +4067,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, channels_gt_1_twopass_fulltile_with_input_o
.pooling_tile(9, 8)
.channels(channels)
.input_offset(3)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}
}

Expand All @@ -4078,7 +4078,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, channels_gt_1_twopass_subtile) {
.pooling_elements(17)
.pooling_tile(9, 8)
.channels(channels)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}
}
}
Expand All @@ -4091,7 +4091,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, channels_gt_1_twopass_subtile_with_input_of
.pooling_tile(9, 8)
.channels(channels)
.input_offset(3)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}
}
}
Expand All @@ -4103,7 +4103,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, channels_eq_1_multipass) {
.pooling_elements(17)
.pooling_tile(9, 8)
.channels(channel_tile)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}
}

Expand All @@ -4115,7 +4115,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, channels_eq_1_multipass_with_input_offset)
.pooling_tile(9, 8)
.channels(channel_tile)
.input_offset(3)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}
}

Expand All @@ -4126,7 +4126,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, channels_gt_1_multipass) {
.pooling_elements(17)
.pooling_tile(9, 8)
.channels(channels)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}
}
}
Expand All @@ -4139,7 +4139,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, channels_gt_1_multipass_with_input_offset)
.pooling_tile(9, 8)
.channels(channels)
.input_offset(3)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}
}
}
Expand All @@ -4153,7 +4153,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, few_output_pixels) {
.pooling_elements(pooling_elements)
.pooling_tile(9, 8)
.channels(channels)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}
}
}
Expand All @@ -4169,7 +4169,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, few_output_pixels_with_input_offset) {
.pooling_tile(9, 8)
.channels(channels)
.input_offset(7)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}
}
}
Expand All @@ -4185,7 +4185,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, few_output_pixels_with_output_stride) {
.pooling_tile(9, 8)
.channels(channels)
.output_stride(7)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}
}
}
Expand All @@ -4203,7 +4203,7 @@ TEST(F32_ARGMAXPOOL_9P8X__SCALAR_C1, few_output_pixels_with_step) {
.step(step)
.channels(channels)
.output_stride(7)
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1, ArgMaxPoolMicrokernelTester::Variant::Scalar);
.Test(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions tools/generate-argmaxpool-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,8 +991,6 @@ def generate_test_cases(ukernel, primary_tile, incremental_tile, channel_tile,
_, test_name = ukernel.split("_", 1)
_, datatype, ukernel_type, _ = ukernel.split("_", 3)
test_args = [ukernel]
if not isa:
test_args.append("ArgMaxPoolMicrokernelTester::Variant::Scalar")
channel_scaled_tile = channel_tile
if vector_tile:
ctype = {"f16": "uint16_t", "f32": "float"}[datatype]
Expand Down

0 comments on commit dee9b0d

Please sign in to comment.