XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1 | // Copyright 2019 Google LLC |
| 2 | // |
| 3 | // This source code is licensed under the BSD-style license found in the |
| 4 | // LICENSE file in the root directory of this source tree. |
| 5 | |
| 6 | #include <gtest/gtest.h> |
| 7 | |
| 8 | #include <xnnpack/params.h> |
| 9 | |
| 10 | #include "deconvolution-operator-tester.h" |
| 11 | |
| 12 | |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 13 | constexpr size_t kUnstridedInputHeight = 8; |
| 14 | constexpr size_t kUnstridedInputWidth = 7; |
| 15 | constexpr size_t kStridedInputHeight = 6; |
| 16 | constexpr size_t kStridedInputWidth = 5; |
| 17 | |
| 18 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 19 | /**************************** Future GEMM path ****************************/ |
| 20 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 21 | TEST(DECONVOLUTION_NHWC_QU8, 1x1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 22 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 23 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 24 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 25 | .kernel_size(1, 1) |
| 26 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 27 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 28 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 29 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 30 | } |
| 31 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 32 | TEST(DECONVOLUTION_NHWC_QU8, 1x1_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 33 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 34 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 35 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 36 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 37 | .kernel_size(1, 1) |
| 38 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 39 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 40 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 41 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 42 | } |
| 43 | } |
| 44 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 45 | TEST(DECONVOLUTION_NHWC_QU8, 1x1_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 46 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 47 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 48 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 49 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 50 | .kernel_size(1, 1) |
| 51 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 52 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 53 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 54 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 55 | } |
| 56 | } |
| 57 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 58 | TEST(DECONVOLUTION_NHWC_QU8, 1x1_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 59 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 60 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 61 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 62 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 63 | .kernel_size(1, 1) |
| 64 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 65 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 66 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 67 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 68 | } |
| 69 | } |
| 70 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 71 | TEST(DECONVOLUTION_NHWC_QU8, 1x1_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 72 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 73 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 74 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 75 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 76 | .kernel_size(1, 1) |
| 77 | .group_input_channels(23) |
| 78 | .group_output_channels(output_channels) |
| 79 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 80 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 81 | } |
| 82 | } |
| 83 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 84 | TEST(DECONVOLUTION_NHWC_QU8, 1x1_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 85 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 86 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 87 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 88 | .kernel_size(1, 1) |
| 89 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 90 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 91 | .input_pixel_stride(28) |
| 92 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 93 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 94 | } |
| 95 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 96 | TEST(DECONVOLUTION_NHWC_QU8, 1x1_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 97 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 98 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 99 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 100 | .kernel_size(1, 1) |
| 101 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 102 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
| 103 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 104 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 105 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 106 | } |
| 107 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 108 | TEST(DECONVOLUTION_NHWC_QU8, 1x1_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 109 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 110 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 111 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 112 | .kernel_size(1, 1) |
| 113 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 114 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 115 | .qmin(128) |
| 116 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 117 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 118 | } |
| 119 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 120 | TEST(DECONVOLUTION_NHWC_QU8, 1x1_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 121 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 122 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 123 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 124 | .kernel_size(1, 1) |
| 125 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 126 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 127 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 128 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 129 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 130 | } |
| 131 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 132 | TEST(DECONVOLUTION_NHWC_QU8, 1x1_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 133 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 134 | DeconvolutionOperatorTester() |
| 135 | .has_bias(false) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 136 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 137 | .kernel_size(1, 1) |
| 138 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 139 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 140 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 141 | .TestQU8(); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 142 | } |
| 143 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 144 | /**************************** Future GEMM path, grouped ****************************/ |
| 145 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 146 | TEST(DECONVOLUTION_NHWC_QU8, grouped_1x1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 147 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 148 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 149 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 150 | .kernel_size(1, 1) |
| 151 | .groups(2) |
| 152 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 153 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 154 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 155 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 156 | } |
| 157 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 158 | TEST(DECONVOLUTION_NHWC_QU8, grouped_1x1_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 159 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 160 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 161 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 162 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 163 | .kernel_size(1, 1) |
| 164 | .groups(2) |
| 165 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 166 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 167 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 168 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 169 | } |
| 170 | } |
| 171 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 172 | TEST(DECONVOLUTION_NHWC_QU8, grouped_1x1_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 173 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 174 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 175 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 176 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 177 | .kernel_size(1, 1) |
| 178 | .groups(2) |
| 179 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 180 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 181 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 182 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 183 | } |
| 184 | } |
| 185 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 186 | TEST(DECONVOLUTION_NHWC_QU8, grouped_1x1_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 187 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 188 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 189 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 190 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 191 | .kernel_size(1, 1) |
| 192 | .groups(2) |
| 193 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 194 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 195 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 196 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 197 | } |
| 198 | } |
| 199 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 200 | TEST(DECONVOLUTION_NHWC_QU8, grouped_1x1_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 201 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 202 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 203 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 204 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 205 | .kernel_size(1, 1) |
| 206 | .groups(2) |
| 207 | .group_input_channels(23) |
| 208 | .group_output_channels(output_channels) |
| 209 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 210 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 211 | } |
| 212 | } |
| 213 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 214 | TEST(DECONVOLUTION_NHWC_QU8, grouped_1x1_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 215 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 216 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 217 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 218 | .kernel_size(1, 1) |
| 219 | .groups(2) |
| 220 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 221 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 222 | .input_pixel_stride(47) |
| 223 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 224 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 225 | } |
| 226 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 227 | TEST(DECONVOLUTION_NHWC_QU8, grouped_1x1_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 228 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 229 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 230 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 231 | .kernel_size(1, 1) |
| 232 | .groups(2) |
| 233 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 234 | .group_output_channels(xnn_params.qu8.gemm.nr + 3) |
| 235 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 236 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 237 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 238 | } |
| 239 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 240 | TEST(DECONVOLUTION_NHWC_QU8, grouped_1x1_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 241 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 242 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 243 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 244 | .kernel_size(1, 1) |
| 245 | .groups(2) |
| 246 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 247 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 248 | .qmin(128) |
| 249 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 250 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 251 | } |
| 252 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 253 | TEST(DECONVOLUTION_NHWC_QU8, grouped_1x1_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 254 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 255 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 256 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 257 | .kernel_size(1, 1) |
| 258 | .groups(2) |
| 259 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 260 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 261 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 262 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 263 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 264 | } |
| 265 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 266 | TEST(DECONVOLUTION_NHWC_QU8, grouped_1x1_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 267 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 268 | DeconvolutionOperatorTester() |
| 269 | .has_bias(false) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 270 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 271 | .kernel_size(1, 1) |
| 272 | .groups(2) |
| 273 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 274 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 275 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 276 | .TestQU8(); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 277 | } |
| 278 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 279 | /**************************** Future GEMM path, batched ****************************/ |
| 280 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 281 | TEST(DECONVOLUTION_NHWC_QU8, batched_1x1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 282 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 283 | DeconvolutionOperatorTester() |
| 284 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 285 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 286 | .kernel_size(1, 1) |
| 287 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 288 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 289 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 290 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 291 | } |
| 292 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 293 | TEST(DECONVOLUTION_NHWC_QU8, batched_1x1_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 294 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 295 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 296 | DeconvolutionOperatorTester() |
| 297 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 298 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 299 | .kernel_size(1, 1) |
| 300 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 301 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 302 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 303 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 304 | } |
| 305 | } |
| 306 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 307 | TEST(DECONVOLUTION_NHWC_QU8, batched_1x1_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 308 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 309 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 310 | DeconvolutionOperatorTester() |
| 311 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 312 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 313 | .kernel_size(1, 1) |
| 314 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 315 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 316 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 317 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 318 | } |
| 319 | } |
| 320 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 321 | TEST(DECONVOLUTION_NHWC_QU8, batched_1x1_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 322 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 323 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 324 | DeconvolutionOperatorTester() |
| 325 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 326 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 327 | .kernel_size(1, 1) |
| 328 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 329 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 330 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 331 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 332 | } |
| 333 | } |
| 334 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 335 | TEST(DECONVOLUTION_NHWC_QU8, batched_1x1_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 336 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 337 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 338 | DeconvolutionOperatorTester() |
| 339 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 340 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 341 | .kernel_size(1, 1) |
| 342 | .group_input_channels(23) |
| 343 | .group_output_channels(output_channels) |
| 344 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 345 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 346 | } |
| 347 | } |
| 348 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 349 | TEST(DECONVOLUTION_NHWC_QU8, batched_1x1_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 350 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 351 | DeconvolutionOperatorTester() |
| 352 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 353 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 354 | .kernel_size(1, 1) |
| 355 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 356 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 357 | .input_pixel_stride(28) |
| 358 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 359 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 360 | } |
| 361 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 362 | TEST(DECONVOLUTION_NHWC_QU8, batched_1x1_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 363 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 364 | DeconvolutionOperatorTester() |
| 365 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 366 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 367 | .kernel_size(1, 1) |
| 368 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 369 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
| 370 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 371 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 372 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 373 | } |
| 374 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 375 | TEST(DECONVOLUTION_NHWC_QU8, batched_1x1_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 376 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 377 | DeconvolutionOperatorTester() |
| 378 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 379 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 380 | .kernel_size(1, 1) |
| 381 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 382 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 383 | .qmin(128) |
| 384 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 385 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 386 | } |
| 387 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 388 | TEST(DECONVOLUTION_NHWC_QU8, batched_1x1_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 389 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 390 | DeconvolutionOperatorTester() |
| 391 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 392 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 393 | .kernel_size(1, 1) |
| 394 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 395 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 396 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 397 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 398 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 399 | } |
| 400 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 401 | TEST(DECONVOLUTION_NHWC_QU8, batched_1x1_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 402 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 403 | DeconvolutionOperatorTester() |
| 404 | .has_bias(false) |
| 405 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 406 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 407 | .kernel_size(1, 1) |
| 408 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 409 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 410 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 411 | .TestQU8(); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 412 | } |
| 413 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 414 | /**************************** Future GEMM path, batched, grouped ****************************/ |
| 415 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 416 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_1x1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 417 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 418 | DeconvolutionOperatorTester() |
| 419 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 420 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 421 | .kernel_size(1, 1) |
| 422 | .groups(2) |
| 423 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 424 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 425 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 426 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 427 | } |
| 428 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 429 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_1x1_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 430 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 431 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 432 | DeconvolutionOperatorTester() |
| 433 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 434 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 435 | .kernel_size(1, 1) |
| 436 | .groups(2) |
| 437 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 438 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 439 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 440 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 441 | } |
| 442 | } |
| 443 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 444 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_1x1_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 445 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 446 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 447 | DeconvolutionOperatorTester() |
| 448 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 449 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 450 | .kernel_size(1, 1) |
| 451 | .groups(2) |
| 452 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 453 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 454 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 455 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 456 | } |
| 457 | } |
| 458 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 459 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_1x1_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 460 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 461 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 462 | DeconvolutionOperatorTester() |
| 463 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 464 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 465 | .kernel_size(1, 1) |
| 466 | .groups(2) |
| 467 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 468 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 469 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 470 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 471 | } |
| 472 | } |
| 473 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 474 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_1x1_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 475 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 476 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 477 | DeconvolutionOperatorTester() |
| 478 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 479 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 480 | .kernel_size(1, 1) |
| 481 | .groups(2) |
| 482 | .group_input_channels(23) |
| 483 | .group_output_channels(output_channels) |
| 484 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 485 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 486 | } |
| 487 | } |
| 488 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 489 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_1x1_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 490 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 491 | DeconvolutionOperatorTester() |
| 492 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 493 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 494 | .kernel_size(1, 1) |
| 495 | .groups(2) |
| 496 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 497 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 498 | .input_pixel_stride(47) |
| 499 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 500 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 501 | } |
| 502 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 503 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_1x1_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 504 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 505 | DeconvolutionOperatorTester() |
| 506 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 507 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 508 | .kernel_size(1, 1) |
| 509 | .groups(2) |
| 510 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 511 | .group_output_channels(xnn_params.qu8.gemm.nr + 3) |
| 512 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 513 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 514 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 515 | } |
| 516 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 517 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_1x1_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 518 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 519 | DeconvolutionOperatorTester() |
| 520 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 521 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 522 | .kernel_size(1, 1) |
| 523 | .groups(2) |
| 524 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 525 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 526 | .qmin(128) |
| 527 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 528 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 529 | } |
| 530 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 531 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_1x1_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 532 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 533 | DeconvolutionOperatorTester() |
| 534 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 535 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 536 | .kernel_size(1, 1) |
| 537 | .groups(2) |
| 538 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 539 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 540 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 541 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 542 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 543 | } |
| 544 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 545 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_1x1_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 546 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 547 | DeconvolutionOperatorTester() |
| 548 | .has_bias(false) |
| 549 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 550 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 551 | .kernel_size(1, 1) |
| 552 | .groups(2) |
| 553 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 554 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 555 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 556 | .TestQU8(); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 557 | } |
| 558 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 559 | /**************************** CONV path ****************************/ |
| 560 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 561 | TEST(DECONVOLUTION_NHWC_QU8, 3x3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 562 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 563 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 564 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 565 | .padding(1) |
| 566 | .kernel_size(3, 3) |
| 567 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 568 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 569 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 570 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 571 | } |
| 572 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 573 | TEST(DECONVOLUTION_NHWC_QU8, Kx3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 574 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 575 | for (size_t kernel_height = 1; kernel_height <= 4; kernel_height *= 2) { |
| 576 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 577 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 578 | .padding_width(1) |
| 579 | .kernel_size(kernel_height, 3) |
| 580 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 581 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 582 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 583 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 584 | } |
| 585 | } |
| 586 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 587 | TEST(DECONVOLUTION_NHWC_QU8, 3xK) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 588 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 589 | for (size_t kernel_width = 1; kernel_width <= 4; kernel_width *= 2) { |
| 590 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 591 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 592 | .padding_height(1) |
| 593 | .kernel_size(3, kernel_width) |
| 594 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 595 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 596 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 597 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 598 | } |
| 599 | } |
| 600 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 601 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 602 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 603 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 604 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 605 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 606 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 607 | .padding_width(1) |
| 608 | .padding_top(padding_top) |
| 609 | .padding_bottom(padding_bottom) |
| 610 | .kernel_size(3, 3) |
| 611 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 612 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 613 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 614 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 615 | } |
| 616 | } |
| 617 | } |
| 618 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 619 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 620 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 621 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 622 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 623 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 624 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 625 | .padding_height(1) |
| 626 | .padding_left(padding_left) |
| 627 | .padding_right(padding_right) |
| 628 | .kernel_size(3, 3) |
| 629 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 630 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 631 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 632 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 633 | } |
| 634 | } |
| 635 | } |
| 636 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 637 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 638 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 639 | for (size_t adjustment_height = 1; adjustment_height <= 2; adjustment_height++) { |
| 640 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 641 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 642 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 643 | .stride_height(adjustment_height + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 644 | .adjustment_height(adjustment_height) |
| 645 | .kernel_size(3, 3) |
| 646 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 647 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 648 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 649 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 650 | } |
| 651 | } |
| 652 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 653 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 654 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 655 | for (size_t adjustment_width = 1; adjustment_width <= 2; adjustment_width++) { |
| 656 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 657 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 658 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 659 | .stride_width(adjustment_width + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 660 | .adjustment_width(adjustment_width) |
| 661 | .kernel_size(3, 3) |
| 662 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 663 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 664 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 665 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 666 | } |
| 667 | } |
| 668 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 669 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 670 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 671 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 672 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 673 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 674 | .padding(1) |
| 675 | .kernel_size(3, 3) |
| 676 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 677 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 678 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 679 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 680 | } |
| 681 | } |
| 682 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 683 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 684 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 685 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 686 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 687 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 688 | .padding(1) |
| 689 | .kernel_size(3, 3) |
| 690 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 691 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 692 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 693 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 694 | } |
| 695 | } |
| 696 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 697 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_varying_input_height_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 698 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 699 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
| 700 | DeconvolutionOperatorTester() |
| 701 | .input_size(input_height, kUnstridedInputWidth) |
| 702 | .padding_tf_same(true) |
| 703 | .kernel_size(3, 3) |
| 704 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 705 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 706 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 707 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 708 | } |
| 709 | } |
| 710 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 711 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_varying_input_width_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 712 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 713 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
| 714 | DeconvolutionOperatorTester() |
| 715 | .input_size(kUnstridedInputHeight, input_width) |
| 716 | .padding_tf_same(true) |
| 717 | .kernel_size(3, 3) |
| 718 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 719 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 720 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 721 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 722 | } |
| 723 | } |
| 724 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 725 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 726 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 727 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 728 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 729 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 730 | .padding(1) |
| 731 | .kernel_size(3, 3) |
| 732 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 733 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 734 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 735 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 736 | } |
| 737 | } |
| 738 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 739 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 740 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 741 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 742 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 743 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 744 | .padding(1) |
| 745 | .kernel_size(3, 3) |
| 746 | .group_input_channels(23) |
| 747 | .group_output_channels(output_channels) |
| 748 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 749 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 750 | } |
| 751 | } |
| 752 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 753 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_with_height_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 754 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 755 | for (size_t dilation_height = 2; dilation_height <= 3; dilation_height++) { |
| 756 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 757 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 758 | .padding(1) |
| 759 | .kernel_size(3, 3) |
| 760 | .dilation_height(dilation_height) |
| 761 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 762 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 763 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 764 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 765 | } |
| 766 | } |
| 767 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 768 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_with_width_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 769 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 770 | for (size_t dilation_width = 2; dilation_width <= 3; dilation_width++) { |
| 771 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 772 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 773 | .padding(1) |
| 774 | .kernel_size(3, 3) |
| 775 | .dilation_width(dilation_width) |
| 776 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 777 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 778 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 779 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 780 | } |
| 781 | } |
| 782 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 783 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_with_height_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 784 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 785 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 786 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 787 | .padding(1) |
| 788 | .kernel_size(3, 3) |
| 789 | .dilation_height(3) |
| 790 | .stride_height(2) |
| 791 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 792 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 793 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 794 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 795 | } |
| 796 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 797 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_with_width_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 798 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 799 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 800 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 801 | .padding(1) |
| 802 | .kernel_size(3, 3) |
| 803 | .dilation_width(3) |
| 804 | .stride_width(2) |
| 805 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 806 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 807 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 808 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 809 | } |
| 810 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 811 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 812 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 813 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 814 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 815 | .padding(1) |
| 816 | .kernel_size(3, 3) |
| 817 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 818 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 819 | .input_pixel_stride(28) |
| 820 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 821 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 822 | } |
| 823 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 824 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 825 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 826 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 827 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 828 | .padding(1) |
| 829 | .kernel_size(3, 3) |
| 830 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 831 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
| 832 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 833 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 834 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 835 | } |
| 836 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 837 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 838 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 839 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 840 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 841 | .padding(1) |
| 842 | .kernel_size(3, 3) |
| 843 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 844 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 845 | .qmin(128) |
| 846 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 847 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 848 | } |
| 849 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 850 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 851 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 852 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 853 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 854 | .padding(1) |
| 855 | .kernel_size(3, 3) |
| 856 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 857 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 858 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 859 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 860 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 861 | } |
| 862 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 863 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 864 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 865 | DeconvolutionOperatorTester() |
| 866 | .has_bias(false) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 867 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 868 | .padding(1) |
| 869 | .kernel_size(3, 3) |
| 870 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 871 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 872 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 873 | .TestQU8(); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 874 | } |
| 875 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 876 | /**************************** CONV path, grouped ****************************/ |
| 877 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 878 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 879 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 880 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 881 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 882 | .padding(1) |
| 883 | .kernel_size(3, 3) |
| 884 | .groups(2) |
| 885 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 886 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 887 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 888 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 889 | } |
| 890 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 891 | TEST(DECONVOLUTION_NHWC_QU8, grouped_Kx3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 892 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 893 | for (size_t kernel_height = 1; kernel_height <= 4; kernel_height *= 2) { |
| 894 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 895 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 896 | .padding_width(1) |
| 897 | .kernel_size(kernel_height, 3) |
| 898 | .groups(2) |
| 899 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 900 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 901 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 902 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 903 | } |
| 904 | } |
| 905 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 906 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3xK) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 907 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 908 | for (size_t kernel_width = 1; kernel_width <= 4; kernel_width *= 2) { |
| 909 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 910 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 911 | .padding_height(1) |
| 912 | .kernel_size(3, kernel_width) |
| 913 | .groups(2) |
| 914 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 915 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 916 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 917 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 918 | } |
| 919 | } |
| 920 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 921 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 922 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 923 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 924 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 925 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 926 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 927 | .padding_width(1) |
| 928 | .padding_top(padding_top) |
| 929 | .padding_bottom(padding_bottom) |
| 930 | .kernel_size(3, 3) |
| 931 | .groups(2) |
| 932 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 933 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 934 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 935 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 936 | } |
| 937 | } |
| 938 | } |
| 939 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 940 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 941 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 942 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 943 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 944 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 945 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 946 | .padding_height(1) |
| 947 | .padding_left(padding_left) |
| 948 | .padding_right(padding_right) |
| 949 | .kernel_size(3, 3) |
| 950 | .groups(2) |
| 951 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 952 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 953 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 954 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 955 | } |
| 956 | } |
| 957 | } |
| 958 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 959 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 960 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 961 | for (size_t adjustment_height = 1; adjustment_height <= 2; adjustment_height++) { |
| 962 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 963 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 964 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 965 | .stride_height(adjustment_height + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 966 | .adjustment_height(adjustment_height) |
| 967 | .kernel_size(3, 3) |
| 968 | .groups(2) |
| 969 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 970 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 971 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 972 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 973 | } |
| 974 | } |
| 975 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 976 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 977 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 978 | for (size_t adjustment_width = 1; adjustment_width <= 2; adjustment_width++) { |
| 979 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 980 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 981 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 982 | .stride_width(adjustment_width + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 983 | .adjustment_width(adjustment_width) |
| 984 | .kernel_size(3, 3) |
| 985 | .groups(2) |
| 986 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 987 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 988 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 989 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 990 | } |
| 991 | } |
| 992 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 993 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 994 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 995 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 996 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 997 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 998 | .padding(1) |
| 999 | .kernel_size(3, 3) |
| 1000 | .groups(2) |
| 1001 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1002 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1003 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1004 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1005 | } |
| 1006 | } |
| 1007 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1008 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1009 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1010 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1011 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1012 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1013 | .padding(1) |
| 1014 | .kernel_size(3, 3) |
| 1015 | .groups(2) |
| 1016 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1017 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1018 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1019 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1020 | } |
| 1021 | } |
| 1022 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1023 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_varying_input_height_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1024 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 1025 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
| 1026 | DeconvolutionOperatorTester() |
| 1027 | .input_size(input_height, kUnstridedInputWidth) |
| 1028 | .padding_tf_same(true) |
| 1029 | .kernel_size(3, 3) |
| 1030 | .groups(2) |
| 1031 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1032 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1033 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1034 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1035 | } |
| 1036 | } |
| 1037 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1038 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_varying_input_width_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1039 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 1040 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
| 1041 | DeconvolutionOperatorTester() |
| 1042 | .input_size(kUnstridedInputHeight, input_width) |
| 1043 | .padding_tf_same(true) |
| 1044 | .kernel_size(3, 3) |
| 1045 | .groups(2) |
| 1046 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1047 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1048 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1049 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1050 | } |
| 1051 | } |
| 1052 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1053 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1054 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1055 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 1056 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1057 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1058 | .padding(1) |
| 1059 | .kernel_size(3, 3) |
| 1060 | .groups(2) |
| 1061 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1062 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1063 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1064 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1065 | } |
| 1066 | } |
| 1067 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1068 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1069 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1070 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1071 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1072 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1073 | .padding(1) |
| 1074 | .kernel_size(3, 3) |
| 1075 | .groups(2) |
| 1076 | .group_input_channels(23) |
| 1077 | .group_output_channels(output_channels) |
| 1078 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1079 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1080 | } |
| 1081 | } |
| 1082 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1083 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_with_height_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1084 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1085 | for (size_t dilation_height = 2; dilation_height <= 3; dilation_height++) { |
| 1086 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1087 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1088 | .padding(1) |
| 1089 | .kernel_size(3, 3) |
| 1090 | .dilation_height(dilation_height) |
| 1091 | .groups(2) |
| 1092 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1093 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1094 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1095 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1096 | } |
| 1097 | } |
| 1098 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1099 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_with_width_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1100 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1101 | for (size_t dilation_width = 2; dilation_width <= 3; dilation_width++) { |
| 1102 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1103 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1104 | .padding(1) |
| 1105 | .kernel_size(3, 3) |
| 1106 | .dilation_width(dilation_width) |
| 1107 | .groups(2) |
| 1108 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1109 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1110 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1111 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1112 | } |
| 1113 | } |
| 1114 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1115 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_with_height_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1116 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1117 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1118 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1119 | .padding(1) |
| 1120 | .kernel_size(3, 3) |
| 1121 | .dilation_height(3) |
| 1122 | .stride_height(2) |
| 1123 | .groups(2) |
| 1124 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1125 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1126 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1127 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1128 | } |
| 1129 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1130 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_with_width_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1131 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1132 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1133 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1134 | .padding(1) |
| 1135 | .kernel_size(3, 3) |
| 1136 | .dilation_width(3) |
| 1137 | .stride_width(2) |
| 1138 | .groups(2) |
| 1139 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1140 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1141 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1142 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1143 | } |
| 1144 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1145 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1146 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1147 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1148 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1149 | .padding(1) |
| 1150 | .kernel_size(3, 3) |
| 1151 | .groups(2) |
| 1152 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1153 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1154 | .input_pixel_stride(47) |
| 1155 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1156 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1157 | } |
| 1158 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1159 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1160 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1161 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1162 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1163 | .padding(1) |
| 1164 | .kernel_size(3, 3) |
| 1165 | .groups(2) |
| 1166 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1167 | .group_output_channels(xnn_params.qu8.gemm.nr + 3) |
| 1168 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1169 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1170 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1171 | } |
| 1172 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1173 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1174 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1175 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1176 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1177 | .padding(1) |
| 1178 | .kernel_size(3, 3) |
| 1179 | .groups(2) |
| 1180 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1181 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1182 | .qmin(128) |
| 1183 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1184 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1185 | } |
| 1186 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1187 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1188 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1189 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1190 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1191 | .padding(1) |
| 1192 | .kernel_size(3, 3) |
| 1193 | .groups(2) |
| 1194 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1195 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 1196 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1197 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1198 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1199 | } |
| 1200 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1201 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1202 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 1203 | DeconvolutionOperatorTester() |
| 1204 | .has_bias(false) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1205 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 1206 | .padding(1) |
| 1207 | .kernel_size(3, 3) |
| 1208 | .groups(2) |
| 1209 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1210 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 1211 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1212 | .TestQU8(); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 1213 | } |
| 1214 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1215 | /**************************** CONV path, batched ****************************/ |
| 1216 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1217 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1218 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1219 | DeconvolutionOperatorTester() |
| 1220 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1221 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1222 | .padding(1) |
| 1223 | .kernel_size(3, 3) |
| 1224 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1225 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1226 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1227 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1228 | } |
| 1229 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1230 | TEST(DECONVOLUTION_NHWC_QU8, batched_Kx3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1231 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1232 | for (size_t kernel_height = 1; kernel_height <= 4; kernel_height *= 2) { |
| 1233 | DeconvolutionOperatorTester() |
| 1234 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1235 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1236 | .padding_width(1) |
| 1237 | .kernel_size(kernel_height, 3) |
| 1238 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1239 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1240 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1241 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1242 | } |
| 1243 | } |
| 1244 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1245 | TEST(DECONVOLUTION_NHWC_QU8, batched_3xK) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1246 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1247 | for (size_t kernel_width = 1; kernel_width <= 4; kernel_width *= 2) { |
| 1248 | DeconvolutionOperatorTester() |
| 1249 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1250 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1251 | .padding_height(1) |
| 1252 | .kernel_size(3, kernel_width) |
| 1253 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1254 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1255 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1256 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1257 | } |
| 1258 | } |
| 1259 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1260 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1261 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1262 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 1263 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 1264 | DeconvolutionOperatorTester() |
| 1265 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1266 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1267 | .padding_width(1) |
| 1268 | .padding_top(padding_top) |
| 1269 | .padding_bottom(padding_bottom) |
| 1270 | .kernel_size(3, 3) |
| 1271 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1272 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1273 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1274 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1275 | } |
| 1276 | } |
| 1277 | } |
| 1278 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1279 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1280 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1281 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 1282 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 1283 | DeconvolutionOperatorTester() |
| 1284 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1285 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1286 | .padding_height(1) |
| 1287 | .padding_left(padding_left) |
| 1288 | .padding_right(padding_right) |
| 1289 | .kernel_size(3, 3) |
| 1290 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1291 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1292 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1293 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1294 | } |
| 1295 | } |
| 1296 | } |
| 1297 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1298 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1299 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1300 | for (size_t adjustment_height = 1; adjustment_height <= 2; adjustment_height++) { |
| 1301 | DeconvolutionOperatorTester() |
| 1302 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1303 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1304 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 1305 | .stride_height(adjustment_height + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1306 | .adjustment_height(adjustment_height) |
| 1307 | .kernel_size(3, 3) |
| 1308 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1309 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1310 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1311 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1312 | } |
| 1313 | } |
| 1314 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1315 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1316 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1317 | for (size_t adjustment_width = 1; adjustment_width <= 2; adjustment_width++) { |
| 1318 | DeconvolutionOperatorTester() |
| 1319 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1320 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1321 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 1322 | .stride_width(adjustment_width + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1323 | .adjustment_width(adjustment_width) |
| 1324 | .kernel_size(3, 3) |
| 1325 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1326 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1327 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1328 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1329 | } |
| 1330 | } |
| 1331 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1332 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1333 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1334 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1335 | DeconvolutionOperatorTester() |
| 1336 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1337 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1338 | .padding(1) |
| 1339 | .kernel_size(3, 3) |
| 1340 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1341 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1342 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1343 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1344 | } |
| 1345 | } |
| 1346 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1347 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1348 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1349 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1350 | DeconvolutionOperatorTester() |
| 1351 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1352 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1353 | .padding(1) |
| 1354 | .kernel_size(3, 3) |
| 1355 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1356 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1357 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1358 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1359 | } |
| 1360 | } |
| 1361 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1362 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_varying_input_height_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1363 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 1364 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
| 1365 | DeconvolutionOperatorTester() |
| 1366 | .batch_size(2) |
| 1367 | .input_size(input_height, kUnstridedInputWidth) |
| 1368 | .padding_tf_same(true) |
| 1369 | .kernel_size(3, 3) |
| 1370 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1371 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1372 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1373 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1374 | } |
| 1375 | } |
| 1376 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1377 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_varying_input_width_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1378 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 1379 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
| 1380 | DeconvolutionOperatorTester() |
| 1381 | .batch_size(2) |
| 1382 | .input_size(kUnstridedInputHeight, input_width) |
| 1383 | .padding_tf_same(true) |
| 1384 | .kernel_size(3, 3) |
| 1385 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1386 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1387 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1388 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1389 | } |
| 1390 | } |
| 1391 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1392 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1393 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1394 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 1395 | DeconvolutionOperatorTester() |
| 1396 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1397 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1398 | .padding(1) |
| 1399 | .kernel_size(3, 3) |
| 1400 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1401 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1402 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1403 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1404 | } |
| 1405 | } |
| 1406 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1407 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1408 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1409 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1410 | DeconvolutionOperatorTester() |
| 1411 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1412 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1413 | .padding(1) |
| 1414 | .kernel_size(3, 3) |
| 1415 | .group_input_channels(23) |
| 1416 | .group_output_channels(output_channels) |
| 1417 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1418 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1419 | } |
| 1420 | } |
| 1421 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1422 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_with_height_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1423 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1424 | for (size_t dilation_height = 2; dilation_height <= 3; dilation_height++) { |
| 1425 | DeconvolutionOperatorTester() |
| 1426 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1427 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1428 | .padding(1) |
| 1429 | .kernel_size(3, 3) |
| 1430 | .dilation_height(dilation_height) |
| 1431 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1432 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1433 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1434 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1435 | } |
| 1436 | } |
| 1437 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1438 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_with_width_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1439 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1440 | for (size_t dilation_width = 2; dilation_width <= 3; dilation_width++) { |
| 1441 | DeconvolutionOperatorTester() |
| 1442 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1443 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1444 | .padding(1) |
| 1445 | .kernel_size(3, 3) |
| 1446 | .dilation_width(dilation_width) |
| 1447 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1448 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1449 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1450 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1451 | } |
| 1452 | } |
| 1453 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1454 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_with_height_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1455 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1456 | DeconvolutionOperatorTester() |
| 1457 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1458 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1459 | .padding(1) |
| 1460 | .kernel_size(3, 3) |
| 1461 | .dilation_height(3) |
| 1462 | .stride_height(2) |
| 1463 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1464 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1465 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1466 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1467 | } |
| 1468 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1469 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_with_width_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1470 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1471 | DeconvolutionOperatorTester() |
| 1472 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1473 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1474 | .padding(1) |
| 1475 | .kernel_size(3, 3) |
| 1476 | .dilation_width(3) |
| 1477 | .stride_width(2) |
| 1478 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1479 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1480 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1481 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1482 | } |
| 1483 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1484 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1485 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1486 | DeconvolutionOperatorTester() |
| 1487 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1488 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1489 | .padding(1) |
| 1490 | .kernel_size(3, 3) |
| 1491 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1492 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1493 | .input_pixel_stride(28) |
| 1494 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1495 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1496 | } |
| 1497 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1498 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1499 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1500 | DeconvolutionOperatorTester() |
| 1501 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1502 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1503 | .padding(1) |
| 1504 | .kernel_size(3, 3) |
| 1505 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1506 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
| 1507 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1508 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1509 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1510 | } |
| 1511 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1512 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1513 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1514 | DeconvolutionOperatorTester() |
| 1515 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1516 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1517 | .padding(1) |
| 1518 | .kernel_size(3, 3) |
| 1519 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1520 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1521 | .qmin(128) |
| 1522 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1523 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1524 | } |
| 1525 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1526 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1527 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1528 | DeconvolutionOperatorTester() |
| 1529 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1530 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1531 | .padding(1) |
| 1532 | .kernel_size(3, 3) |
| 1533 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1534 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 1535 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1536 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1537 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1538 | } |
| 1539 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1540 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1541 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 1542 | DeconvolutionOperatorTester() |
| 1543 | .has_bias(false) |
| 1544 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1545 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 1546 | .padding(1) |
| 1547 | .kernel_size(3, 3) |
| 1548 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1549 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 1550 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1551 | .TestQU8(); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 1552 | } |
| 1553 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1554 | /**************************** CONV path, grouped, batched ****************************/ |
| 1555 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1556 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1557 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1558 | DeconvolutionOperatorTester() |
| 1559 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1560 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1561 | .padding(1) |
| 1562 | .kernel_size(3, 3) |
| 1563 | .groups(2) |
| 1564 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1565 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1566 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1567 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1568 | } |
| 1569 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1570 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_Kx3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1571 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1572 | for (size_t kernel_height = 1; kernel_height <= 4; kernel_height *= 2) { |
| 1573 | DeconvolutionOperatorTester() |
| 1574 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1575 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1576 | .padding_width(1) |
| 1577 | .kernel_size(kernel_height, 3) |
| 1578 | .groups(2) |
| 1579 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1580 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1581 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1582 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1583 | } |
| 1584 | } |
| 1585 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1586 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3xK) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1587 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1588 | for (size_t kernel_width = 1; kernel_width <= 4; kernel_width *= 2) { |
| 1589 | DeconvolutionOperatorTester() |
| 1590 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1591 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1592 | .padding_height(1) |
| 1593 | .kernel_size(3, kernel_width) |
| 1594 | .groups(2) |
| 1595 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1596 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1597 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1598 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1599 | } |
| 1600 | } |
| 1601 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1602 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1603 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1604 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 1605 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 1606 | DeconvolutionOperatorTester() |
| 1607 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1608 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1609 | .padding_width(1) |
| 1610 | .padding_top(padding_top) |
| 1611 | .padding_bottom(padding_bottom) |
| 1612 | .kernel_size(3, 3) |
| 1613 | .groups(2) |
| 1614 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1615 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1616 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1617 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1618 | } |
| 1619 | } |
| 1620 | } |
| 1621 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1622 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1623 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1624 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 1625 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 1626 | DeconvolutionOperatorTester() |
| 1627 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1628 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1629 | .padding_height(1) |
| 1630 | .padding_left(padding_left) |
| 1631 | .padding_right(padding_right) |
| 1632 | .kernel_size(3, 3) |
| 1633 | .groups(2) |
| 1634 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1635 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1636 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1637 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1638 | } |
| 1639 | } |
| 1640 | } |
| 1641 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1642 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1643 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1644 | for (size_t adjustment_height = 1; adjustment_height <= 2; adjustment_height++) { |
| 1645 | DeconvolutionOperatorTester() |
| 1646 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1647 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1648 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 1649 | .stride_height(adjustment_height + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1650 | .adjustment_height(adjustment_height) |
| 1651 | .kernel_size(3, 3) |
| 1652 | .groups(2) |
| 1653 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1654 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1655 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1656 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1657 | } |
| 1658 | } |
| 1659 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1660 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1661 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1662 | for (size_t adjustment_width = 1; adjustment_width <= 2; adjustment_width++) { |
| 1663 | DeconvolutionOperatorTester() |
| 1664 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1665 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1666 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 1667 | .stride_width(adjustment_width + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1668 | .adjustment_width(adjustment_width) |
| 1669 | .kernel_size(3, 3) |
| 1670 | .groups(2) |
| 1671 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1672 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1673 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1674 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1675 | } |
| 1676 | } |
| 1677 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1678 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1679 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1680 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1681 | DeconvolutionOperatorTester() |
| 1682 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1683 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1684 | .padding(1) |
| 1685 | .kernel_size(3, 3) |
| 1686 | .groups(2) |
| 1687 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1688 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1689 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1690 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1691 | } |
| 1692 | } |
| 1693 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1694 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1695 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1696 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1697 | DeconvolutionOperatorTester() |
| 1698 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1699 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1700 | .padding(1) |
| 1701 | .kernel_size(3, 3) |
| 1702 | .groups(2) |
| 1703 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1704 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1705 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1706 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1707 | } |
| 1708 | } |
| 1709 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1710 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_varying_input_height_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1711 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 1712 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
| 1713 | DeconvolutionOperatorTester() |
| 1714 | .batch_size(2) |
| 1715 | .input_size(input_height, kUnstridedInputWidth) |
| 1716 | .padding_tf_same(true) |
| 1717 | .kernel_size(3, 3) |
| 1718 | .groups(2) |
| 1719 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1720 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1721 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1722 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1723 | } |
| 1724 | } |
| 1725 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1726 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_varying_input_width_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1727 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 1728 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
| 1729 | DeconvolutionOperatorTester() |
| 1730 | .batch_size(2) |
| 1731 | .input_size(kUnstridedInputHeight, input_width) |
| 1732 | .padding_tf_same(true) |
| 1733 | .kernel_size(3, 3) |
| 1734 | .groups(2) |
| 1735 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1736 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1737 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1738 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 1739 | } |
| 1740 | } |
| 1741 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1742 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1743 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1744 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 1745 | DeconvolutionOperatorTester() |
| 1746 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1747 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1748 | .padding(1) |
| 1749 | .kernel_size(3, 3) |
| 1750 | .groups(2) |
| 1751 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1752 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1753 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1754 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1755 | } |
| 1756 | } |
| 1757 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1758 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1759 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1760 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1761 | DeconvolutionOperatorTester() |
| 1762 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1763 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1764 | .padding(1) |
| 1765 | .kernel_size(3, 3) |
| 1766 | .groups(2) |
| 1767 | .group_input_channels(23) |
| 1768 | .group_output_channels(output_channels) |
| 1769 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1770 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1771 | } |
| 1772 | } |
| 1773 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1774 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_with_height_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1775 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1776 | for (size_t dilation_height = 2; dilation_height <= 3; dilation_height++) { |
| 1777 | DeconvolutionOperatorTester() |
| 1778 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1779 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1780 | .padding(1) |
| 1781 | .kernel_size(3, 3) |
| 1782 | .dilation_height(dilation_height) |
| 1783 | .groups(2) |
| 1784 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1785 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1786 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1787 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1788 | } |
| 1789 | } |
| 1790 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1791 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_with_width_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1792 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1793 | for (size_t dilation_width = 2; dilation_width <= 3; dilation_width++) { |
| 1794 | DeconvolutionOperatorTester() |
| 1795 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1796 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1797 | .padding(1) |
| 1798 | .kernel_size(3, 3) |
| 1799 | .dilation_width(dilation_width) |
| 1800 | .groups(2) |
| 1801 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1802 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1803 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1804 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1805 | } |
| 1806 | } |
| 1807 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1808 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_with_height_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1809 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1810 | DeconvolutionOperatorTester() |
| 1811 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1812 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1813 | .padding(1) |
| 1814 | .kernel_size(3, 3) |
| 1815 | .dilation_height(3) |
| 1816 | .stride_width(2) |
| 1817 | .groups(2) |
| 1818 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1819 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1820 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1821 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1822 | } |
| 1823 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1824 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_with_width_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1825 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1826 | DeconvolutionOperatorTester() |
| 1827 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1828 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1829 | .padding(1) |
| 1830 | .kernel_size(3, 3) |
| 1831 | .dilation_width(3) |
| 1832 | .stride_width(2) |
| 1833 | .groups(2) |
| 1834 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1835 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1836 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1837 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1838 | } |
| 1839 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1840 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1841 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1842 | DeconvolutionOperatorTester() |
| 1843 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1844 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1845 | .padding(1) |
| 1846 | .kernel_size(3, 3) |
| 1847 | .groups(2) |
| 1848 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1849 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1850 | .input_pixel_stride(47) |
| 1851 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1852 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1853 | } |
| 1854 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1855 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1856 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1857 | DeconvolutionOperatorTester() |
| 1858 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1859 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1860 | .padding(1) |
| 1861 | .kernel_size(3, 3) |
| 1862 | .groups(2) |
| 1863 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1864 | .group_output_channels(xnn_params.qu8.gemm.nr + 3) |
| 1865 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1866 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1867 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1868 | } |
| 1869 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1870 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1871 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1872 | DeconvolutionOperatorTester() |
| 1873 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1874 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1875 | .padding(1) |
| 1876 | .kernel_size(3, 3) |
| 1877 | .groups(2) |
| 1878 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1879 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1880 | .qmin(128) |
| 1881 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1882 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1883 | } |
| 1884 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1885 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1886 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1887 | DeconvolutionOperatorTester() |
| 1888 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1889 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1890 | .padding(1) |
| 1891 | .kernel_size(3, 3) |
| 1892 | .groups(2) |
| 1893 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1894 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 1895 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1896 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1897 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1898 | } |
| 1899 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1900 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1901 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 1902 | DeconvolutionOperatorTester() |
| 1903 | .has_bias(false) |
| 1904 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1905 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 1906 | .padding(1) |
| 1907 | .kernel_size(3, 3) |
| 1908 | .groups(2) |
| 1909 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1910 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 1911 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1912 | .TestQU8(); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 1913 | } |
| 1914 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1915 | /**************************** CONV path, setup ****************************/ |
| 1916 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1917 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_setup_changing_batch) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1918 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1919 | DeconvolutionOperatorTester() |
| 1920 | .batch_size(2) |
| 1921 | .next_batch_size(5) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1922 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1923 | .kernel_height(3) |
| 1924 | .kernel_width(5) |
| 1925 | .groups(2) |
| 1926 | .group_input_channels(15) |
| 1927 | .group_output_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1928 | .TestSetupQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1929 | } |
| 1930 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1931 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_setup_changing_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1932 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1933 | DeconvolutionOperatorTester() |
| 1934 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1935 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
| 1936 | .next_input_height(kUnstridedInputHeight + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1937 | .kernel_height(3) |
| 1938 | .kernel_width(5) |
| 1939 | .groups(2) |
| 1940 | .group_input_channels(15) |
| 1941 | .group_output_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1942 | .TestSetupQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1943 | } |
| 1944 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1945 | TEST(DECONVOLUTION_NHWC_QU8, 3x3_setup_changing_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1946 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1947 | DeconvolutionOperatorTester() |
| 1948 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1949 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
| 1950 | .next_input_width(kUnstridedInputWidth + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1951 | .kernel_height(3) |
| 1952 | .kernel_width(5) |
| 1953 | .groups(2) |
| 1954 | .group_input_channels(15) |
| 1955 | .group_output_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1956 | .TestSetupQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1957 | } |
| 1958 | |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 1959 | /**************************** SUBCONV2D/IGEMM path ****************************/ |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1960 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1961 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1962 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1963 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1964 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1965 | .padding(1) |
| 1966 | .kernel_size(3, 3) |
| 1967 | .stride(2) |
| 1968 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1969 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1970 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1971 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1972 | } |
| 1973 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1974 | TEST(DECONVOLUTION_NHWC_QU8, Kx3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1975 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1976 | for (size_t kernel_height = 2; kernel_height <= 5; kernel_height++) { |
| 1977 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1978 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1979 | .padding_width(1) |
| 1980 | .kernel_size(kernel_height, 3) |
| 1981 | .stride(2) |
| 1982 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1983 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1984 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1985 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1986 | } |
| 1987 | } |
| 1988 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1989 | TEST(DECONVOLUTION_NHWC_QU8, 3xKs2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 1990 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1991 | for (size_t kernel_width = 2; kernel_width <= 5; kernel_width++) { |
| 1992 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 1993 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1994 | .padding_height(1) |
| 1995 | .kernel_size(3, kernel_width) |
| 1996 | .stride(2) |
| 1997 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 1998 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 1999 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2000 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2001 | } |
| 2002 | } |
| 2003 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2004 | TEST(DECONVOLUTION_NHWC_QU8, 3x3sSx1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2005 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2006 | for (size_t stride_height = 2; stride_height <= 3; stride_height++) { |
| 2007 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2008 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2009 | .padding(1) |
| 2010 | .padding_width(1) |
| 2011 | .kernel_size(3, 3) |
| 2012 | .stride_height(stride_height) |
| 2013 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2014 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2015 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2016 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2017 | } |
| 2018 | } |
| 2019 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2020 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s1xS) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2021 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2022 | for (size_t stride_width = 2; stride_width <= 3; stride_width++) { |
| 2023 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2024 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2025 | .padding(1) |
| 2026 | .padding_width(1) |
| 2027 | .kernel_size(3, 3) |
| 2028 | .stride_width(stride_width) |
| 2029 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2030 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2031 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2032 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2033 | } |
| 2034 | } |
| 2035 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2036 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2037 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2038 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 2039 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 2040 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2041 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2042 | .padding_width(1) |
| 2043 | .padding_top(padding_top) |
| 2044 | .padding_bottom(padding_bottom) |
| 2045 | .kernel_size(3, 3) |
| 2046 | .stride(2) |
| 2047 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2048 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2049 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2050 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2051 | } |
| 2052 | } |
| 2053 | } |
| 2054 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2055 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2056 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2057 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 2058 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 2059 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2060 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2061 | .padding_height(1) |
| 2062 | .padding_left(padding_left) |
| 2063 | .padding_right(padding_right) |
| 2064 | .kernel_size(3, 3) |
| 2065 | .stride(2) |
| 2066 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2067 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2068 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2069 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2070 | } |
| 2071 | } |
| 2072 | } |
| 2073 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2074 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2075 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 2076 | for (size_t adjustment_height = 0; adjustment_height <= 1; adjustment_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2077 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2078 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2079 | .padding(1) |
| 2080 | .adjustment_height(adjustment_height) |
| 2081 | .kernel_size(3, 3) |
| 2082 | .stride(2) |
| 2083 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2084 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2085 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2086 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2087 | } |
| 2088 | } |
| 2089 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2090 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2091 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 2092 | for (size_t adjustment_width = 0; adjustment_width <= 1; adjustment_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2093 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2094 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2095 | .padding(1) |
| 2096 | .adjustment_width(adjustment_width) |
| 2097 | .kernel_size(3, 3) |
| 2098 | .stride(2) |
| 2099 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2100 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2101 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2102 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2103 | } |
| 2104 | } |
| 2105 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2106 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2107 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2108 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2109 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2110 | .input_size(input_height, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2111 | .padding(1) |
| 2112 | .kernel_size(3, 3) |
| 2113 | .stride(2) |
| 2114 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2115 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2116 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2117 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2118 | } |
| 2119 | } |
| 2120 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2121 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2122 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2123 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2124 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2125 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2126 | .padding(1) |
| 2127 | .kernel_size(3, 3) |
| 2128 | .stride(2) |
| 2129 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2130 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2131 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2132 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2133 | } |
| 2134 | } |
| 2135 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2136 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_varying_input_height_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2137 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 2138 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 2139 | DeconvolutionOperatorTester() |
| 2140 | .input_size(input_height, kStridedInputWidth) |
| 2141 | .padding_tf_same(true) |
| 2142 | .kernel_size(3, 3) |
| 2143 | .stride(2) |
| 2144 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2145 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2146 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2147 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2148 | } |
| 2149 | } |
| 2150 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2151 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_varying_input_width_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2152 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 2153 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 2154 | DeconvolutionOperatorTester() |
| 2155 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 2156 | .padding_tf_same(true) |
| 2157 | .kernel_size(3, 3) |
| 2158 | .stride(2) |
| 2159 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2160 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2161 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2162 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2163 | } |
| 2164 | } |
| 2165 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2166 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2167 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2168 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 2169 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2170 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2171 | .padding(1) |
| 2172 | .kernel_size(3, 3) |
| 2173 | .stride(2) |
| 2174 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2175 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2176 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2177 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2178 | } |
| 2179 | } |
| 2180 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2181 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2182 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2183 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2184 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2185 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2186 | .padding(1) |
| 2187 | .kernel_size(3, 3) |
| 2188 | .stride(2) |
| 2189 | .group_input_channels(23) |
| 2190 | .group_output_channels(output_channels) |
| 2191 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2192 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2193 | } |
| 2194 | } |
| 2195 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2196 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2197 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2198 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2199 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2200 | .padding(1) |
| 2201 | .kernel_size(3, 3) |
| 2202 | .stride(2) |
| 2203 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2204 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2205 | .input_pixel_stride(28) |
| 2206 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2207 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2208 | } |
| 2209 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2210 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2211 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2212 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2213 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2214 | .padding(1) |
| 2215 | .kernel_size(3, 3) |
| 2216 | .stride(2) |
| 2217 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2218 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
| 2219 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2220 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2221 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2222 | } |
| 2223 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2224 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2225 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2226 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2227 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2228 | .padding(1) |
| 2229 | .kernel_size(3, 3) |
| 2230 | .stride(2) |
| 2231 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2232 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2233 | .qmin(128) |
| 2234 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2235 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2236 | } |
| 2237 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2238 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2239 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2240 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2241 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2242 | .padding(1) |
| 2243 | .kernel_size(3, 3) |
| 2244 | .stride(2) |
| 2245 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2246 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 2247 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2248 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2249 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2250 | } |
| 2251 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2252 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2253 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 2254 | DeconvolutionOperatorTester() |
| 2255 | .has_bias(false) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2256 | .input_size(kStridedInputHeight, kStridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 2257 | .padding(1) |
| 2258 | .kernel_size(3, 3) |
| 2259 | .stride(2) |
| 2260 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2261 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 2262 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2263 | .TestQU8(); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 2264 | } |
| 2265 | |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 2266 | /**************************** SUBCONV2D/IGEMM path, grouped ****************************/ |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2267 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2268 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2269 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2270 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2271 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2272 | .padding(1) |
| 2273 | .kernel_size(3, 3) |
| 2274 | .stride(2) |
| 2275 | .groups(2) |
| 2276 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2277 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2278 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2279 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2280 | } |
| 2281 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2282 | TEST(DECONVOLUTION_NHWC_QU8, grouped_Kx3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2283 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2284 | for (size_t kernel_height = 2; kernel_height <= 5; kernel_height++) { |
| 2285 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2286 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2287 | .padding_width(1) |
| 2288 | .kernel_size(kernel_height, 3) |
| 2289 | .stride(2) |
| 2290 | .groups(2) |
| 2291 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2292 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2293 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2294 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2295 | } |
| 2296 | } |
| 2297 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2298 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3xKs2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2299 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2300 | for (size_t kernel_width = 2; kernel_width <= 5; kernel_width++) { |
| 2301 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2302 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2303 | .padding_height(1) |
| 2304 | .kernel_size(3, kernel_width) |
| 2305 | .stride(2) |
| 2306 | .groups(2) |
| 2307 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2308 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2309 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2310 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2311 | } |
| 2312 | } |
| 2313 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2314 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3sSx1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2315 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2316 | for (size_t stride_height = 2; stride_height <= 3; stride_height++) { |
| 2317 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2318 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2319 | .padding(1) |
| 2320 | .padding_width(1) |
| 2321 | .kernel_size(3, 3) |
| 2322 | .stride_height(stride_height) |
| 2323 | .groups(2) |
| 2324 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2325 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2326 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2327 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2328 | } |
| 2329 | } |
| 2330 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2331 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s1xS) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2332 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2333 | for (size_t stride_width = 2; stride_width <= 3; stride_width++) { |
| 2334 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2335 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2336 | .padding(1) |
| 2337 | .padding_width(1) |
| 2338 | .kernel_size(3, 3) |
| 2339 | .stride_width(stride_width) |
| 2340 | .groups(2) |
| 2341 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2342 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2343 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2344 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2345 | } |
| 2346 | } |
| 2347 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2348 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2349 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2350 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 2351 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 2352 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2353 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2354 | .padding_width(1) |
| 2355 | .padding_top(padding_top) |
| 2356 | .padding_bottom(padding_bottom) |
| 2357 | .kernel_size(3, 3) |
| 2358 | .stride(2) |
| 2359 | .groups(2) |
| 2360 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2361 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2362 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2363 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2364 | } |
| 2365 | } |
| 2366 | } |
| 2367 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2368 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2369 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2370 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 2371 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 2372 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2373 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2374 | .padding_height(1) |
| 2375 | .padding_left(padding_left) |
| 2376 | .padding_right(padding_right) |
| 2377 | .kernel_size(3, 3) |
| 2378 | .stride(2) |
| 2379 | .groups(2) |
| 2380 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2381 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2382 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2383 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2384 | } |
| 2385 | } |
| 2386 | } |
| 2387 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2388 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2389 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 2390 | for (size_t adjustment_height = 0; adjustment_height <= 1; adjustment_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2391 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2392 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2393 | .padding(1) |
| 2394 | .adjustment_height(adjustment_height) |
| 2395 | .kernel_size(3, 3) |
| 2396 | .stride(2) |
| 2397 | .groups(2) |
| 2398 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2399 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2400 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2401 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2402 | } |
| 2403 | } |
| 2404 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2405 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2406 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 2407 | for (size_t adjustment_width = 0; adjustment_width <= 1; adjustment_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2408 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2409 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2410 | .padding(1) |
| 2411 | .adjustment_width(adjustment_width) |
| 2412 | .kernel_size(3, 3) |
| 2413 | .stride(2) |
| 2414 | .groups(2) |
| 2415 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2416 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2417 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2418 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2419 | } |
| 2420 | } |
| 2421 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2422 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2423 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2424 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2425 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2426 | .input_size(input_height, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2427 | .padding(1) |
| 2428 | .kernel_size(3, 3) |
| 2429 | .stride(2) |
| 2430 | .groups(2) |
| 2431 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2432 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2433 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2434 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2435 | } |
| 2436 | } |
| 2437 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2438 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2439 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2440 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2441 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2442 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2443 | .padding(1) |
| 2444 | .kernel_size(3, 3) |
| 2445 | .stride(2) |
| 2446 | .groups(2) |
| 2447 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2448 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2449 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2450 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2451 | } |
| 2452 | } |
| 2453 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2454 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_varying_input_height_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2455 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 2456 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 2457 | DeconvolutionOperatorTester() |
| 2458 | .input_size(input_height, kStridedInputWidth) |
| 2459 | .padding_tf_same(true) |
| 2460 | .kernel_size(3, 3) |
| 2461 | .stride(2) |
| 2462 | .groups(2) |
| 2463 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2464 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2465 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2466 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2467 | } |
| 2468 | } |
| 2469 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2470 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_varying_input_width_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2471 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 2472 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 2473 | DeconvolutionOperatorTester() |
| 2474 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 2475 | .padding_tf_same(true) |
| 2476 | .kernel_size(3, 3) |
| 2477 | .stride(2) |
| 2478 | .groups(2) |
| 2479 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2480 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2481 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2482 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2483 | } |
| 2484 | } |
| 2485 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2486 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2487 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2488 | for (size_t input_channels = 14; input_channels <= 20; input_channels++) { |
| 2489 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2490 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2491 | .padding(1) |
| 2492 | .kernel_size(3, 3) |
| 2493 | .stride(2) |
| 2494 | .groups(2) |
| 2495 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2496 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2497 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2498 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2499 | } |
| 2500 | } |
| 2501 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2502 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2503 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2504 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2505 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2506 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2507 | .padding(1) |
| 2508 | .kernel_size(3, 3) |
| 2509 | .stride(2) |
| 2510 | .groups(2) |
| 2511 | .group_input_channels(17) |
| 2512 | .group_output_channels(output_channels) |
| 2513 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2514 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2515 | } |
| 2516 | } |
| 2517 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2518 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2519 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2520 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2521 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2522 | .padding(1) |
| 2523 | .kernel_size(3, 3) |
| 2524 | .stride(2) |
| 2525 | .groups(2) |
| 2526 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2527 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2528 | .input_pixel_stride(37) |
| 2529 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2530 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2531 | } |
| 2532 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2533 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2534 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2535 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2536 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2537 | .padding(1) |
| 2538 | .kernel_size(3, 3) |
| 2539 | .stride(2) |
| 2540 | .groups(2) |
| 2541 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2542 | .group_output_channels(xnn_params.qu8.gemm.nr + 3) |
| 2543 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2544 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2545 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2546 | } |
| 2547 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2548 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2549 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2550 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2551 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2552 | .padding(1) |
| 2553 | .kernel_size(3, 3) |
| 2554 | .stride(2) |
| 2555 | .groups(2) |
| 2556 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2557 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2558 | .qmin(128) |
| 2559 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2560 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2561 | } |
| 2562 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2563 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2564 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2565 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2566 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2567 | .padding(1) |
| 2568 | .kernel_size(3, 3) |
| 2569 | .stride(2) |
| 2570 | .groups(2) |
| 2571 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2572 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 2573 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2574 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2575 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2576 | } |
| 2577 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2578 | TEST(DECONVOLUTION_NHWC_QU8, grouped_3x3s2_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2579 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 2580 | DeconvolutionOperatorTester() |
| 2581 | .has_bias(false) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2582 | .input_size(kStridedInputHeight, kStridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 2583 | .padding(1) |
| 2584 | .kernel_size(3, 3) |
| 2585 | .stride(2) |
| 2586 | .groups(2) |
| 2587 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2588 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 2589 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2590 | .TestQU8(); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 2591 | } |
| 2592 | |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 2593 | /**************************** SUBCONV2D/IGEMM path, batched ****************************/ |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2594 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2595 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2596 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2597 | DeconvolutionOperatorTester() |
| 2598 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2599 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2600 | .padding(1) |
| 2601 | .kernel_size(3, 3) |
| 2602 | .stride(2) |
| 2603 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2604 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2605 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2606 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2607 | } |
| 2608 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2609 | TEST(DECONVOLUTION_NHWC_QU8, batched_Kx3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2610 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2611 | for (size_t kernel_height = 2; kernel_height <= 5; kernel_height++) { |
| 2612 | DeconvolutionOperatorTester() |
| 2613 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2614 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2615 | .padding_width(1) |
| 2616 | .kernel_size(kernel_height, 3) |
| 2617 | .stride(2) |
| 2618 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2619 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2620 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2621 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2622 | } |
| 2623 | } |
| 2624 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2625 | TEST(DECONVOLUTION_NHWC_QU8, batched_3xKs2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2626 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2627 | for (size_t kernel_width = 2; kernel_width <= 5; kernel_width++) { |
| 2628 | DeconvolutionOperatorTester() |
| 2629 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2630 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2631 | .padding_height(1) |
| 2632 | .kernel_size(3, kernel_width) |
| 2633 | .stride(2) |
| 2634 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2635 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2636 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2637 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2638 | } |
| 2639 | } |
| 2640 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2641 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3sSx1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2642 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2643 | for (size_t stride_height = 2; stride_height <= 3; stride_height++) { |
| 2644 | DeconvolutionOperatorTester() |
| 2645 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2646 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2647 | .padding(1) |
| 2648 | .padding_width(1) |
| 2649 | .kernel_size(3, 3) |
| 2650 | .stride_height(stride_height) |
| 2651 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2652 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2653 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2654 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2655 | } |
| 2656 | } |
| 2657 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2658 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s1xS) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2659 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2660 | for (size_t stride_width = 2; stride_width <= 3; stride_width++) { |
| 2661 | DeconvolutionOperatorTester() |
| 2662 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2663 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2664 | .padding(1) |
| 2665 | .padding_width(1) |
| 2666 | .kernel_size(3, 3) |
| 2667 | .stride_width(stride_width) |
| 2668 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2669 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2670 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2671 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2672 | } |
| 2673 | } |
| 2674 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2675 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2676 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2677 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 2678 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 2679 | DeconvolutionOperatorTester() |
| 2680 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2681 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2682 | .padding_width(1) |
| 2683 | .padding_top(padding_top) |
| 2684 | .padding_bottom(padding_bottom) |
| 2685 | .kernel_size(3, 3) |
| 2686 | .stride(2) |
| 2687 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2688 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2689 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2690 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2691 | } |
| 2692 | } |
| 2693 | } |
| 2694 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2695 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2696 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2697 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 2698 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 2699 | DeconvolutionOperatorTester() |
| 2700 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2701 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2702 | .padding_height(1) |
| 2703 | .padding_left(padding_left) |
| 2704 | .padding_right(padding_right) |
| 2705 | .kernel_size(3, 3) |
| 2706 | .stride(2) |
| 2707 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2708 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2709 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2710 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2711 | } |
| 2712 | } |
| 2713 | } |
| 2714 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2715 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2716 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 2717 | for (size_t adjustment_height = 0; adjustment_height <= 1; adjustment_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2718 | DeconvolutionOperatorTester() |
| 2719 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2720 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2721 | .padding(1) |
| 2722 | .adjustment_height(adjustment_height) |
| 2723 | .kernel_size(3, 3) |
| 2724 | .stride(2) |
| 2725 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2726 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2727 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2728 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2729 | } |
| 2730 | } |
| 2731 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2732 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2733 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 2734 | for (size_t adjustment_width = 0; adjustment_width <= 1; adjustment_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2735 | DeconvolutionOperatorTester() |
| 2736 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2737 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2738 | .padding(1) |
| 2739 | .adjustment_width(adjustment_width) |
| 2740 | .kernel_size(3, 3) |
| 2741 | .stride(2) |
| 2742 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2743 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2744 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2745 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2746 | } |
| 2747 | } |
| 2748 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2749 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2750 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2751 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2752 | DeconvolutionOperatorTester() |
| 2753 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2754 | .input_size(input_height, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2755 | .padding(1) |
| 2756 | .kernel_size(3, 3) |
| 2757 | .stride(2) |
| 2758 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2759 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2760 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2761 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2762 | } |
| 2763 | } |
| 2764 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2765 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2766 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2767 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2768 | DeconvolutionOperatorTester() |
| 2769 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2770 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2771 | .padding(1) |
| 2772 | .kernel_size(3, 3) |
| 2773 | .stride(2) |
| 2774 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2775 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2776 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2777 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2778 | } |
| 2779 | } |
| 2780 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2781 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_varying_input_height_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2782 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 2783 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 2784 | DeconvolutionOperatorTester() |
| 2785 | .batch_size(2) |
| 2786 | .input_size(input_height, kStridedInputWidth) |
| 2787 | .padding_tf_same(true) |
| 2788 | .kernel_size(3, 3) |
| 2789 | .stride(2) |
| 2790 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2791 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2792 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2793 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2794 | } |
| 2795 | } |
| 2796 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2797 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_varying_input_width_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2798 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 2799 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 2800 | DeconvolutionOperatorTester() |
| 2801 | .batch_size(2) |
| 2802 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 2803 | .padding_tf_same(true) |
| 2804 | .kernel_size(3, 3) |
| 2805 | .stride(2) |
| 2806 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2807 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2808 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2809 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 2810 | } |
| 2811 | } |
| 2812 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2813 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2814 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2815 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 2816 | DeconvolutionOperatorTester() |
| 2817 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2818 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2819 | .padding(1) |
| 2820 | .kernel_size(3, 3) |
| 2821 | .stride(2) |
| 2822 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2823 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2824 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2825 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2826 | } |
| 2827 | } |
| 2828 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2829 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2830 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2831 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2832 | DeconvolutionOperatorTester() |
| 2833 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2834 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2835 | .padding(1) |
| 2836 | .kernel_size(3, 3) |
| 2837 | .stride(2) |
| 2838 | .group_input_channels(23) |
| 2839 | .group_output_channels(output_channels) |
| 2840 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2841 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2842 | } |
| 2843 | } |
| 2844 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2845 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2846 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2847 | DeconvolutionOperatorTester() |
| 2848 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2849 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2850 | .padding(1) |
| 2851 | .kernel_size(3, 3) |
| 2852 | .stride(2) |
| 2853 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2854 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2855 | .input_pixel_stride(28) |
| 2856 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2857 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2858 | } |
| 2859 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2860 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2861 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2862 | DeconvolutionOperatorTester() |
| 2863 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2864 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2865 | .padding(1) |
| 2866 | .kernel_size(3, 3) |
| 2867 | .stride(2) |
| 2868 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2869 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
| 2870 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2871 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2872 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2873 | } |
| 2874 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2875 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2876 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2877 | DeconvolutionOperatorTester() |
| 2878 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2879 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2880 | .padding(1) |
| 2881 | .kernel_size(3, 3) |
| 2882 | .stride(2) |
| 2883 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2884 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2885 | .qmin(128) |
| 2886 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2887 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2888 | } |
| 2889 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2890 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2891 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2892 | DeconvolutionOperatorTester() |
| 2893 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2894 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2895 | .padding(1) |
| 2896 | .kernel_size(3, 3) |
| 2897 | .stride(2) |
| 2898 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2899 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 2900 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2901 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2902 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2903 | } |
| 2904 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2905 | TEST(DECONVOLUTION_NHWC_QU8, batched_3x3s2_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2906 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 2907 | DeconvolutionOperatorTester() |
| 2908 | .has_bias(false) |
| 2909 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2910 | .input_size(kStridedInputHeight, kStridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 2911 | .padding(1) |
| 2912 | .kernel_size(3, 3) |
| 2913 | .stride(2) |
| 2914 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2915 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 2916 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2917 | .TestQU8(); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 2918 | } |
| 2919 | |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 2920 | /**************************** SUBCONV2D/IGEMM path, grouped, batched ****************************/ |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2921 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2922 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2923 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2924 | DeconvolutionOperatorTester() |
| 2925 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2926 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2927 | .padding(1) |
| 2928 | .kernel_size(3, 3) |
| 2929 | .stride(2) |
| 2930 | .groups(2) |
| 2931 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2932 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2933 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2934 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2935 | } |
| 2936 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2937 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_Kx3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2938 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2939 | for (size_t kernel_height = 2; kernel_height <= 5; kernel_height++) { |
| 2940 | DeconvolutionOperatorTester() |
| 2941 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2942 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2943 | .padding_width(1) |
| 2944 | .kernel_size(kernel_height, 3) |
| 2945 | .stride(2) |
| 2946 | .groups(2) |
| 2947 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2948 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2949 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2950 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2951 | } |
| 2952 | } |
| 2953 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2954 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3xKs2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2955 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2956 | for (size_t kernel_width = 2; kernel_width <= 5; kernel_width++) { |
| 2957 | DeconvolutionOperatorTester() |
| 2958 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2959 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2960 | .padding_height(1) |
| 2961 | .kernel_size(3, kernel_width) |
| 2962 | .stride(2) |
| 2963 | .groups(2) |
| 2964 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2965 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2966 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2967 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2968 | } |
| 2969 | } |
| 2970 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2971 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3sSx1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2972 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2973 | for (size_t stride_height = 2; stride_height <= 3; stride_height++) { |
| 2974 | DeconvolutionOperatorTester() |
| 2975 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2976 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2977 | .padding(1) |
| 2978 | .padding_width(1) |
| 2979 | .kernel_size(3, 3) |
| 2980 | .stride_height(stride_height) |
| 2981 | .groups(2) |
| 2982 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2983 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2984 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2985 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2986 | } |
| 2987 | } |
| 2988 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 2989 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s1xS) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 2990 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2991 | for (size_t stride_width = 2; stride_width <= 3; stride_width++) { |
| 2992 | DeconvolutionOperatorTester() |
| 2993 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 2994 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 2995 | .padding(1) |
| 2996 | .padding_width(1) |
| 2997 | .kernel_size(3, 3) |
| 2998 | .stride_width(stride_width) |
| 2999 | .groups(2) |
| 3000 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3001 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3002 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3003 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3004 | } |
| 3005 | } |
| 3006 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3007 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3008 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3009 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 3010 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 3011 | DeconvolutionOperatorTester() |
| 3012 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3013 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3014 | .padding_width(1) |
| 3015 | .padding_top(padding_top) |
| 3016 | .padding_bottom(padding_bottom) |
| 3017 | .kernel_size(3, 3) |
| 3018 | .stride(2) |
| 3019 | .groups(2) |
| 3020 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3021 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3022 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3023 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3024 | } |
| 3025 | } |
| 3026 | } |
| 3027 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3028 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3029 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3030 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 3031 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 3032 | DeconvolutionOperatorTester() |
| 3033 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3034 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3035 | .padding_height(1) |
| 3036 | .padding_left(padding_left) |
| 3037 | .padding_right(padding_right) |
| 3038 | .kernel_size(3, 3) |
| 3039 | .stride(2) |
| 3040 | .groups(2) |
| 3041 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3042 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3043 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3044 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3045 | } |
| 3046 | } |
| 3047 | } |
| 3048 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3049 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3050 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 3051 | for (size_t adjustment_height = 0; adjustment_height <= 1; adjustment_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3052 | DeconvolutionOperatorTester() |
| 3053 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3054 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3055 | .padding(1) |
| 3056 | .adjustment_height(adjustment_height) |
| 3057 | .kernel_size(3, 3) |
| 3058 | .stride(2) |
| 3059 | .groups(2) |
| 3060 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3061 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3062 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3063 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3064 | } |
| 3065 | } |
| 3066 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3067 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3068 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 3069 | for (size_t adjustment_width = 0; adjustment_width <= 1; adjustment_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3070 | DeconvolutionOperatorTester() |
| 3071 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3072 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3073 | .padding(1) |
| 3074 | .adjustment_width(adjustment_width) |
| 3075 | .kernel_size(3, 3) |
| 3076 | .stride(2) |
| 3077 | .groups(2) |
| 3078 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3079 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3080 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3081 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3082 | } |
| 3083 | } |
| 3084 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3085 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3086 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3087 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3088 | DeconvolutionOperatorTester() |
| 3089 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3090 | .input_size(input_height, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3091 | .padding(1) |
| 3092 | .kernel_size(3, 3) |
| 3093 | .stride(2) |
| 3094 | .groups(2) |
| 3095 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3096 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3097 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3098 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3099 | } |
| 3100 | } |
| 3101 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3102 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3103 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3104 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3105 | DeconvolutionOperatorTester() |
| 3106 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3107 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3108 | .padding(1) |
| 3109 | .kernel_size(3, 3) |
| 3110 | .stride(2) |
| 3111 | .groups(2) |
| 3112 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3113 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3114 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3115 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3116 | } |
| 3117 | } |
| 3118 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3119 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_varying_input_height_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 3120 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3121 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 3122 | DeconvolutionOperatorTester() |
| 3123 | .batch_size(2) |
| 3124 | .input_size(input_height, kStridedInputWidth) |
| 3125 | .padding_tf_same(true) |
| 3126 | .kernel_size(3, 3) |
| 3127 | .stride(2) |
| 3128 | .groups(2) |
| 3129 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3130 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 3131 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3132 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 3133 | } |
| 3134 | } |
| 3135 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3136 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_varying_input_width_with_tf_same_padding) { |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 3137 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3138 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 3139 | DeconvolutionOperatorTester() |
| 3140 | .batch_size(2) |
| 3141 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3142 | .padding_tf_same(true) |
| 3143 | .kernel_size(3, 3) |
| 3144 | .stride(2) |
| 3145 | .groups(2) |
| 3146 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3147 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 3148 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3149 | .TestQU8(); |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 3150 | } |
| 3151 | } |
| 3152 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3153 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3154 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3155 | for (size_t input_channels = 14; input_channels <= 20; input_channels++) { |
| 3156 | DeconvolutionOperatorTester() |
| 3157 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3158 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3159 | .padding(1) |
| 3160 | .kernel_size(3, 3) |
| 3161 | .stride(2) |
| 3162 | .groups(2) |
| 3163 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3164 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3165 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3166 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3167 | } |
| 3168 | } |
| 3169 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3170 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3171 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3172 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3173 | DeconvolutionOperatorTester() |
| 3174 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3175 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3176 | .padding(1) |
| 3177 | .kernel_size(3, 3) |
| 3178 | .stride(2) |
| 3179 | .groups(2) |
| 3180 | .group_input_channels(17) |
| 3181 | .group_output_channels(output_channels) |
| 3182 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3183 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3184 | } |
| 3185 | } |
| 3186 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3187 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3188 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3189 | DeconvolutionOperatorTester() |
| 3190 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3191 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3192 | .padding(1) |
| 3193 | .kernel_size(3, 3) |
| 3194 | .stride(2) |
| 3195 | .groups(2) |
| 3196 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3197 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3198 | .input_pixel_stride(37) |
| 3199 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3200 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3201 | } |
| 3202 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3203 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3204 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3205 | DeconvolutionOperatorTester() |
| 3206 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3207 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3208 | .padding(1) |
| 3209 | .kernel_size(3, 3) |
| 3210 | .stride(2) |
| 3211 | .groups(2) |
| 3212 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3213 | .group_output_channels(xnn_params.qu8.gemm.nr + 3) |
| 3214 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3215 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3216 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3217 | } |
| 3218 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3219 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3220 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3221 | DeconvolutionOperatorTester() |
| 3222 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3223 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3224 | .padding(1) |
| 3225 | .kernel_size(3, 3) |
| 3226 | .stride(2) |
| 3227 | .groups(2) |
| 3228 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3229 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3230 | .qmin(128) |
| 3231 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3232 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3233 | } |
| 3234 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3235 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3236 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3237 | DeconvolutionOperatorTester() |
| 3238 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3239 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3240 | .padding(1) |
| 3241 | .kernel_size(3, 3) |
| 3242 | .stride(2) |
| 3243 | .groups(2) |
| 3244 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3245 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 3246 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3247 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3248 | .TestQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3249 | } |
| 3250 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3251 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_3x3s2_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3252 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 3253 | DeconvolutionOperatorTester() |
| 3254 | .has_bias(false) |
| 3255 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3256 | .input_size(kStridedInputHeight, kStridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 3257 | .padding(1) |
| 3258 | .kernel_size(3, 3) |
| 3259 | .stride(2) |
| 3260 | .groups(2) |
| 3261 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3262 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 3263 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3264 | .TestQU8(); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 3265 | } |
| 3266 | |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3267 | /**************************** SUBCONV2D/IGEMM path, setup ****************************/ |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3268 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3269 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_setup_changing_batch) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3270 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3271 | DeconvolutionOperatorTester() |
| 3272 | .batch_size(2) |
| 3273 | .next_batch_size(5) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3274 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3275 | .kernel_height(3) |
| 3276 | .kernel_width(5) |
| 3277 | .stride(2) |
| 3278 | .groups(2) |
| 3279 | .group_input_channels(15) |
| 3280 | .group_output_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3281 | .TestSetupQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3282 | } |
| 3283 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3284 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_setup_changing_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3285 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3286 | DeconvolutionOperatorTester() |
| 3287 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3288 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3289 | .next_input_height(kStridedInputHeight + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3290 | .kernel_height(3) |
| 3291 | .kernel_width(5) |
| 3292 | .stride(2) |
| 3293 | .groups(2) |
| 3294 | .group_input_channels(15) |
| 3295 | .group_output_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3296 | .TestSetupQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3297 | } |
| 3298 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3299 | TEST(DECONVOLUTION_NHWC_QU8, 3x3s2_setup_changing_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 3300 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3301 | DeconvolutionOperatorTester() |
| 3302 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 3303 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3304 | .next_input_width(kStridedInputWidth + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3305 | .kernel_height(3) |
| 3306 | .kernel_width(5) |
| 3307 | .stride(2) |
| 3308 | .groups(2) |
| 3309 | .group_input_channels(15) |
| 3310 | .group_output_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3311 | .TestSetupQU8(); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 3312 | } |
| 3313 | |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3314 | /**************************** SUBCONV2D/GEMM path ****************************/ |
| 3315 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3316 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3317 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3318 | DeconvolutionOperatorTester() |
| 3319 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3320 | .kernel_size(2, 2) |
| 3321 | .stride(2) |
| 3322 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3323 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3324 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3325 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3326 | } |
| 3327 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3328 | TEST(DECONVOLUTION_NHWC_QU8, Kx2sKx2) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3329 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3330 | for (size_t kernel_height = 3; kernel_height <= 5; kernel_height++) { |
| 3331 | DeconvolutionOperatorTester() |
| 3332 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3333 | .kernel_size(kernel_height, 2) |
| 3334 | .stride(kernel_height, 2) |
| 3335 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3336 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3337 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3338 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3339 | } |
| 3340 | } |
| 3341 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3342 | TEST(DECONVOLUTION_NHWC_QU8, 2xKs2xK) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3343 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3344 | for (size_t kernel_width = 3; kernel_width <= 5; kernel_width++) { |
| 3345 | DeconvolutionOperatorTester() |
| 3346 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3347 | .kernel_size(2, kernel_width) |
| 3348 | .stride(2, kernel_width) |
| 3349 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3350 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3351 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3352 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3353 | } |
| 3354 | } |
| 3355 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3356 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2_height_adjustment) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3357 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3358 | DeconvolutionOperatorTester() |
| 3359 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3360 | .adjustment_height(1) |
| 3361 | .kernel_size(2, 2) |
| 3362 | .stride(2) |
| 3363 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3364 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3365 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3366 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3367 | } |
| 3368 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3369 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2_width_adjustment) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3370 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3371 | DeconvolutionOperatorTester() |
| 3372 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3373 | .adjustment_width(1) |
| 3374 | .kernel_size(2, 2) |
| 3375 | .stride(2) |
| 3376 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3377 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3378 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3379 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3380 | } |
| 3381 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3382 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2_varying_input_height) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3383 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3384 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 3385 | DeconvolutionOperatorTester() |
| 3386 | .input_size(input_height, kStridedInputWidth) |
| 3387 | .kernel_size(2, 2) |
| 3388 | .stride(2) |
| 3389 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3390 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3391 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3392 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3393 | } |
| 3394 | } |
| 3395 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3396 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2_varying_input_width) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3397 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3398 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 3399 | DeconvolutionOperatorTester() |
| 3400 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3401 | .kernel_size(2, 2) |
| 3402 | .stride(2) |
| 3403 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3404 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3405 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3406 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3407 | } |
| 3408 | } |
| 3409 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3410 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2_varying_input_channels) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3411 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3412 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 3413 | DeconvolutionOperatorTester() |
| 3414 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3415 | .kernel_size(2, 2) |
| 3416 | .stride(2) |
| 3417 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3418 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3419 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3420 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3421 | } |
| 3422 | } |
| 3423 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3424 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2_varying_output_channels) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3425 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3426 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3427 | DeconvolutionOperatorTester() |
| 3428 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3429 | .kernel_size(2, 2) |
| 3430 | .stride(2) |
| 3431 | .group_input_channels(23) |
| 3432 | .group_output_channels(output_channels) |
| 3433 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3434 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3435 | } |
| 3436 | } |
| 3437 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3438 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2_with_input_stride) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3439 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3440 | DeconvolutionOperatorTester() |
| 3441 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3442 | .kernel_size(2, 2) |
| 3443 | .stride(2) |
| 3444 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3445 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3446 | .input_pixel_stride(28) |
| 3447 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3448 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3449 | } |
| 3450 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3451 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2_with_output_stride) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3452 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3453 | DeconvolutionOperatorTester() |
| 3454 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3455 | .kernel_size(2, 2) |
| 3456 | .stride(2) |
| 3457 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3458 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
| 3459 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3460 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3461 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3462 | } |
| 3463 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3464 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2_with_qmin) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3465 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3466 | DeconvolutionOperatorTester() |
| 3467 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3468 | .kernel_size(2, 2) |
| 3469 | .stride(2) |
| 3470 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3471 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3472 | .qmin(128) |
| 3473 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3474 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3475 | } |
| 3476 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3477 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2_with_qmax) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3478 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3479 | DeconvolutionOperatorTester() |
| 3480 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3481 | .kernel_size(2, 2) |
| 3482 | .stride(2) |
| 3483 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3484 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3485 | .qmax(128) |
| 3486 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3487 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3488 | } |
| 3489 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3490 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2_without_bias) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3491 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3492 | DeconvolutionOperatorTester() |
| 3493 | .has_bias(false) |
| 3494 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3495 | .kernel_size(2, 2) |
| 3496 | .stride(2) |
| 3497 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3498 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3499 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3500 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3501 | } |
| 3502 | |
| 3503 | /**************************** SUBCONV2D/GEMM path, grouped ****************************/ |
| 3504 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3505 | TEST(DECONVOLUTION_NHWC_QU8, grouped_2x2s2) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3506 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3507 | DeconvolutionOperatorTester() |
| 3508 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3509 | .kernel_size(2, 2) |
| 3510 | .stride(2) |
| 3511 | .groups(2) |
| 3512 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3513 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3514 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3515 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3516 | } |
| 3517 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3518 | TEST(DECONVOLUTION_NHWC_QU8, grouped_Kx2sKx2) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3519 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3520 | for (size_t kernel_height = 3; kernel_height <= 5; kernel_height++) { |
| 3521 | DeconvolutionOperatorTester() |
| 3522 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3523 | .kernel_size(kernel_height, 2) |
| 3524 | .stride(kernel_height, 2) |
| 3525 | .groups(2) |
| 3526 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3527 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3528 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3529 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3530 | } |
| 3531 | } |
| 3532 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3533 | TEST(DECONVOLUTION_NHWC_QU8, grouped_2xKs2xK) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3534 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3535 | for (size_t kernel_width = 3; kernel_width <= 5; kernel_width++) { |
| 3536 | DeconvolutionOperatorTester() |
| 3537 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3538 | .kernel_size(2, kernel_width) |
| 3539 | .stride(2, kernel_width) |
| 3540 | .groups(2) |
| 3541 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3542 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3543 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3544 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3545 | } |
| 3546 | } |
| 3547 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3548 | TEST(DECONVOLUTION_NHWC_QU8, grouped_2x2s2_height_adjustment) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3549 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3550 | DeconvolutionOperatorTester() |
| 3551 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3552 | .adjustment_height(1) |
| 3553 | .kernel_size(2, 2) |
| 3554 | .stride(2) |
| 3555 | .groups(2) |
| 3556 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3557 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3558 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3559 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3560 | } |
| 3561 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3562 | TEST(DECONVOLUTION_NHWC_QU8, grouped_2x2s2_width_adjustment) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3563 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3564 | DeconvolutionOperatorTester() |
| 3565 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3566 | .adjustment_width(1) |
| 3567 | .kernel_size(2, 2) |
| 3568 | .stride(2) |
| 3569 | .groups(2) |
| 3570 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3571 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3572 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3573 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3574 | } |
| 3575 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3576 | TEST(DECONVOLUTION_NHWC_QU8, grouped_2x2s2_varying_input_height) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3577 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3578 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 3579 | DeconvolutionOperatorTester() |
| 3580 | .input_size(input_height, kStridedInputWidth) |
| 3581 | .kernel_size(2, 2) |
| 3582 | .stride(2) |
| 3583 | .groups(2) |
| 3584 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3585 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3586 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3587 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3588 | } |
| 3589 | } |
| 3590 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3591 | TEST(DECONVOLUTION_NHWC_QU8, grouped_2x2s2_varying_input_width) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3592 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3593 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 3594 | DeconvolutionOperatorTester() |
| 3595 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3596 | .kernel_size(2, 2) |
| 3597 | .stride(2) |
| 3598 | .groups(2) |
| 3599 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3600 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3601 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3602 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3603 | } |
| 3604 | } |
| 3605 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3606 | TEST(DECONVOLUTION_NHWC_QU8, grouped_2x2s2_varying_input_channels) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3607 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3608 | for (size_t input_channels = 14; input_channels <= 20; input_channels++) { |
| 3609 | DeconvolutionOperatorTester() |
| 3610 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3611 | .kernel_size(2, 2) |
| 3612 | .stride(2) |
| 3613 | .groups(2) |
| 3614 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3615 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3616 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3617 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3618 | } |
| 3619 | } |
| 3620 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3621 | TEST(DECONVOLUTION_NHWC_QU8, grouped_2x2s2_varying_output_channels) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3622 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3623 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3624 | DeconvolutionOperatorTester() |
| 3625 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3626 | .kernel_size(2, 2) |
| 3627 | .stride(2) |
| 3628 | .groups(2) |
| 3629 | .group_input_channels(17) |
| 3630 | .group_output_channels(output_channels) |
| 3631 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3632 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3633 | } |
| 3634 | } |
| 3635 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3636 | TEST(DECONVOLUTION_NHWC_QU8, grouped_2x2s2_with_input_stride) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3637 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3638 | DeconvolutionOperatorTester() |
| 3639 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3640 | .kernel_size(2, 2) |
| 3641 | .stride(2) |
| 3642 | .groups(2) |
| 3643 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3644 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3645 | .input_pixel_stride(37) |
| 3646 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3647 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3648 | } |
| 3649 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3650 | TEST(DECONVOLUTION_NHWC_QU8, grouped_2x2s2_with_output_stride) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3651 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3652 | DeconvolutionOperatorTester() |
| 3653 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3654 | .kernel_size(2, 2) |
| 3655 | .stride(2) |
| 3656 | .groups(2) |
| 3657 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3658 | .group_output_channels(xnn_params.qu8.gemm.nr + 3) |
| 3659 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3660 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3661 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3662 | } |
| 3663 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3664 | TEST(DECONVOLUTION_NHWC_QU8, grouped_2x2s2_with_qmin) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3665 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3666 | DeconvolutionOperatorTester() |
| 3667 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3668 | .kernel_size(2, 2) |
| 3669 | .stride(2) |
| 3670 | .groups(2) |
| 3671 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3672 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3673 | .qmin(128) |
| 3674 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3675 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3676 | } |
| 3677 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3678 | TEST(DECONVOLUTION_NHWC_QU8, grouped_2x2s2_with_qmax) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3679 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3680 | DeconvolutionOperatorTester() |
| 3681 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3682 | .kernel_size(2, 2) |
| 3683 | .stride(2) |
| 3684 | .groups(2) |
| 3685 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3686 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3687 | .qmax(128) |
| 3688 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3689 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3690 | } |
| 3691 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3692 | TEST(DECONVOLUTION_NHWC_QU8, grouped_2x2s2_without_bias) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3693 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3694 | DeconvolutionOperatorTester() |
| 3695 | .has_bias(false) |
| 3696 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3697 | .kernel_size(2, 2) |
| 3698 | .stride(2) |
| 3699 | .groups(2) |
| 3700 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3701 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3702 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3703 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3704 | } |
| 3705 | |
| 3706 | /**************************** SUBCONV2D/GEMM path, batched ****************************/ |
| 3707 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3708 | TEST(DECONVOLUTION_NHWC_QU8, batched_2x2s2) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3709 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3710 | DeconvolutionOperatorTester() |
| 3711 | .batch_size(2) |
| 3712 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3713 | .kernel_size(2, 2) |
| 3714 | .stride(2) |
| 3715 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3716 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3717 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3718 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3719 | } |
| 3720 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3721 | TEST(DECONVOLUTION_NHWC_QU8, batched_Kx2sKx2) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3722 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3723 | for (size_t kernel_height = 3; kernel_height <= 5; kernel_height++) { |
| 3724 | DeconvolutionOperatorTester() |
| 3725 | .batch_size(2) |
| 3726 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3727 | .kernel_size(kernel_height, 2) |
| 3728 | .stride(kernel_height, 2) |
| 3729 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3730 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3731 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3732 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3733 | } |
| 3734 | } |
| 3735 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3736 | TEST(DECONVOLUTION_NHWC_QU8, batched_2xKs2xK) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3737 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3738 | for (size_t kernel_width = 3; kernel_width <= 5; kernel_width++) { |
| 3739 | DeconvolutionOperatorTester() |
| 3740 | .batch_size(2) |
| 3741 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3742 | .kernel_size(2, kernel_width) |
| 3743 | .stride(2, kernel_width) |
| 3744 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3745 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3746 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3747 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3748 | } |
| 3749 | } |
| 3750 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3751 | TEST(DECONVOLUTION_NHWC_QU8, batched_2x2s2_height_adjustment) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3752 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3753 | DeconvolutionOperatorTester() |
| 3754 | .batch_size(2) |
| 3755 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3756 | .adjustment_height(1) |
| 3757 | .kernel_size(2, 2) |
| 3758 | .stride(2) |
| 3759 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3760 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3761 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3762 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3763 | } |
| 3764 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3765 | TEST(DECONVOLUTION_NHWC_QU8, batched_2x2s2_width_adjustment) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3766 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3767 | DeconvolutionOperatorTester() |
| 3768 | .batch_size(2) |
| 3769 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3770 | .adjustment_width(1) |
| 3771 | .kernel_size(2, 2) |
| 3772 | .stride(2) |
| 3773 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3774 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3775 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3776 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3777 | } |
| 3778 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3779 | TEST(DECONVOLUTION_NHWC_QU8, batched_2x2s2_varying_input_height) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3780 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3781 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 3782 | DeconvolutionOperatorTester() |
| 3783 | .batch_size(2) |
| 3784 | .input_size(input_height, kStridedInputWidth) |
| 3785 | .kernel_size(2, 2) |
| 3786 | .stride(2) |
| 3787 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3788 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3789 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3790 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3791 | } |
| 3792 | } |
| 3793 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3794 | TEST(DECONVOLUTION_NHWC_QU8, batched_2x2s2_varying_input_width) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3795 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3796 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 3797 | DeconvolutionOperatorTester() |
| 3798 | .batch_size(2) |
| 3799 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3800 | .kernel_size(2, 2) |
| 3801 | .stride(2) |
| 3802 | .group_input_channels(15) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3803 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3804 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3805 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3806 | } |
| 3807 | } |
| 3808 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3809 | TEST(DECONVOLUTION_NHWC_QU8, batched_2x2s2_varying_input_channels) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3810 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3811 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 3812 | DeconvolutionOperatorTester() |
| 3813 | .batch_size(2) |
| 3814 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3815 | .kernel_size(2, 2) |
| 3816 | .stride(2) |
| 3817 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3818 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3819 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3820 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3821 | } |
| 3822 | } |
| 3823 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3824 | TEST(DECONVOLUTION_NHWC_QU8, batched_2x2s2_varying_output_channels) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3825 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3826 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3827 | DeconvolutionOperatorTester() |
| 3828 | .batch_size(2) |
| 3829 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3830 | .kernel_size(2, 2) |
| 3831 | .stride(2) |
| 3832 | .group_input_channels(23) |
| 3833 | .group_output_channels(output_channels) |
| 3834 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3835 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3836 | } |
| 3837 | } |
| 3838 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3839 | TEST(DECONVOLUTION_NHWC_QU8, batched_2x2s2_with_input_stride) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3840 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3841 | DeconvolutionOperatorTester() |
| 3842 | .batch_size(2) |
| 3843 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3844 | .kernel_size(2, 2) |
| 3845 | .stride(2) |
| 3846 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3847 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3848 | .input_pixel_stride(28) |
| 3849 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3850 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3851 | } |
| 3852 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3853 | TEST(DECONVOLUTION_NHWC_QU8, batched_2x2s2_with_output_stride) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3854 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3855 | DeconvolutionOperatorTester() |
| 3856 | .batch_size(2) |
| 3857 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3858 | .kernel_size(2, 2) |
| 3859 | .stride(2) |
| 3860 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3861 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
| 3862 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3863 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3864 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3865 | } |
| 3866 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3867 | TEST(DECONVOLUTION_NHWC_QU8, batched_2x2s2_with_qmin) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3868 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3869 | DeconvolutionOperatorTester() |
| 3870 | .batch_size(2) |
| 3871 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3872 | .kernel_size(2, 2) |
| 3873 | .stride(2) |
| 3874 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3875 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3876 | .qmin(128) |
| 3877 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3878 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3879 | } |
| 3880 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3881 | TEST(DECONVOLUTION_NHWC_QU8, batched_2x2s2_with_qmax) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3882 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3883 | DeconvolutionOperatorTester() |
| 3884 | .batch_size(2) |
| 3885 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3886 | .kernel_size(2, 2) |
| 3887 | .stride(2) |
| 3888 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3889 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3890 | .qmax(128) |
| 3891 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3892 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3893 | } |
| 3894 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3895 | TEST(DECONVOLUTION_NHWC_QU8, batched_2x2s2_without_bias) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3896 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3897 | DeconvolutionOperatorTester() |
| 3898 | .has_bias(false) |
| 3899 | .batch_size(2) |
| 3900 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3901 | .kernel_size(2, 2) |
| 3902 | .stride(2) |
| 3903 | .group_input_channels(23) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3904 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3905 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3906 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3907 | } |
| 3908 | |
| 3909 | /**************************** SUBCONV2D/GEMM path, grouped, batched ****************************/ |
| 3910 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3911 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_2x2s2) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3912 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3913 | DeconvolutionOperatorTester() |
| 3914 | .batch_size(2) |
| 3915 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3916 | .kernel_size(2, 2) |
| 3917 | .stride(2) |
| 3918 | .groups(2) |
| 3919 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3920 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3921 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3922 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3923 | } |
| 3924 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3925 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_Kx2sKx2) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3926 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3927 | for (size_t kernel_height = 3; kernel_height <= 5; kernel_height++) { |
| 3928 | DeconvolutionOperatorTester() |
| 3929 | .batch_size(2) |
| 3930 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3931 | .kernel_size(kernel_height, 2) |
| 3932 | .stride(kernel_height, 2) |
| 3933 | .groups(2) |
| 3934 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3935 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3936 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3937 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3938 | } |
| 3939 | } |
| 3940 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3941 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_2xKs2xK) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3942 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3943 | for (size_t kernel_width = 3; kernel_width <= 5; kernel_width++) { |
| 3944 | DeconvolutionOperatorTester() |
| 3945 | .batch_size(2) |
| 3946 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3947 | .kernel_size(2, kernel_width) |
| 3948 | .stride(2, kernel_width) |
| 3949 | .groups(2) |
| 3950 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3951 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3952 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3953 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3954 | } |
| 3955 | } |
| 3956 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3957 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_2x2s2_height_adjustment) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3958 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3959 | DeconvolutionOperatorTester() |
| 3960 | .batch_size(2) |
| 3961 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3962 | .adjustment_height(1) |
| 3963 | .kernel_size(2, 2) |
| 3964 | .stride(2) |
| 3965 | .groups(2) |
| 3966 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3967 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3968 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3969 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3970 | } |
| 3971 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3972 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_2x2s2_width_adjustment) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3973 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3974 | DeconvolutionOperatorTester() |
| 3975 | .batch_size(2) |
| 3976 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 3977 | .adjustment_width(1) |
| 3978 | .kernel_size(2, 2) |
| 3979 | .stride(2) |
| 3980 | .groups(2) |
| 3981 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3982 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3983 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3984 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3985 | } |
| 3986 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3987 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_2x2s2_varying_input_height) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3988 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 3989 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 3990 | DeconvolutionOperatorTester() |
| 3991 | .batch_size(2) |
| 3992 | .input_size(input_height, kStridedInputWidth) |
| 3993 | .kernel_size(2, 2) |
| 3994 | .stride(2) |
| 3995 | .groups(2) |
| 3996 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3997 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 3998 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 3999 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4000 | } |
| 4001 | } |
| 4002 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4003 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_2x2s2_varying_input_width) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4004 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 4005 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 4006 | DeconvolutionOperatorTester() |
| 4007 | .batch_size(2) |
| 4008 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 4009 | .kernel_size(2, 2) |
| 4010 | .stride(2) |
| 4011 | .groups(2) |
| 4012 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4013 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4014 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4015 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4016 | } |
| 4017 | } |
| 4018 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4019 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_2x2s2_varying_input_channels) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4020 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 4021 | for (size_t input_channels = 14; input_channels <= 20; input_channels++) { |
| 4022 | DeconvolutionOperatorTester() |
| 4023 | .batch_size(2) |
| 4024 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 4025 | .kernel_size(2, 2) |
| 4026 | .stride(2) |
| 4027 | .groups(2) |
| 4028 | .group_input_channels(input_channels) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4029 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4030 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4031 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4032 | } |
| 4033 | } |
| 4034 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4035 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_2x2s2_varying_output_channels) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4036 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4037 | for (size_t output_channels = 1; output_channels <= xnn_params.qu8.gemm.nr * 2; output_channels *= 2) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4038 | DeconvolutionOperatorTester() |
| 4039 | .batch_size(2) |
| 4040 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 4041 | .kernel_size(2, 2) |
| 4042 | .stride(2) |
| 4043 | .groups(2) |
| 4044 | .group_input_channels(17) |
| 4045 | .group_output_channels(output_channels) |
| 4046 | .iterations(1) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4047 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4048 | } |
| 4049 | } |
| 4050 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4051 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_2x2s2_with_input_stride) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4052 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 4053 | DeconvolutionOperatorTester() |
| 4054 | .batch_size(2) |
| 4055 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 4056 | .kernel_size(2, 2) |
| 4057 | .stride(2) |
| 4058 | .groups(2) |
| 4059 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4060 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4061 | .input_pixel_stride(37) |
| 4062 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4063 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4064 | } |
| 4065 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4066 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_2x2s2_with_output_stride) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4067 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 4068 | DeconvolutionOperatorTester() |
| 4069 | .batch_size(2) |
| 4070 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 4071 | .kernel_size(2, 2) |
| 4072 | .stride(2) |
| 4073 | .groups(2) |
| 4074 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4075 | .group_output_channels(xnn_params.qu8.gemm.nr + 3) |
| 4076 | .output_pixel_stride(xnn_params.qu8.gemm.nr * 2 + 13) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4077 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4078 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4079 | } |
| 4080 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4081 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_2x2s2_with_qmin) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4082 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 4083 | DeconvolutionOperatorTester() |
| 4084 | .batch_size(2) |
| 4085 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 4086 | .kernel_size(2, 2) |
| 4087 | .stride(2) |
| 4088 | .groups(2) |
| 4089 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4090 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4091 | .qmin(128) |
| 4092 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4093 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4094 | } |
| 4095 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4096 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_2x2s2_with_qmax) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4097 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 4098 | DeconvolutionOperatorTester() |
| 4099 | .batch_size(2) |
| 4100 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 4101 | .kernel_size(2, 2) |
| 4102 | .stride(2) |
| 4103 | .groups(2) |
| 4104 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4105 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4106 | .qmax(128) |
| 4107 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4108 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4109 | } |
| 4110 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4111 | TEST(DECONVOLUTION_NHWC_QU8, batched_grouped_2x2s2_without_bias) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4112 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 4113 | DeconvolutionOperatorTester() |
| 4114 | .has_bias(false) |
| 4115 | .batch_size(2) |
| 4116 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 4117 | .kernel_size(2, 2) |
| 4118 | .stride(2) |
| 4119 | .groups(2) |
| 4120 | .group_input_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4121 | .group_output_channels(xnn_params.qu8.gemm.nr * 2 + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4122 | .iterations(3) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4123 | .TestQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4124 | } |
| 4125 | |
| 4126 | /**************************** SUBCONV2D/GEMM path, setup ****************************/ |
| 4127 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4128 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2_setup_changing_batch) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4129 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 4130 | DeconvolutionOperatorTester() |
| 4131 | .batch_size(2) |
| 4132 | .next_batch_size(5) |
| 4133 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 4134 | .kernel_size(2, 2) |
| 4135 | .stride(2) |
| 4136 | .groups(2) |
| 4137 | .group_input_channels(15) |
| 4138 | .group_output_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4139 | .TestSetupQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4140 | } |
| 4141 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4142 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2_setup_changing_height) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4143 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 4144 | DeconvolutionOperatorTester() |
| 4145 | .batch_size(2) |
| 4146 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 4147 | .next_input_height(kStridedInputHeight + 3) |
| 4148 | .kernel_size(2, 2) |
| 4149 | .stride(2) |
| 4150 | .groups(2) |
| 4151 | .group_input_channels(15) |
| 4152 | .group_output_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4153 | .TestSetupQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4154 | } |
| 4155 | |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4156 | TEST(DECONVOLUTION_NHWC_QU8, 2x2s2_setup_changing_width) { |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4157 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 4158 | DeconvolutionOperatorTester() |
| 4159 | .batch_size(2) |
| 4160 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 4161 | .next_input_width(kStridedInputWidth + 3) |
| 4162 | .kernel_size(2, 2) |
| 4163 | .stride(2) |
| 4164 | .groups(2) |
| 4165 | .group_input_channels(15) |
| 4166 | .group_output_channels(17) |
Marat Dukhan | 08b7a97 | 2020-07-14 18:17:29 -0700 | [diff] [blame] | 4167 | .TestSetupQU8(); |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 4168 | } |
| 4169 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4170 | /**************************** Future GEMM path ****************************/ |
| 4171 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4172 | TEST(DECONVOLUTION_NHWC_F32, 1x1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4173 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4174 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4175 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4176 | .kernel_size(1, 1) |
| 4177 | .group_input_channels(23) |
| 4178 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4179 | .iterations(3) |
| 4180 | .TestF32(); |
| 4181 | } |
| 4182 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4183 | TEST(DECONVOLUTION_NHWC_F32, 1x1_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4184 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4185 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4186 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4187 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4188 | .kernel_size(1, 1) |
| 4189 | .group_input_channels(23) |
| 4190 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4191 | .iterations(1) |
| 4192 | .TestF32(); |
| 4193 | } |
| 4194 | } |
| 4195 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4196 | TEST(DECONVOLUTION_NHWC_F32, 1x1_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4197 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4198 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4199 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4200 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4201 | .kernel_size(1, 1) |
| 4202 | .group_input_channels(23) |
| 4203 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4204 | .iterations(1) |
| 4205 | .TestF32(); |
| 4206 | } |
| 4207 | } |
| 4208 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4209 | TEST(DECONVOLUTION_NHWC_F32, 1x1_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4210 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4211 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 4212 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4213 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4214 | .kernel_size(1, 1) |
| 4215 | .group_input_channels(input_channels) |
| 4216 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4217 | .iterations(1) |
| 4218 | .TestF32(); |
| 4219 | } |
| 4220 | } |
| 4221 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4222 | TEST(DECONVOLUTION_NHWC_F32, 1x1_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4223 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4224 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 4225 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4226 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4227 | .kernel_size(1, 1) |
| 4228 | .group_input_channels(23) |
| 4229 | .group_output_channels(output_channels) |
| 4230 | .iterations(1) |
| 4231 | .TestF32(); |
| 4232 | } |
| 4233 | } |
| 4234 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4235 | TEST(DECONVOLUTION_NHWC_F32, 1x1_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4236 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4237 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4238 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4239 | .kernel_size(1, 1) |
| 4240 | .group_input_channels(23) |
| 4241 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4242 | .input_pixel_stride(28) |
| 4243 | .iterations(3) |
| 4244 | .TestF32(); |
| 4245 | } |
| 4246 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4247 | TEST(DECONVOLUTION_NHWC_F32, 1x1_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4248 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4249 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4250 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4251 | .kernel_size(1, 1) |
| 4252 | .group_input_channels(23) |
| 4253 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4254 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 4255 | .iterations(3) |
| 4256 | .TestF32(); |
| 4257 | } |
| 4258 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4259 | TEST(DECONVOLUTION_NHWC_F32, 1x1_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4260 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4261 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4262 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4263 | .kernel_size(1, 1) |
| 4264 | .group_input_channels(23) |
| 4265 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4266 | .qmin(128) |
| 4267 | .iterations(3) |
| 4268 | .TestF32(); |
| 4269 | } |
| 4270 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4271 | TEST(DECONVOLUTION_NHWC_F32, 1x1_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4272 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4273 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4274 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4275 | .kernel_size(1, 1) |
| 4276 | .group_input_channels(23) |
| 4277 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 4278 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4279 | .iterations(3) |
| 4280 | .TestF32(); |
| 4281 | } |
| 4282 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4283 | TEST(DECONVOLUTION_NHWC_F32, 1x1_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4284 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 4285 | DeconvolutionOperatorTester() |
| 4286 | .has_bias(false) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4287 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 4288 | .kernel_size(1, 1) |
| 4289 | .group_input_channels(23) |
| 4290 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4291 | .iterations(3) |
| 4292 | .TestF32(); |
| 4293 | } |
| 4294 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4295 | /**************************** Future GEMM path, grouped ****************************/ |
| 4296 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4297 | TEST(DECONVOLUTION_NHWC_F32, grouped_1x1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4298 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4299 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4300 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4301 | .kernel_size(1, 1) |
| 4302 | .groups(2) |
| 4303 | .group_input_channels(23) |
| 4304 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4305 | .iterations(3) |
| 4306 | .TestF32(); |
| 4307 | } |
| 4308 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4309 | TEST(DECONVOLUTION_NHWC_F32, grouped_1x1_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4310 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4311 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4312 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4313 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4314 | .kernel_size(1, 1) |
| 4315 | .groups(2) |
| 4316 | .group_input_channels(23) |
| 4317 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4318 | .iterations(1) |
| 4319 | .TestF32(); |
| 4320 | } |
| 4321 | } |
| 4322 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4323 | TEST(DECONVOLUTION_NHWC_F32, grouped_1x1_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4324 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4325 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4326 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4327 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4328 | .kernel_size(1, 1) |
| 4329 | .groups(2) |
| 4330 | .group_input_channels(23) |
| 4331 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4332 | .iterations(1) |
| 4333 | .TestF32(); |
| 4334 | } |
| 4335 | } |
| 4336 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4337 | TEST(DECONVOLUTION_NHWC_F32, grouped_1x1_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4338 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4339 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 4340 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4341 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4342 | .kernel_size(1, 1) |
| 4343 | .groups(2) |
| 4344 | .group_input_channels(input_channels) |
| 4345 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4346 | .iterations(1) |
| 4347 | .TestF32(); |
| 4348 | } |
| 4349 | } |
| 4350 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4351 | TEST(DECONVOLUTION_NHWC_F32, grouped_1x1_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4352 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4353 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 4354 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4355 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4356 | .kernel_size(1, 1) |
| 4357 | .groups(2) |
| 4358 | .group_input_channels(23) |
| 4359 | .group_output_channels(output_channels) |
| 4360 | .iterations(1) |
| 4361 | .TestF32(); |
| 4362 | } |
| 4363 | } |
| 4364 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4365 | TEST(DECONVOLUTION_NHWC_F32, grouped_1x1_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4366 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4367 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4368 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4369 | .kernel_size(1, 1) |
| 4370 | .groups(2) |
| 4371 | .group_input_channels(23) |
| 4372 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4373 | .input_pixel_stride(47) |
| 4374 | .iterations(3) |
| 4375 | .TestF32(); |
| 4376 | } |
| 4377 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4378 | TEST(DECONVOLUTION_NHWC_F32, grouped_1x1_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4379 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4380 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4381 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4382 | .kernel_size(1, 1) |
| 4383 | .groups(2) |
| 4384 | .group_input_channels(23) |
| 4385 | .group_output_channels(xnn_params.f32.gemm.nr + 3) |
| 4386 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 4387 | .iterations(3) |
| 4388 | .TestF32(); |
| 4389 | } |
| 4390 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4391 | TEST(DECONVOLUTION_NHWC_F32, grouped_1x1_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4392 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4393 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4394 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4395 | .kernel_size(1, 1) |
| 4396 | .groups(2) |
| 4397 | .group_input_channels(23) |
| 4398 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4399 | .qmin(128) |
| 4400 | .iterations(3) |
| 4401 | .TestF32(); |
| 4402 | } |
| 4403 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4404 | TEST(DECONVOLUTION_NHWC_F32, grouped_1x1_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4405 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4406 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4407 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4408 | .kernel_size(1, 1) |
| 4409 | .groups(2) |
| 4410 | .group_input_channels(23) |
| 4411 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 4412 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4413 | .iterations(3) |
| 4414 | .TestF32(); |
| 4415 | } |
| 4416 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4417 | TEST(DECONVOLUTION_NHWC_F32, grouped_1x1_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4418 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 4419 | DeconvolutionOperatorTester() |
| 4420 | .has_bias(false) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4421 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 4422 | .kernel_size(1, 1) |
| 4423 | .groups(2) |
| 4424 | .group_input_channels(23) |
| 4425 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4426 | .iterations(3) |
| 4427 | .TestF32(); |
| 4428 | } |
| 4429 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4430 | /**************************** Future GEMM path, batched ****************************/ |
| 4431 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4432 | TEST(DECONVOLUTION_NHWC_F32, batched_1x1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4433 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4434 | DeconvolutionOperatorTester() |
| 4435 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4436 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4437 | .kernel_size(1, 1) |
| 4438 | .group_input_channels(23) |
| 4439 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4440 | .iterations(3) |
| 4441 | .TestF32(); |
| 4442 | } |
| 4443 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4444 | TEST(DECONVOLUTION_NHWC_F32, batched_1x1_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4445 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4446 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4447 | DeconvolutionOperatorTester() |
| 4448 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4449 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4450 | .kernel_size(1, 1) |
| 4451 | .group_input_channels(23) |
| 4452 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4453 | .iterations(1) |
| 4454 | .TestF32(); |
| 4455 | } |
| 4456 | } |
| 4457 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4458 | TEST(DECONVOLUTION_NHWC_F32, batched_1x1_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4459 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4460 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4461 | DeconvolutionOperatorTester() |
| 4462 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4463 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4464 | .kernel_size(1, 1) |
| 4465 | .group_input_channels(23) |
| 4466 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4467 | .iterations(1) |
| 4468 | .TestF32(); |
| 4469 | } |
| 4470 | } |
| 4471 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4472 | TEST(DECONVOLUTION_NHWC_F32, batched_1x1_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4473 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4474 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 4475 | DeconvolutionOperatorTester() |
| 4476 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4477 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4478 | .kernel_size(1, 1) |
| 4479 | .group_input_channels(input_channels) |
| 4480 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4481 | .iterations(1) |
| 4482 | .TestF32(); |
| 4483 | } |
| 4484 | } |
| 4485 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4486 | TEST(DECONVOLUTION_NHWC_F32, batched_1x1_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4487 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4488 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 4489 | DeconvolutionOperatorTester() |
| 4490 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4491 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4492 | .kernel_size(1, 1) |
| 4493 | .group_input_channels(23) |
| 4494 | .group_output_channels(output_channels) |
| 4495 | .iterations(1) |
| 4496 | .TestF32(); |
| 4497 | } |
| 4498 | } |
| 4499 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4500 | TEST(DECONVOLUTION_NHWC_F32, batched_1x1_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4501 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4502 | DeconvolutionOperatorTester() |
| 4503 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4504 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4505 | .kernel_size(1, 1) |
| 4506 | .group_input_channels(23) |
| 4507 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4508 | .input_pixel_stride(28) |
| 4509 | .iterations(3) |
| 4510 | .TestF32(); |
| 4511 | } |
| 4512 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4513 | TEST(DECONVOLUTION_NHWC_F32, batched_1x1_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4514 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4515 | DeconvolutionOperatorTester() |
| 4516 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4517 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4518 | .kernel_size(1, 1) |
| 4519 | .group_input_channels(23) |
| 4520 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4521 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 4522 | .iterations(3) |
| 4523 | .TestF32(); |
| 4524 | } |
| 4525 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4526 | TEST(DECONVOLUTION_NHWC_F32, batched_1x1_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4527 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4528 | DeconvolutionOperatorTester() |
| 4529 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4530 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4531 | .kernel_size(1, 1) |
| 4532 | .group_input_channels(23) |
| 4533 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4534 | .qmin(128) |
| 4535 | .iterations(3) |
| 4536 | .TestF32(); |
| 4537 | } |
| 4538 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4539 | TEST(DECONVOLUTION_NHWC_F32, batched_1x1_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4540 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4541 | DeconvolutionOperatorTester() |
| 4542 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4543 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4544 | .kernel_size(1, 1) |
| 4545 | .group_input_channels(23) |
| 4546 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 4547 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4548 | .iterations(3) |
| 4549 | .TestF32(); |
| 4550 | } |
| 4551 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4552 | TEST(DECONVOLUTION_NHWC_F32, batched_1x1_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4553 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 4554 | DeconvolutionOperatorTester() |
| 4555 | .has_bias(false) |
| 4556 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4557 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 4558 | .kernel_size(1, 1) |
| 4559 | .group_input_channels(23) |
| 4560 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4561 | .iterations(3) |
| 4562 | .TestF32(); |
| 4563 | } |
| 4564 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4565 | /**************************** Future GEMM path, batched, grouped ****************************/ |
| 4566 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4567 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_1x1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4568 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4569 | DeconvolutionOperatorTester() |
| 4570 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4571 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4572 | .kernel_size(1, 1) |
| 4573 | .groups(2) |
| 4574 | .group_input_channels(23) |
| 4575 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4576 | .iterations(3) |
| 4577 | .TestF32(); |
| 4578 | } |
| 4579 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4580 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_1x1_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4581 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4582 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4583 | DeconvolutionOperatorTester() |
| 4584 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4585 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4586 | .kernel_size(1, 1) |
| 4587 | .groups(2) |
| 4588 | .group_input_channels(23) |
| 4589 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4590 | .iterations(1) |
| 4591 | .TestF32(); |
| 4592 | } |
| 4593 | } |
| 4594 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4595 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_1x1_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4596 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4597 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4598 | DeconvolutionOperatorTester() |
| 4599 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4600 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4601 | .kernel_size(1, 1) |
| 4602 | .groups(2) |
| 4603 | .group_input_channels(23) |
| 4604 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4605 | .iterations(1) |
| 4606 | .TestF32(); |
| 4607 | } |
| 4608 | } |
| 4609 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4610 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_1x1_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4611 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4612 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 4613 | DeconvolutionOperatorTester() |
| 4614 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4615 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4616 | .kernel_size(1, 1) |
| 4617 | .groups(2) |
| 4618 | .group_input_channels(input_channels) |
| 4619 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4620 | .iterations(1) |
| 4621 | .TestF32(); |
| 4622 | } |
| 4623 | } |
| 4624 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4625 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_1x1_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4626 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4627 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 4628 | DeconvolutionOperatorTester() |
| 4629 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4630 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4631 | .kernel_size(1, 1) |
| 4632 | .groups(2) |
| 4633 | .group_input_channels(23) |
| 4634 | .group_output_channels(output_channels) |
| 4635 | .iterations(1) |
| 4636 | .TestF32(); |
| 4637 | } |
| 4638 | } |
| 4639 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4640 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_1x1_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4641 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4642 | DeconvolutionOperatorTester() |
| 4643 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4644 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4645 | .kernel_size(1, 1) |
| 4646 | .groups(2) |
| 4647 | .group_input_channels(23) |
| 4648 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4649 | .input_pixel_stride(47) |
| 4650 | .iterations(3) |
| 4651 | .TestF32(); |
| 4652 | } |
| 4653 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4654 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_1x1_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4655 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4656 | DeconvolutionOperatorTester() |
| 4657 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4658 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4659 | .kernel_size(1, 1) |
| 4660 | .groups(2) |
| 4661 | .group_input_channels(23) |
| 4662 | .group_output_channels(xnn_params.f32.gemm.nr + 3) |
| 4663 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 4664 | .iterations(3) |
| 4665 | .TestF32(); |
| 4666 | } |
| 4667 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4668 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_1x1_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4669 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4670 | DeconvolutionOperatorTester() |
| 4671 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4672 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4673 | .kernel_size(1, 1) |
| 4674 | .groups(2) |
| 4675 | .group_input_channels(23) |
| 4676 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4677 | .qmin(128) |
| 4678 | .iterations(3) |
| 4679 | .TestF32(); |
| 4680 | } |
| 4681 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4682 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_1x1_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4683 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4684 | DeconvolutionOperatorTester() |
| 4685 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4686 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4687 | .kernel_size(1, 1) |
| 4688 | .groups(2) |
| 4689 | .group_input_channels(23) |
| 4690 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 4691 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4692 | .iterations(3) |
| 4693 | .TestF32(); |
| 4694 | } |
| 4695 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4696 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_1x1_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4697 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 4698 | DeconvolutionOperatorTester() |
| 4699 | .has_bias(false) |
| 4700 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4701 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 4702 | .kernel_size(1, 1) |
| 4703 | .groups(2) |
| 4704 | .group_input_channels(23) |
| 4705 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4706 | .iterations(3) |
| 4707 | .TestF32(); |
| 4708 | } |
| 4709 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4710 | /**************************** CONV path ****************************/ |
| 4711 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4712 | TEST(DECONVOLUTION_NHWC_F32, 3x3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4713 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4714 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4715 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4716 | .padding(1) |
| 4717 | .kernel_size(3, 3) |
| 4718 | .group_input_channels(15) |
| 4719 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4720 | .iterations(3) |
| 4721 | .TestF32(); |
| 4722 | } |
| 4723 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4724 | TEST(DECONVOLUTION_NHWC_F32, Kx3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4725 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4726 | for (size_t kernel_height = 1; kernel_height <= 4; kernel_height *= 2) { |
| 4727 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4728 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4729 | .padding_width(1) |
| 4730 | .kernel_size(kernel_height, 3) |
| 4731 | .group_input_channels(17) |
| 4732 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4733 | .iterations(3) |
| 4734 | .TestF32(); |
| 4735 | } |
| 4736 | } |
| 4737 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4738 | TEST(DECONVOLUTION_NHWC_F32, 3xK) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4739 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4740 | for (size_t kernel_width = 1; kernel_width <= 4; kernel_width *= 2) { |
| 4741 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4742 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4743 | .padding_height(1) |
| 4744 | .kernel_size(3, kernel_width) |
| 4745 | .group_input_channels(17) |
| 4746 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4747 | .iterations(3) |
| 4748 | .TestF32(); |
| 4749 | } |
| 4750 | } |
| 4751 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4752 | TEST(DECONVOLUTION_NHWC_F32, 3x3_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4753 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4754 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 4755 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 4756 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4757 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4758 | .padding_width(1) |
| 4759 | .padding_top(padding_top) |
| 4760 | .padding_bottom(padding_bottom) |
| 4761 | .kernel_size(3, 3) |
| 4762 | .group_input_channels(15) |
| 4763 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4764 | .iterations(1) |
| 4765 | .TestF32(); |
| 4766 | } |
| 4767 | } |
| 4768 | } |
| 4769 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4770 | TEST(DECONVOLUTION_NHWC_F32, 3x3_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4771 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4772 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 4773 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 4774 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4775 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4776 | .padding_height(1) |
| 4777 | .padding_left(padding_left) |
| 4778 | .padding_right(padding_right) |
| 4779 | .kernel_size(3, 3) |
| 4780 | .group_input_channels(15) |
| 4781 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4782 | .iterations(1) |
| 4783 | .TestF32(); |
| 4784 | } |
| 4785 | } |
| 4786 | } |
| 4787 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4788 | TEST(DECONVOLUTION_NHWC_F32, 3x3_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4789 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4790 | for (size_t adjustment_height = 1; adjustment_height <= 2; adjustment_height++) { |
| 4791 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4792 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4793 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 4794 | .stride_height(adjustment_height + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4795 | .adjustment_height(adjustment_height) |
| 4796 | .kernel_size(3, 3) |
| 4797 | .group_input_channels(15) |
| 4798 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4799 | .iterations(1) |
| 4800 | .TestF32(); |
| 4801 | } |
| 4802 | } |
| 4803 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4804 | TEST(DECONVOLUTION_NHWC_F32, 3x3_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4805 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4806 | for (size_t adjustment_width = 1; adjustment_width <= 2; adjustment_width++) { |
| 4807 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4808 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4809 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 4810 | .stride_width(adjustment_width + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4811 | .adjustment_width(adjustment_width) |
| 4812 | .kernel_size(3, 3) |
| 4813 | .group_input_channels(15) |
| 4814 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4815 | .iterations(1) |
| 4816 | .TestF32(); |
| 4817 | } |
| 4818 | } |
| 4819 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4820 | TEST(DECONVOLUTION_NHWC_F32, 3x3_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4821 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4822 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4823 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4824 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4825 | .padding(1) |
| 4826 | .kernel_size(3, 3) |
| 4827 | .group_input_channels(15) |
| 4828 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4829 | .iterations(1) |
| 4830 | .TestF32(); |
| 4831 | } |
| 4832 | } |
| 4833 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4834 | TEST(DECONVOLUTION_NHWC_F32, 3x3_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4835 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4836 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4837 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4838 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4839 | .padding(1) |
| 4840 | .kernel_size(3, 3) |
| 4841 | .group_input_channels(15) |
| 4842 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4843 | .iterations(1) |
| 4844 | .TestF32(); |
| 4845 | } |
| 4846 | } |
| 4847 | |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 4848 | TEST(DECONVOLUTION_NHWC_F32, 3x3_varying_input_height_with_tf_same_padding) { |
| 4849 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 4850 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
| 4851 | DeconvolutionOperatorTester() |
| 4852 | .input_size(input_height, kUnstridedInputWidth) |
| 4853 | .padding_tf_same(true) |
| 4854 | .kernel_size(3, 3) |
| 4855 | .group_input_channels(15) |
| 4856 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4857 | .iterations(1) |
| 4858 | .TestF32(); |
| 4859 | } |
| 4860 | } |
| 4861 | |
| 4862 | TEST(DECONVOLUTION_NHWC_F32, 3x3_varying_input_width_with_tf_same_padding) { |
| 4863 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 4864 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
| 4865 | DeconvolutionOperatorTester() |
| 4866 | .input_size(kUnstridedInputHeight, input_width) |
| 4867 | .padding_tf_same(true) |
| 4868 | .kernel_size(3, 3) |
| 4869 | .group_input_channels(15) |
| 4870 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4871 | .iterations(1) |
| 4872 | .TestF32(); |
| 4873 | } |
| 4874 | } |
| 4875 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4876 | TEST(DECONVOLUTION_NHWC_F32, 3x3_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4877 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4878 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 4879 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4880 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4881 | .padding(1) |
| 4882 | .kernel_size(3, 3) |
| 4883 | .group_input_channels(input_channels) |
| 4884 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4885 | .iterations(1) |
| 4886 | .TestF32(); |
| 4887 | } |
| 4888 | } |
| 4889 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4890 | TEST(DECONVOLUTION_NHWC_F32, 3x3_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4891 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4892 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 4893 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4894 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4895 | .padding(1) |
| 4896 | .kernel_size(3, 3) |
| 4897 | .group_input_channels(23) |
| 4898 | .group_output_channels(output_channels) |
| 4899 | .iterations(1) |
| 4900 | .TestF32(); |
| 4901 | } |
| 4902 | } |
| 4903 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4904 | TEST(DECONVOLUTION_NHWC_F32, 3x3_with_height_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4905 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4906 | for (size_t dilation_height = 2; dilation_height <= 3; dilation_height++) { |
| 4907 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4908 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4909 | .padding(1) |
| 4910 | .kernel_size(3, 3) |
| 4911 | .dilation_height(dilation_height) |
| 4912 | .group_input_channels(23) |
| 4913 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4914 | .iterations(3) |
| 4915 | .TestF32(); |
| 4916 | } |
| 4917 | } |
| 4918 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4919 | TEST(DECONVOLUTION_NHWC_F32, 3x3_with_width_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4920 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4921 | for (size_t dilation_width = 2; dilation_width <= 3; dilation_width++) { |
| 4922 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4923 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4924 | .padding(1) |
| 4925 | .kernel_size(3, 3) |
| 4926 | .dilation_width(dilation_width) |
| 4927 | .group_input_channels(23) |
| 4928 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4929 | .iterations(3) |
| 4930 | .TestF32(); |
| 4931 | } |
| 4932 | } |
| 4933 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4934 | TEST(DECONVOLUTION_NHWC_F32, 3x3_with_height_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4935 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4936 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4937 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4938 | .padding(1) |
| 4939 | .kernel_size(3, 3) |
| 4940 | .dilation_height(3) |
| 4941 | .stride_height(2) |
| 4942 | .group_input_channels(23) |
| 4943 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4944 | .iterations(3) |
| 4945 | .TestF32(); |
| 4946 | } |
| 4947 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4948 | TEST(DECONVOLUTION_NHWC_F32, 3x3_with_width_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4949 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4950 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4951 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4952 | .padding(1) |
| 4953 | .kernel_size(3, 3) |
| 4954 | .dilation_width(3) |
| 4955 | .stride_width(2) |
| 4956 | .group_input_channels(23) |
| 4957 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4958 | .iterations(3) |
| 4959 | .TestF32(); |
| 4960 | } |
| 4961 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4962 | TEST(DECONVOLUTION_NHWC_F32, 3x3_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4963 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4964 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4965 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4966 | .padding(1) |
| 4967 | .kernel_size(3, 3) |
| 4968 | .group_input_channels(23) |
| 4969 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4970 | .input_pixel_stride(28) |
| 4971 | .iterations(3) |
| 4972 | .TestF32(); |
| 4973 | } |
| 4974 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4975 | TEST(DECONVOLUTION_NHWC_F32, 3x3_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4976 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4977 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4978 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4979 | .padding(1) |
| 4980 | .kernel_size(3, 3) |
| 4981 | .group_input_channels(23) |
| 4982 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4983 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 4984 | .iterations(3) |
| 4985 | .TestF32(); |
| 4986 | } |
| 4987 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 4988 | TEST(DECONVOLUTION_NHWC_F32, 3x3_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 4989 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4990 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 4991 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 4992 | .padding(1) |
| 4993 | .kernel_size(3, 3) |
| 4994 | .group_input_channels(23) |
| 4995 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 4996 | .qmin(128) |
| 4997 | .iterations(3) |
| 4998 | .TestF32(); |
| 4999 | } |
| 5000 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5001 | TEST(DECONVOLUTION_NHWC_F32, 3x3_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5002 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5003 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5004 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5005 | .padding(1) |
| 5006 | .kernel_size(3, 3) |
| 5007 | .group_input_channels(23) |
| 5008 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 5009 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5010 | .iterations(3) |
| 5011 | .TestF32(); |
| 5012 | } |
| 5013 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5014 | TEST(DECONVOLUTION_NHWC_F32, 3x3_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5015 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 5016 | DeconvolutionOperatorTester() |
| 5017 | .has_bias(false) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5018 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 5019 | .padding(1) |
| 5020 | .kernel_size(3, 3) |
| 5021 | .group_input_channels(23) |
| 5022 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5023 | .iterations(3) |
| 5024 | .TestF32(); |
| 5025 | } |
| 5026 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5027 | /**************************** CONV path, grouped ****************************/ |
| 5028 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5029 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5030 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5031 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5032 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5033 | .padding(1) |
| 5034 | .kernel_size(3, 3) |
| 5035 | .groups(2) |
| 5036 | .group_input_channels(15) |
| 5037 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5038 | .iterations(3) |
| 5039 | .TestF32(); |
| 5040 | } |
| 5041 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5042 | TEST(DECONVOLUTION_NHWC_F32, grouped_Kx3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5043 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5044 | for (size_t kernel_height = 1; kernel_height <= 4; kernel_height *= 2) { |
| 5045 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5046 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5047 | .padding_width(1) |
| 5048 | .kernel_size(kernel_height, 3) |
| 5049 | .groups(2) |
| 5050 | .group_input_channels(17) |
| 5051 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5052 | .iterations(3) |
| 5053 | .TestF32(); |
| 5054 | } |
| 5055 | } |
| 5056 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5057 | TEST(DECONVOLUTION_NHWC_F32, grouped_3xK) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5058 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5059 | for (size_t kernel_width = 1; kernel_width <= 4; kernel_width *= 2) { |
| 5060 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5061 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5062 | .padding_height(1) |
| 5063 | .kernel_size(3, kernel_width) |
| 5064 | .groups(2) |
| 5065 | .group_input_channels(17) |
| 5066 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5067 | .iterations(3) |
| 5068 | .TestF32(); |
| 5069 | } |
| 5070 | } |
| 5071 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5072 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5073 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5074 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 5075 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 5076 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5077 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5078 | .padding_width(1) |
| 5079 | .padding_top(padding_top) |
| 5080 | .padding_bottom(padding_bottom) |
| 5081 | .kernel_size(3, 3) |
| 5082 | .groups(2) |
| 5083 | .group_input_channels(15) |
| 5084 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5085 | .iterations(1) |
| 5086 | .TestF32(); |
| 5087 | } |
| 5088 | } |
| 5089 | } |
| 5090 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5091 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5092 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5093 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 5094 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 5095 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5096 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5097 | .padding_height(1) |
| 5098 | .padding_left(padding_left) |
| 5099 | .padding_right(padding_right) |
| 5100 | .kernel_size(3, 3) |
| 5101 | .groups(2) |
| 5102 | .group_input_channels(15) |
| 5103 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5104 | .iterations(1) |
| 5105 | .TestF32(); |
| 5106 | } |
| 5107 | } |
| 5108 | } |
| 5109 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5110 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5111 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5112 | for (size_t adjustment_height = 1; adjustment_height <= 2; adjustment_height++) { |
| 5113 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5114 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5115 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 5116 | .stride_height(adjustment_height + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5117 | .adjustment_height(adjustment_height) |
| 5118 | .kernel_size(3, 3) |
| 5119 | .groups(2) |
| 5120 | .group_input_channels(15) |
| 5121 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5122 | .iterations(1) |
| 5123 | .TestF32(); |
| 5124 | } |
| 5125 | } |
| 5126 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5127 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5128 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5129 | for (size_t adjustment_width = 1; adjustment_width <= 2; adjustment_width++) { |
| 5130 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5131 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5132 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 5133 | .stride_width(adjustment_width + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5134 | .adjustment_width(adjustment_width) |
| 5135 | .kernel_size(3, 3) |
| 5136 | .groups(2) |
| 5137 | .group_input_channels(15) |
| 5138 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5139 | .iterations(1) |
| 5140 | .TestF32(); |
| 5141 | } |
| 5142 | } |
| 5143 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5144 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5145 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5146 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5147 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5148 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5149 | .padding(1) |
| 5150 | .kernel_size(3, 3) |
| 5151 | .groups(2) |
| 5152 | .group_input_channels(15) |
| 5153 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5154 | .iterations(1) |
| 5155 | .TestF32(); |
| 5156 | } |
| 5157 | } |
| 5158 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5159 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5160 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5161 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5162 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5163 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5164 | .padding(1) |
| 5165 | .kernel_size(3, 3) |
| 5166 | .groups(2) |
| 5167 | .group_input_channels(15) |
| 5168 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5169 | .iterations(1) |
| 5170 | .TestF32(); |
| 5171 | } |
| 5172 | } |
| 5173 | |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 5174 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_varying_input_height_with_tf_same_padding) { |
| 5175 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 5176 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
| 5177 | DeconvolutionOperatorTester() |
| 5178 | .input_size(input_height, kUnstridedInputWidth) |
| 5179 | .padding_tf_same(true) |
| 5180 | .kernel_size(3, 3) |
| 5181 | .groups(2) |
| 5182 | .group_input_channels(15) |
| 5183 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5184 | .iterations(1) |
| 5185 | .TestF32(); |
| 5186 | } |
| 5187 | } |
| 5188 | |
| 5189 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_varying_input_width_with_tf_same_padding) { |
| 5190 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 5191 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
| 5192 | DeconvolutionOperatorTester() |
| 5193 | .input_size(kUnstridedInputHeight, input_width) |
| 5194 | .padding_tf_same(true) |
| 5195 | .kernel_size(3, 3) |
| 5196 | .groups(2) |
| 5197 | .group_input_channels(15) |
| 5198 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5199 | .iterations(1) |
| 5200 | .TestF32(); |
| 5201 | } |
| 5202 | } |
| 5203 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5204 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5205 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5206 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 5207 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5208 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5209 | .padding(1) |
| 5210 | .kernel_size(3, 3) |
| 5211 | .groups(2) |
| 5212 | .group_input_channels(input_channels) |
| 5213 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5214 | .iterations(1) |
| 5215 | .TestF32(); |
| 5216 | } |
| 5217 | } |
| 5218 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5219 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5220 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5221 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 5222 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5223 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5224 | .padding(1) |
| 5225 | .kernel_size(3, 3) |
| 5226 | .groups(2) |
| 5227 | .group_input_channels(23) |
| 5228 | .group_output_channels(output_channels) |
| 5229 | .iterations(1) |
| 5230 | .TestF32(); |
| 5231 | } |
| 5232 | } |
| 5233 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5234 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_with_height_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5235 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5236 | for (size_t dilation_height = 2; dilation_height <= 3; dilation_height++) { |
| 5237 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5238 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5239 | .padding(1) |
| 5240 | .kernel_size(3, 3) |
| 5241 | .dilation_height(dilation_height) |
| 5242 | .groups(2) |
| 5243 | .group_input_channels(23) |
| 5244 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5245 | .iterations(3) |
| 5246 | .TestF32(); |
| 5247 | } |
| 5248 | } |
| 5249 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5250 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_with_width_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5251 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5252 | for (size_t dilation_width = 2; dilation_width <= 3; dilation_width++) { |
| 5253 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5254 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5255 | .padding(1) |
| 5256 | .kernel_size(3, 3) |
| 5257 | .dilation_width(dilation_width) |
| 5258 | .groups(2) |
| 5259 | .group_input_channels(23) |
| 5260 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5261 | .iterations(3) |
| 5262 | .TestF32(); |
| 5263 | } |
| 5264 | } |
| 5265 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5266 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_with_height_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5267 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5268 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5269 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5270 | .padding(1) |
| 5271 | .kernel_size(3, 3) |
| 5272 | .dilation_height(3) |
| 5273 | .stride_height(2) |
| 5274 | .groups(2) |
| 5275 | .group_input_channels(23) |
| 5276 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5277 | .iterations(3) |
| 5278 | .TestF32(); |
| 5279 | } |
| 5280 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5281 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_with_width_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5282 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5283 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5284 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5285 | .padding(1) |
| 5286 | .kernel_size(3, 3) |
| 5287 | .dilation_width(3) |
| 5288 | .stride_width(2) |
| 5289 | .groups(2) |
| 5290 | .group_input_channels(23) |
| 5291 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5292 | .iterations(3) |
| 5293 | .TestF32(); |
| 5294 | } |
| 5295 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5296 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5297 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5298 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5299 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5300 | .padding(1) |
| 5301 | .kernel_size(3, 3) |
| 5302 | .groups(2) |
| 5303 | .group_input_channels(23) |
| 5304 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5305 | .input_pixel_stride(47) |
| 5306 | .iterations(3) |
| 5307 | .TestF32(); |
| 5308 | } |
| 5309 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5310 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5311 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5312 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5313 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5314 | .padding(1) |
| 5315 | .kernel_size(3, 3) |
| 5316 | .groups(2) |
| 5317 | .group_input_channels(23) |
| 5318 | .group_output_channels(xnn_params.f32.gemm.nr + 3) |
| 5319 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 5320 | .iterations(3) |
| 5321 | .TestF32(); |
| 5322 | } |
| 5323 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5324 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5325 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5326 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5327 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5328 | .padding(1) |
| 5329 | .kernel_size(3, 3) |
| 5330 | .groups(2) |
| 5331 | .group_input_channels(23) |
| 5332 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5333 | .qmin(128) |
| 5334 | .iterations(3) |
| 5335 | .TestF32(); |
| 5336 | } |
| 5337 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5338 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5339 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5340 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5341 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5342 | .padding(1) |
| 5343 | .kernel_size(3, 3) |
| 5344 | .groups(2) |
| 5345 | .group_input_channels(23) |
| 5346 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 5347 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5348 | .iterations(3) |
| 5349 | .TestF32(); |
| 5350 | } |
| 5351 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5352 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5353 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 5354 | DeconvolutionOperatorTester() |
| 5355 | .has_bias(false) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5356 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 5357 | .padding(1) |
| 5358 | .kernel_size(3, 3) |
| 5359 | .groups(2) |
| 5360 | .group_input_channels(23) |
| 5361 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5362 | .iterations(3) |
| 5363 | .TestF32(); |
| 5364 | } |
| 5365 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5366 | /**************************** CONV path, batched ****************************/ |
| 5367 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5368 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5369 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5370 | DeconvolutionOperatorTester() |
| 5371 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5372 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5373 | .padding(1) |
| 5374 | .kernel_size(3, 3) |
| 5375 | .group_input_channels(15) |
| 5376 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5377 | .iterations(3) |
| 5378 | .TestF32(); |
| 5379 | } |
| 5380 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5381 | TEST(DECONVOLUTION_NHWC_F32, batched_Kx3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5382 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5383 | for (size_t kernel_height = 1; kernel_height <= 4; kernel_height *= 2) { |
| 5384 | DeconvolutionOperatorTester() |
| 5385 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5386 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5387 | .padding_width(1) |
| 5388 | .kernel_size(kernel_height, 3) |
| 5389 | .group_input_channels(17) |
| 5390 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5391 | .iterations(3) |
| 5392 | .TestF32(); |
| 5393 | } |
| 5394 | } |
| 5395 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5396 | TEST(DECONVOLUTION_NHWC_F32, batched_3xK) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5397 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5398 | for (size_t kernel_width = 1; kernel_width <= 4; kernel_width *= 2) { |
| 5399 | DeconvolutionOperatorTester() |
| 5400 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5401 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5402 | .padding_height(1) |
| 5403 | .kernel_size(3, kernel_width) |
| 5404 | .group_input_channels(17) |
| 5405 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5406 | .iterations(3) |
| 5407 | .TestF32(); |
| 5408 | } |
| 5409 | } |
| 5410 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5411 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5412 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5413 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 5414 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 5415 | DeconvolutionOperatorTester() |
| 5416 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5417 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5418 | .padding_width(1) |
| 5419 | .padding_top(padding_top) |
| 5420 | .padding_bottom(padding_bottom) |
| 5421 | .kernel_size(3, 3) |
| 5422 | .group_input_channels(15) |
| 5423 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5424 | .iterations(1) |
| 5425 | .TestF32(); |
| 5426 | } |
| 5427 | } |
| 5428 | } |
| 5429 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5430 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5431 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5432 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 5433 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 5434 | DeconvolutionOperatorTester() |
| 5435 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5436 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5437 | .padding_height(1) |
| 5438 | .padding_left(padding_left) |
| 5439 | .padding_right(padding_right) |
| 5440 | .kernel_size(3, 3) |
| 5441 | .group_input_channels(15) |
| 5442 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5443 | .iterations(1) |
| 5444 | .TestF32(); |
| 5445 | } |
| 5446 | } |
| 5447 | } |
| 5448 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5449 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5450 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5451 | for (size_t adjustment_height = 1; adjustment_height <= 2; adjustment_height++) { |
| 5452 | DeconvolutionOperatorTester() |
| 5453 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5454 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5455 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 5456 | .stride_height(adjustment_height + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5457 | .adjustment_height(adjustment_height) |
| 5458 | .kernel_size(3, 3) |
| 5459 | .group_input_channels(15) |
| 5460 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5461 | .iterations(1) |
| 5462 | .TestF32(); |
| 5463 | } |
| 5464 | } |
| 5465 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5466 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5467 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5468 | for (size_t adjustment_width = 1; adjustment_width <= 2; adjustment_width++) { |
| 5469 | DeconvolutionOperatorTester() |
| 5470 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5471 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5472 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 5473 | .stride_width(adjustment_width + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5474 | .adjustment_width(adjustment_width) |
| 5475 | .kernel_size(3, 3) |
| 5476 | .group_input_channels(15) |
| 5477 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5478 | .iterations(1) |
| 5479 | .TestF32(); |
| 5480 | } |
| 5481 | } |
| 5482 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5483 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5484 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5485 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5486 | DeconvolutionOperatorTester() |
| 5487 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5488 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5489 | .padding(1) |
| 5490 | .kernel_size(3, 3) |
| 5491 | .group_input_channels(15) |
| 5492 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5493 | .iterations(1) |
| 5494 | .TestF32(); |
| 5495 | } |
| 5496 | } |
| 5497 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5498 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5499 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5500 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5501 | DeconvolutionOperatorTester() |
| 5502 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5503 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5504 | .padding(1) |
| 5505 | .kernel_size(3, 3) |
| 5506 | .group_input_channels(15) |
| 5507 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5508 | .iterations(1) |
| 5509 | .TestF32(); |
| 5510 | } |
| 5511 | } |
| 5512 | |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 5513 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_varying_input_height_with_tf_same_padding) { |
| 5514 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 5515 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
| 5516 | DeconvolutionOperatorTester() |
| 5517 | .batch_size(2) |
| 5518 | .input_size(input_height, kUnstridedInputWidth) |
| 5519 | .padding_tf_same(true) |
| 5520 | .kernel_size(3, 3) |
| 5521 | .group_input_channels(15) |
| 5522 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5523 | .iterations(1) |
| 5524 | .TestF32(); |
| 5525 | } |
| 5526 | } |
| 5527 | |
| 5528 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_varying_input_width_with_tf_same_padding) { |
| 5529 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 5530 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
| 5531 | DeconvolutionOperatorTester() |
| 5532 | .batch_size(2) |
| 5533 | .input_size(kUnstridedInputHeight, input_width) |
| 5534 | .padding_tf_same(true) |
| 5535 | .kernel_size(3, 3) |
| 5536 | .group_input_channels(15) |
| 5537 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5538 | .iterations(1) |
| 5539 | .TestF32(); |
| 5540 | } |
| 5541 | } |
| 5542 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5543 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5544 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5545 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 5546 | DeconvolutionOperatorTester() |
| 5547 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5548 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5549 | .padding(1) |
| 5550 | .kernel_size(3, 3) |
| 5551 | .group_input_channels(input_channels) |
| 5552 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5553 | .iterations(1) |
| 5554 | .TestF32(); |
| 5555 | } |
| 5556 | } |
| 5557 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5558 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5559 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5560 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 5561 | DeconvolutionOperatorTester() |
| 5562 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5563 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5564 | .padding(1) |
| 5565 | .kernel_size(3, 3) |
| 5566 | .group_input_channels(23) |
| 5567 | .group_output_channels(output_channels) |
| 5568 | .iterations(1) |
| 5569 | .TestF32(); |
| 5570 | } |
| 5571 | } |
| 5572 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5573 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_with_height_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5574 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5575 | for (size_t dilation_height = 2; dilation_height <= 3; dilation_height++) { |
| 5576 | DeconvolutionOperatorTester() |
| 5577 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5578 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5579 | .padding(1) |
| 5580 | .kernel_size(3, 3) |
| 5581 | .dilation_height(dilation_height) |
| 5582 | .group_input_channels(23) |
| 5583 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5584 | .iterations(3) |
| 5585 | .TestF32(); |
| 5586 | } |
| 5587 | } |
| 5588 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5589 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_with_width_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5590 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5591 | for (size_t dilation_width = 2; dilation_width <= 3; dilation_width++) { |
| 5592 | DeconvolutionOperatorTester() |
| 5593 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5594 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5595 | .padding(1) |
| 5596 | .kernel_size(3, 3) |
| 5597 | .dilation_width(dilation_width) |
| 5598 | .group_input_channels(23) |
| 5599 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5600 | .iterations(3) |
| 5601 | .TestF32(); |
| 5602 | } |
| 5603 | } |
| 5604 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5605 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_with_height_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5606 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5607 | DeconvolutionOperatorTester() |
| 5608 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5609 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5610 | .padding(1) |
| 5611 | .kernel_size(3, 3) |
| 5612 | .dilation_height(3) |
| 5613 | .stride_height(2) |
| 5614 | .group_input_channels(23) |
| 5615 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5616 | .iterations(3) |
| 5617 | .TestF32(); |
| 5618 | } |
| 5619 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5620 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_with_width_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5621 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5622 | DeconvolutionOperatorTester() |
| 5623 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5624 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5625 | .padding(1) |
| 5626 | .kernel_size(3, 3) |
| 5627 | .dilation_width(3) |
| 5628 | .stride_width(2) |
| 5629 | .group_input_channels(23) |
| 5630 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5631 | .iterations(3) |
| 5632 | .TestF32(); |
| 5633 | } |
| 5634 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5635 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5636 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5637 | DeconvolutionOperatorTester() |
| 5638 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5639 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5640 | .padding(1) |
| 5641 | .kernel_size(3, 3) |
| 5642 | .group_input_channels(23) |
| 5643 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5644 | .input_pixel_stride(28) |
| 5645 | .iterations(3) |
| 5646 | .TestF32(); |
| 5647 | } |
| 5648 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5649 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5650 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5651 | DeconvolutionOperatorTester() |
| 5652 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5653 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5654 | .padding(1) |
| 5655 | .kernel_size(3, 3) |
| 5656 | .group_input_channels(23) |
| 5657 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5658 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 5659 | .iterations(3) |
| 5660 | .TestF32(); |
| 5661 | } |
| 5662 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5663 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5664 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5665 | DeconvolutionOperatorTester() |
| 5666 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5667 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5668 | .padding(1) |
| 5669 | .kernel_size(3, 3) |
| 5670 | .group_input_channels(23) |
| 5671 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5672 | .qmin(128) |
| 5673 | .iterations(3) |
| 5674 | .TestF32(); |
| 5675 | } |
| 5676 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5677 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5678 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5679 | DeconvolutionOperatorTester() |
| 5680 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5681 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5682 | .padding(1) |
| 5683 | .kernel_size(3, 3) |
| 5684 | .group_input_channels(23) |
| 5685 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 5686 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5687 | .iterations(3) |
| 5688 | .TestF32(); |
| 5689 | } |
| 5690 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5691 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5692 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 5693 | DeconvolutionOperatorTester() |
| 5694 | .has_bias(false) |
| 5695 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5696 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 5697 | .padding(1) |
| 5698 | .kernel_size(3, 3) |
| 5699 | .group_input_channels(23) |
| 5700 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5701 | .iterations(3) |
| 5702 | .TestF32(); |
| 5703 | } |
| 5704 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5705 | /**************************** CONV path, grouped, batched ****************************/ |
| 5706 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5707 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5708 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5709 | DeconvolutionOperatorTester() |
| 5710 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5711 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5712 | .padding(1) |
| 5713 | .kernel_size(3, 3) |
| 5714 | .groups(2) |
| 5715 | .group_input_channels(15) |
| 5716 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5717 | .iterations(3) |
| 5718 | .TestF32(); |
| 5719 | } |
| 5720 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5721 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_Kx3) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5722 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5723 | for (size_t kernel_height = 1; kernel_height <= 4; kernel_height *= 2) { |
| 5724 | DeconvolutionOperatorTester() |
| 5725 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5726 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5727 | .padding_width(1) |
| 5728 | .kernel_size(kernel_height, 3) |
| 5729 | .groups(2) |
| 5730 | .group_input_channels(17) |
| 5731 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5732 | .iterations(3) |
| 5733 | .TestF32(); |
| 5734 | } |
| 5735 | } |
| 5736 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5737 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3xK) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5738 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5739 | for (size_t kernel_width = 1; kernel_width <= 4; kernel_width *= 2) { |
| 5740 | DeconvolutionOperatorTester() |
| 5741 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5742 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5743 | .padding_height(1) |
| 5744 | .kernel_size(3, kernel_width) |
| 5745 | .groups(2) |
| 5746 | .group_input_channels(17) |
| 5747 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5748 | .iterations(3) |
| 5749 | .TestF32(); |
| 5750 | } |
| 5751 | } |
| 5752 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5753 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5754 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5755 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 5756 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 5757 | DeconvolutionOperatorTester() |
| 5758 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5759 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5760 | .padding_width(1) |
| 5761 | .padding_top(padding_top) |
| 5762 | .padding_bottom(padding_bottom) |
| 5763 | .kernel_size(3, 3) |
| 5764 | .groups(2) |
| 5765 | .group_input_channels(15) |
| 5766 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5767 | .iterations(1) |
| 5768 | .TestF32(); |
| 5769 | } |
| 5770 | } |
| 5771 | } |
| 5772 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5773 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5774 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5775 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 5776 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 5777 | DeconvolutionOperatorTester() |
| 5778 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5779 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5780 | .padding_height(1) |
| 5781 | .padding_left(padding_left) |
| 5782 | .padding_right(padding_right) |
| 5783 | .kernel_size(3, 3) |
| 5784 | .groups(2) |
| 5785 | .group_input_channels(15) |
| 5786 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5787 | .iterations(1) |
| 5788 | .TestF32(); |
| 5789 | } |
| 5790 | } |
| 5791 | } |
| 5792 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5793 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5794 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5795 | for (size_t adjustment_height = 1; adjustment_height <= 2; adjustment_height++) { |
| 5796 | DeconvolutionOperatorTester() |
| 5797 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5798 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5799 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 5800 | .stride_height(adjustment_height + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5801 | .adjustment_height(adjustment_height) |
| 5802 | .kernel_size(3, 3) |
| 5803 | .groups(2) |
| 5804 | .group_input_channels(15) |
| 5805 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5806 | .iterations(1) |
| 5807 | .TestF32(); |
| 5808 | } |
| 5809 | } |
| 5810 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5811 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5812 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5813 | for (size_t adjustment_width = 1; adjustment_width <= 2; adjustment_width++) { |
| 5814 | DeconvolutionOperatorTester() |
| 5815 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5816 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5817 | .padding(1) |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 5818 | .stride_width(adjustment_width + 1) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5819 | .adjustment_width(adjustment_width) |
| 5820 | .kernel_size(3, 3) |
| 5821 | .groups(2) |
| 5822 | .group_input_channels(15) |
| 5823 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5824 | .iterations(1) |
| 5825 | .TestF32(); |
| 5826 | } |
| 5827 | } |
| 5828 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5829 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5830 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5831 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5832 | DeconvolutionOperatorTester() |
| 5833 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5834 | .input_size(input_height, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5835 | .padding(1) |
| 5836 | .kernel_size(3, 3) |
| 5837 | .groups(2) |
| 5838 | .group_input_channels(15) |
| 5839 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5840 | .iterations(1) |
| 5841 | .TestF32(); |
| 5842 | } |
| 5843 | } |
| 5844 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5845 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5846 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5847 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5848 | DeconvolutionOperatorTester() |
| 5849 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5850 | .input_size(kUnstridedInputHeight, input_width) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5851 | .padding(1) |
| 5852 | .kernel_size(3, 3) |
| 5853 | .groups(2) |
| 5854 | .group_input_channels(15) |
| 5855 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5856 | .iterations(1) |
| 5857 | .TestF32(); |
| 5858 | } |
| 5859 | } |
| 5860 | |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 5861 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_varying_input_height_with_tf_same_padding) { |
| 5862 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 5863 | for (size_t input_height = kUnstridedInputHeight - 2; input_height <= kUnstridedInputHeight + 2; input_height++) { |
| 5864 | DeconvolutionOperatorTester() |
| 5865 | .batch_size(2) |
| 5866 | .input_size(input_height, kUnstridedInputWidth) |
| 5867 | .padding_tf_same(true) |
| 5868 | .kernel_size(3, 3) |
| 5869 | .groups(2) |
| 5870 | .group_input_channels(15) |
| 5871 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5872 | .iterations(1) |
| 5873 | .TestF32(); |
| 5874 | } |
| 5875 | } |
| 5876 | |
| 5877 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_varying_input_width_with_tf_same_padding) { |
| 5878 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 5879 | for (size_t input_width = kUnstridedInputWidth - 2; input_width <= kUnstridedInputWidth + 2; input_width++) { |
| 5880 | DeconvolutionOperatorTester() |
| 5881 | .batch_size(2) |
| 5882 | .input_size(kUnstridedInputHeight, input_width) |
| 5883 | .padding_tf_same(true) |
| 5884 | .kernel_size(3, 3) |
| 5885 | .groups(2) |
| 5886 | .group_input_channels(15) |
| 5887 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5888 | .iterations(1) |
| 5889 | .TestF32(); |
| 5890 | } |
| 5891 | } |
| 5892 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5893 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5894 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5895 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 5896 | DeconvolutionOperatorTester() |
| 5897 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5898 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5899 | .padding(1) |
| 5900 | .kernel_size(3, 3) |
| 5901 | .groups(2) |
| 5902 | .group_input_channels(input_channels) |
| 5903 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5904 | .iterations(1) |
| 5905 | .TestF32(); |
| 5906 | } |
| 5907 | } |
| 5908 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5909 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5910 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5911 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 5912 | DeconvolutionOperatorTester() |
| 5913 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5914 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5915 | .padding(1) |
| 5916 | .kernel_size(3, 3) |
| 5917 | .groups(2) |
| 5918 | .group_input_channels(23) |
| 5919 | .group_output_channels(output_channels) |
| 5920 | .iterations(1) |
| 5921 | .TestF32(); |
| 5922 | } |
| 5923 | } |
| 5924 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5925 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_with_height_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5926 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5927 | for (size_t dilation_height = 2; dilation_height <= 3; dilation_height++) { |
| 5928 | DeconvolutionOperatorTester() |
| 5929 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5930 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5931 | .padding(1) |
| 5932 | .kernel_size(3, 3) |
| 5933 | .dilation_height(dilation_height) |
| 5934 | .groups(2) |
| 5935 | .group_input_channels(23) |
| 5936 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5937 | .iterations(3) |
| 5938 | .TestF32(); |
| 5939 | } |
| 5940 | } |
| 5941 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5942 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_with_width_dilation) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5943 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5944 | for (size_t dilation_width = 2; dilation_width <= 3; dilation_width++) { |
| 5945 | DeconvolutionOperatorTester() |
| 5946 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5947 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5948 | .padding(1) |
| 5949 | .kernel_size(3, 3) |
| 5950 | .dilation_width(dilation_width) |
| 5951 | .groups(2) |
| 5952 | .group_input_channels(23) |
| 5953 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5954 | .iterations(3) |
| 5955 | .TestF32(); |
| 5956 | } |
| 5957 | } |
| 5958 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5959 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_with_height_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5960 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5961 | DeconvolutionOperatorTester() |
| 5962 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5963 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5964 | .padding(1) |
| 5965 | .kernel_size(3, 3) |
| 5966 | .dilation_height(3) |
| 5967 | .stride_width(2) |
| 5968 | .groups(2) |
| 5969 | .group_input_channels(23) |
| 5970 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5971 | .iterations(3) |
| 5972 | .TestF32(); |
| 5973 | } |
| 5974 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5975 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_with_width_dilation_and_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5976 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5977 | DeconvolutionOperatorTester() |
| 5978 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5979 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5980 | .padding(1) |
| 5981 | .kernel_size(3, 3) |
| 5982 | .dilation_width(3) |
| 5983 | .stride_width(2) |
| 5984 | .groups(2) |
| 5985 | .group_input_channels(23) |
| 5986 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 5987 | .iterations(3) |
| 5988 | .TestF32(); |
| 5989 | } |
| 5990 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 5991 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 5992 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5993 | DeconvolutionOperatorTester() |
| 5994 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 5995 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 5996 | .padding(1) |
| 5997 | .kernel_size(3, 3) |
| 5998 | .groups(2) |
| 5999 | .group_input_channels(23) |
| 6000 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6001 | .input_pixel_stride(47) |
| 6002 | .iterations(3) |
| 6003 | .TestF32(); |
| 6004 | } |
| 6005 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6006 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6007 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6008 | DeconvolutionOperatorTester() |
| 6009 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6010 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6011 | .padding(1) |
| 6012 | .kernel_size(3, 3) |
| 6013 | .groups(2) |
| 6014 | .group_input_channels(23) |
| 6015 | .group_output_channels(xnn_params.f32.gemm.nr + 3) |
| 6016 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 6017 | .iterations(3) |
| 6018 | .TestF32(); |
| 6019 | } |
| 6020 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6021 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6022 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6023 | DeconvolutionOperatorTester() |
| 6024 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6025 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6026 | .padding(1) |
| 6027 | .kernel_size(3, 3) |
| 6028 | .groups(2) |
| 6029 | .group_input_channels(23) |
| 6030 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6031 | .qmin(128) |
| 6032 | .iterations(3) |
| 6033 | .TestF32(); |
| 6034 | } |
| 6035 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6036 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6037 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6038 | DeconvolutionOperatorTester() |
| 6039 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6040 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6041 | .padding(1) |
| 6042 | .kernel_size(3, 3) |
| 6043 | .groups(2) |
| 6044 | .group_input_channels(23) |
| 6045 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 6046 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6047 | .iterations(3) |
| 6048 | .TestF32(); |
| 6049 | } |
| 6050 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6051 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6052 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 6053 | DeconvolutionOperatorTester() |
| 6054 | .has_bias(false) |
| 6055 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6056 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 6057 | .padding(1) |
| 6058 | .kernel_size(3, 3) |
| 6059 | .groups(2) |
| 6060 | .group_input_channels(23) |
| 6061 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6062 | .iterations(3) |
| 6063 | .TestF32(); |
| 6064 | } |
| 6065 | |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6066 | /**************************** CONV path, setup ****************************/ |
| 6067 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6068 | TEST(DECONVOLUTION_NHWC_F32, 3x3_setup_changing_batch) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6069 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6070 | DeconvolutionOperatorTester() |
| 6071 | .batch_size(2) |
| 6072 | .next_batch_size(5) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6073 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6074 | .kernel_height(3) |
| 6075 | .kernel_width(5) |
| 6076 | .groups(2) |
| 6077 | .group_input_channels(15) |
| 6078 | .group_output_channels(17) |
| 6079 | .TestSetupF32(); |
| 6080 | } |
| 6081 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6082 | TEST(DECONVOLUTION_NHWC_F32, 3x3_setup_changing_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6083 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6084 | DeconvolutionOperatorTester() |
| 6085 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6086 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
| 6087 | .next_input_height(kUnstridedInputHeight + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6088 | .kernel_height(3) |
| 6089 | .kernel_width(5) |
| 6090 | .groups(2) |
| 6091 | .group_input_channels(15) |
| 6092 | .group_output_channels(17) |
| 6093 | .TestSetupF32(); |
| 6094 | } |
| 6095 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6096 | TEST(DECONVOLUTION_NHWC_F32, 3x3_setup_changing_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6097 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6098 | DeconvolutionOperatorTester() |
| 6099 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6100 | .input_size(kUnstridedInputHeight, kUnstridedInputWidth) |
| 6101 | .next_input_width(kUnstridedInputWidth + 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6102 | .kernel_height(3) |
| 6103 | .kernel_width(5) |
| 6104 | .groups(2) |
| 6105 | .group_input_channels(15) |
| 6106 | .group_output_channels(17) |
| 6107 | .TestSetupF32(); |
| 6108 | } |
| 6109 | |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 6110 | /**************************** SUBCONV2D/IGEMM path ****************************/ |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6111 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6112 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6113 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6114 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6115 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6116 | .padding(1) |
| 6117 | .kernel_size(3, 3) |
| 6118 | .stride(2) |
| 6119 | .group_input_channels(15) |
| 6120 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6121 | .iterations(3) |
| 6122 | .TestF32(); |
| 6123 | } |
| 6124 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6125 | TEST(DECONVOLUTION_NHWC_F32, Kx3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6126 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6127 | for (size_t kernel_height = 2; kernel_height <= 5; kernel_height++) { |
| 6128 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6129 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6130 | .padding_width(1) |
| 6131 | .kernel_size(kernel_height, 3) |
| 6132 | .stride(2) |
| 6133 | .group_input_channels(17) |
| 6134 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6135 | .iterations(3) |
| 6136 | .TestF32(); |
| 6137 | } |
| 6138 | } |
| 6139 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6140 | TEST(DECONVOLUTION_NHWC_F32, 3xKs2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6141 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6142 | for (size_t kernel_width = 2; kernel_width <= 5; kernel_width++) { |
| 6143 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6144 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6145 | .padding_height(1) |
| 6146 | .kernel_size(3, kernel_width) |
| 6147 | .stride(2) |
| 6148 | .group_input_channels(17) |
| 6149 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6150 | .iterations(3) |
| 6151 | .TestF32(); |
| 6152 | } |
| 6153 | } |
| 6154 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6155 | TEST(DECONVOLUTION_NHWC_F32, 3x3sSx1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6156 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6157 | for (size_t stride_height = 2; stride_height <= 3; stride_height++) { |
| 6158 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6159 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6160 | .padding(1) |
| 6161 | .padding_width(1) |
| 6162 | .kernel_size(3, 3) |
| 6163 | .stride_height(stride_height) |
| 6164 | .group_input_channels(17) |
| 6165 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6166 | .iterations(3) |
| 6167 | .TestF32(); |
| 6168 | } |
| 6169 | } |
| 6170 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6171 | TEST(DECONVOLUTION_NHWC_F32, 3x3s1xS) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6172 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6173 | for (size_t stride_width = 2; stride_width <= 3; stride_width++) { |
| 6174 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6175 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6176 | .padding(1) |
| 6177 | .padding_width(1) |
| 6178 | .kernel_size(3, 3) |
| 6179 | .stride_width(stride_width) |
| 6180 | .group_input_channels(17) |
| 6181 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6182 | .iterations(3) |
| 6183 | .TestF32(); |
| 6184 | } |
| 6185 | } |
| 6186 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6187 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6188 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6189 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 6190 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 6191 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6192 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6193 | .padding_width(1) |
| 6194 | .padding_top(padding_top) |
| 6195 | .padding_bottom(padding_bottom) |
| 6196 | .kernel_size(3, 3) |
| 6197 | .stride(2) |
| 6198 | .group_input_channels(15) |
| 6199 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6200 | .iterations(1) |
| 6201 | .TestF32(); |
| 6202 | } |
| 6203 | } |
| 6204 | } |
| 6205 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6206 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6207 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6208 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 6209 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 6210 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6211 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6212 | .padding_height(1) |
| 6213 | .padding_left(padding_left) |
| 6214 | .padding_right(padding_right) |
| 6215 | .kernel_size(3, 3) |
| 6216 | .stride(2) |
| 6217 | .group_input_channels(15) |
| 6218 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6219 | .iterations(1) |
| 6220 | .TestF32(); |
| 6221 | } |
| 6222 | } |
| 6223 | } |
| 6224 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6225 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6226 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 6227 | for (size_t adjustment_height = 0; adjustment_height <= 1; adjustment_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6228 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6229 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6230 | .padding(1) |
| 6231 | .adjustment_height(adjustment_height) |
| 6232 | .kernel_size(3, 3) |
| 6233 | .stride(2) |
| 6234 | .group_input_channels(15) |
| 6235 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6236 | .iterations(1) |
| 6237 | .TestF32(); |
| 6238 | } |
| 6239 | } |
| 6240 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6241 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6242 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 6243 | for (size_t adjustment_width = 0; adjustment_width <= 1; adjustment_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6244 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6245 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6246 | .padding(1) |
| 6247 | .adjustment_width(adjustment_width) |
| 6248 | .kernel_size(3, 3) |
| 6249 | .stride(2) |
| 6250 | .group_input_channels(15) |
| 6251 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6252 | .iterations(1) |
| 6253 | .TestF32(); |
| 6254 | } |
| 6255 | } |
| 6256 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6257 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6258 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6259 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6260 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6261 | .input_size(input_height, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6262 | .padding(1) |
| 6263 | .kernel_size(3, 3) |
| 6264 | .stride(2) |
| 6265 | .group_input_channels(15) |
| 6266 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6267 | .iterations(1) |
| 6268 | .TestF32(); |
| 6269 | } |
| 6270 | } |
| 6271 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6272 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6273 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6274 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6275 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6276 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6277 | .padding(1) |
| 6278 | .kernel_size(3, 3) |
| 6279 | .stride(2) |
| 6280 | .group_input_channels(15) |
| 6281 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6282 | .iterations(1) |
| 6283 | .TestF32(); |
| 6284 | } |
| 6285 | } |
| 6286 | |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 6287 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_varying_input_height_with_tf_same_padding) { |
| 6288 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 6289 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 6290 | DeconvolutionOperatorTester() |
| 6291 | .input_size(input_height, kStridedInputWidth) |
| 6292 | .padding_tf_same(true) |
| 6293 | .kernel_size(3, 3) |
| 6294 | .stride(2) |
| 6295 | .group_input_channels(15) |
| 6296 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6297 | .iterations(1) |
| 6298 | .TestF32(); |
| 6299 | } |
| 6300 | } |
| 6301 | |
| 6302 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_varying_input_width_with_tf_same_padding) { |
| 6303 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 6304 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 6305 | DeconvolutionOperatorTester() |
| 6306 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 6307 | .padding_tf_same(true) |
| 6308 | .kernel_size(3, 3) |
| 6309 | .stride(2) |
| 6310 | .group_input_channels(15) |
| 6311 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6312 | .iterations(1) |
| 6313 | .TestF32(); |
| 6314 | } |
| 6315 | } |
| 6316 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6317 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6318 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6319 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 6320 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6321 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6322 | .padding(1) |
| 6323 | .kernel_size(3, 3) |
| 6324 | .stride(2) |
| 6325 | .group_input_channels(input_channels) |
| 6326 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6327 | .iterations(1) |
| 6328 | .TestF32(); |
| 6329 | } |
| 6330 | } |
| 6331 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6332 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6333 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6334 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 6335 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6336 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6337 | .padding(1) |
| 6338 | .kernel_size(3, 3) |
| 6339 | .stride(2) |
| 6340 | .group_input_channels(23) |
| 6341 | .group_output_channels(output_channels) |
| 6342 | .iterations(1) |
| 6343 | .TestF32(); |
| 6344 | } |
| 6345 | } |
| 6346 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6347 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6348 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6349 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6350 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6351 | .padding(1) |
| 6352 | .kernel_size(3, 3) |
| 6353 | .stride(2) |
| 6354 | .group_input_channels(23) |
| 6355 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6356 | .input_pixel_stride(28) |
| 6357 | .iterations(3) |
| 6358 | .TestF32(); |
| 6359 | } |
| 6360 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6361 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6362 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6363 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6364 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6365 | .padding(1) |
| 6366 | .kernel_size(3, 3) |
| 6367 | .stride(2) |
| 6368 | .group_input_channels(23) |
| 6369 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6370 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 6371 | .iterations(3) |
| 6372 | .TestF32(); |
| 6373 | } |
| 6374 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6375 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6376 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6377 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6378 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6379 | .padding(1) |
| 6380 | .kernel_size(3, 3) |
| 6381 | .stride(2) |
| 6382 | .group_input_channels(23) |
| 6383 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6384 | .qmin(128) |
| 6385 | .iterations(3) |
| 6386 | .TestF32(); |
| 6387 | } |
| 6388 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6389 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6390 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6391 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6392 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6393 | .padding(1) |
| 6394 | .kernel_size(3, 3) |
| 6395 | .stride(2) |
| 6396 | .group_input_channels(23) |
| 6397 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 6398 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6399 | .iterations(3) |
| 6400 | .TestF32(); |
| 6401 | } |
| 6402 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6403 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6404 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 6405 | DeconvolutionOperatorTester() |
| 6406 | .has_bias(false) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6407 | .input_size(kStridedInputHeight, kStridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 6408 | .padding(1) |
| 6409 | .kernel_size(3, 3) |
| 6410 | .stride(2) |
| 6411 | .group_input_channels(23) |
| 6412 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6413 | .iterations(3) |
| 6414 | .TestF32(); |
| 6415 | } |
| 6416 | |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 6417 | /**************************** SUBCONV2D/IGEMM path, grouped ****************************/ |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6418 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6419 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6420 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6421 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6422 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6423 | .padding(1) |
| 6424 | .kernel_size(3, 3) |
| 6425 | .stride(2) |
| 6426 | .groups(2) |
| 6427 | .group_input_channels(17) |
| 6428 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6429 | .iterations(3) |
| 6430 | .TestF32(); |
| 6431 | } |
| 6432 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6433 | TEST(DECONVOLUTION_NHWC_F32, grouped_Kx3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6434 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6435 | for (size_t kernel_height = 2; kernel_height <= 5; kernel_height++) { |
| 6436 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6437 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6438 | .padding_width(1) |
| 6439 | .kernel_size(kernel_height, 3) |
| 6440 | .stride(2) |
| 6441 | .groups(2) |
| 6442 | .group_input_channels(17) |
| 6443 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6444 | .iterations(3) |
| 6445 | .TestF32(); |
| 6446 | } |
| 6447 | } |
| 6448 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6449 | TEST(DECONVOLUTION_NHWC_F32, grouped_3xKs2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6450 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6451 | for (size_t kernel_width = 2; kernel_width <= 5; kernel_width++) { |
| 6452 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6453 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6454 | .padding_height(1) |
| 6455 | .kernel_size(3, kernel_width) |
| 6456 | .stride(2) |
| 6457 | .groups(2) |
| 6458 | .group_input_channels(17) |
| 6459 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6460 | .iterations(3) |
| 6461 | .TestF32(); |
| 6462 | } |
| 6463 | } |
| 6464 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6465 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3sSx1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6466 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6467 | for (size_t stride_height = 2; stride_height <= 3; stride_height++) { |
| 6468 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6469 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6470 | .padding(1) |
| 6471 | .padding_width(1) |
| 6472 | .kernel_size(3, 3) |
| 6473 | .stride_height(stride_height) |
| 6474 | .groups(2) |
| 6475 | .group_input_channels(17) |
| 6476 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6477 | .iterations(3) |
| 6478 | .TestF32(); |
| 6479 | } |
| 6480 | } |
| 6481 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6482 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s1xS) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6483 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6484 | for (size_t stride_width = 2; stride_width <= 3; stride_width++) { |
| 6485 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6486 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6487 | .padding(1) |
| 6488 | .padding_width(1) |
| 6489 | .kernel_size(3, 3) |
| 6490 | .stride_width(stride_width) |
| 6491 | .groups(2) |
| 6492 | .group_input_channels(17) |
| 6493 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6494 | .iterations(3) |
| 6495 | .TestF32(); |
| 6496 | } |
| 6497 | } |
| 6498 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6499 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6500 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6501 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 6502 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 6503 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6504 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6505 | .padding_width(1) |
| 6506 | .padding_top(padding_top) |
| 6507 | .padding_bottom(padding_bottom) |
| 6508 | .kernel_size(3, 3) |
| 6509 | .stride(2) |
| 6510 | .groups(2) |
| 6511 | .group_input_channels(17) |
| 6512 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6513 | .iterations(1) |
| 6514 | .TestF32(); |
| 6515 | } |
| 6516 | } |
| 6517 | } |
| 6518 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6519 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6520 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6521 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 6522 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 6523 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6524 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6525 | .padding_height(1) |
| 6526 | .padding_left(padding_left) |
| 6527 | .padding_right(padding_right) |
| 6528 | .kernel_size(3, 3) |
| 6529 | .stride(2) |
| 6530 | .groups(2) |
| 6531 | .group_input_channels(17) |
| 6532 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6533 | .iterations(1) |
| 6534 | .TestF32(); |
| 6535 | } |
| 6536 | } |
| 6537 | } |
| 6538 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6539 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6540 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 6541 | for (size_t adjustment_height = 0; adjustment_height <= 1; adjustment_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6542 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6543 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6544 | .padding(1) |
| 6545 | .adjustment_height(adjustment_height) |
| 6546 | .kernel_size(3, 3) |
| 6547 | .stride(2) |
| 6548 | .groups(2) |
| 6549 | .group_input_channels(17) |
| 6550 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6551 | .iterations(1) |
| 6552 | .TestF32(); |
| 6553 | } |
| 6554 | } |
| 6555 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6556 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6557 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 6558 | for (size_t adjustment_width = 0; adjustment_width <= 1; adjustment_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6559 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6560 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6561 | .padding(1) |
| 6562 | .adjustment_width(adjustment_width) |
| 6563 | .kernel_size(3, 3) |
| 6564 | .stride(2) |
| 6565 | .groups(2) |
| 6566 | .group_input_channels(17) |
| 6567 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6568 | .iterations(1) |
| 6569 | .TestF32(); |
| 6570 | } |
| 6571 | } |
| 6572 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6573 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6574 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6575 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6576 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6577 | .input_size(input_height, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6578 | .padding(1) |
| 6579 | .kernel_size(3, 3) |
| 6580 | .stride(2) |
| 6581 | .groups(2) |
| 6582 | .group_input_channels(17) |
| 6583 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6584 | .iterations(1) |
| 6585 | .TestF32(); |
| 6586 | } |
| 6587 | } |
| 6588 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6589 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6590 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6591 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6592 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6593 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6594 | .padding(1) |
| 6595 | .kernel_size(3, 3) |
| 6596 | .stride(2) |
| 6597 | .groups(2) |
| 6598 | .group_input_channels(17) |
| 6599 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6600 | .iterations(1) |
| 6601 | .TestF32(); |
| 6602 | } |
| 6603 | } |
| 6604 | |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 6605 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_varying_input_height_with_tf_same_padding) { |
| 6606 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 6607 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 6608 | DeconvolutionOperatorTester() |
| 6609 | .input_size(input_height, kStridedInputWidth) |
| 6610 | .padding_tf_same(true) |
| 6611 | .kernel_size(3, 3) |
| 6612 | .stride(2) |
| 6613 | .groups(2) |
| 6614 | .group_input_channels(17) |
| 6615 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6616 | .iterations(1) |
| 6617 | .TestF32(); |
| 6618 | } |
| 6619 | } |
| 6620 | |
| 6621 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_varying_input_width_with_tf_same_padding) { |
| 6622 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 6623 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 6624 | DeconvolutionOperatorTester() |
| 6625 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 6626 | .padding_tf_same(true) |
| 6627 | .kernel_size(3, 3) |
| 6628 | .stride(2) |
| 6629 | .groups(2) |
| 6630 | .group_input_channels(17) |
| 6631 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6632 | .iterations(1) |
| 6633 | .TestF32(); |
| 6634 | } |
| 6635 | } |
| 6636 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6637 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6638 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6639 | for (size_t input_channels = 14; input_channels <= 20; input_channels++) { |
| 6640 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6641 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6642 | .padding(1) |
| 6643 | .kernel_size(3, 3) |
| 6644 | .stride(2) |
| 6645 | .groups(2) |
| 6646 | .group_input_channels(input_channels) |
| 6647 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6648 | .iterations(1) |
| 6649 | .TestF32(); |
| 6650 | } |
| 6651 | } |
| 6652 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6653 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6654 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6655 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 6656 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6657 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6658 | .padding(1) |
| 6659 | .kernel_size(3, 3) |
| 6660 | .stride(2) |
| 6661 | .groups(2) |
| 6662 | .group_input_channels(17) |
| 6663 | .group_output_channels(output_channels) |
| 6664 | .iterations(1) |
| 6665 | .TestF32(); |
| 6666 | } |
| 6667 | } |
| 6668 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6669 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6670 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6671 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6672 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6673 | .padding(1) |
| 6674 | .kernel_size(3, 3) |
| 6675 | .stride(2) |
| 6676 | .groups(2) |
| 6677 | .group_input_channels(17) |
| 6678 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6679 | .input_pixel_stride(37) |
| 6680 | .iterations(3) |
| 6681 | .TestF32(); |
| 6682 | } |
| 6683 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6684 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6685 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6686 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6687 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6688 | .padding(1) |
| 6689 | .kernel_size(3, 3) |
| 6690 | .stride(2) |
| 6691 | .groups(2) |
| 6692 | .group_input_channels(17) |
| 6693 | .group_output_channels(xnn_params.f32.gemm.nr + 3) |
| 6694 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 6695 | .iterations(3) |
| 6696 | .TestF32(); |
| 6697 | } |
| 6698 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6699 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6700 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6701 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6702 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6703 | .padding(1) |
| 6704 | .kernel_size(3, 3) |
| 6705 | .stride(2) |
| 6706 | .groups(2) |
| 6707 | .group_input_channels(17) |
| 6708 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6709 | .qmin(128) |
| 6710 | .iterations(3) |
| 6711 | .TestF32(); |
| 6712 | } |
| 6713 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6714 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6715 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6716 | DeconvolutionOperatorTester() |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6717 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6718 | .padding(1) |
| 6719 | .kernel_size(3, 3) |
| 6720 | .stride(2) |
| 6721 | .groups(2) |
| 6722 | .group_input_channels(17) |
| 6723 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 6724 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6725 | .iterations(3) |
| 6726 | .TestF32(); |
| 6727 | } |
| 6728 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6729 | TEST(DECONVOLUTION_NHWC_F32, grouped_3x3s2_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6730 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 6731 | DeconvolutionOperatorTester() |
| 6732 | .has_bias(false) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6733 | .input_size(kStridedInputHeight, kStridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 6734 | .padding(1) |
| 6735 | .kernel_size(3, 3) |
| 6736 | .stride(2) |
| 6737 | .groups(2) |
| 6738 | .group_input_channels(17) |
| 6739 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6740 | .iterations(3) |
| 6741 | .TestF32(); |
| 6742 | } |
| 6743 | |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 6744 | /**************************** SUBCONV2D/IGEMM path, batched ****************************/ |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6745 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6746 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6747 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6748 | DeconvolutionOperatorTester() |
| 6749 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6750 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6751 | .padding(1) |
| 6752 | .kernel_size(3, 3) |
| 6753 | .stride(2) |
| 6754 | .group_input_channels(15) |
| 6755 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6756 | .iterations(3) |
| 6757 | .TestF32(); |
| 6758 | } |
| 6759 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6760 | TEST(DECONVOLUTION_NHWC_F32, batched_Kx3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6761 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6762 | for (size_t kernel_height = 2; kernel_height <= 5; kernel_height++) { |
| 6763 | DeconvolutionOperatorTester() |
| 6764 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6765 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6766 | .padding_width(1) |
| 6767 | .kernel_size(kernel_height, 3) |
| 6768 | .stride(2) |
| 6769 | .group_input_channels(17) |
| 6770 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6771 | .iterations(3) |
| 6772 | .TestF32(); |
| 6773 | } |
| 6774 | } |
| 6775 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6776 | TEST(DECONVOLUTION_NHWC_F32, batched_3xKs2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6777 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6778 | for (size_t kernel_width = 2; kernel_width <= 5; kernel_width++) { |
| 6779 | DeconvolutionOperatorTester() |
| 6780 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6781 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6782 | .padding_height(1) |
| 6783 | .kernel_size(3, kernel_width) |
| 6784 | .stride(2) |
| 6785 | .group_input_channels(17) |
| 6786 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6787 | .iterations(3) |
| 6788 | .TestF32(); |
| 6789 | } |
| 6790 | } |
| 6791 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6792 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3sSx1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6793 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6794 | for (size_t stride_height = 2; stride_height <= 3; stride_height++) { |
| 6795 | DeconvolutionOperatorTester() |
| 6796 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6797 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6798 | .padding(1) |
| 6799 | .padding_width(1) |
| 6800 | .kernel_size(3, 3) |
| 6801 | .stride_height(stride_height) |
| 6802 | .group_input_channels(17) |
| 6803 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6804 | .iterations(3) |
| 6805 | .TestF32(); |
| 6806 | } |
| 6807 | } |
| 6808 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6809 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s1xS) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6810 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6811 | for (size_t stride_width = 2; stride_width <= 3; stride_width++) { |
| 6812 | DeconvolutionOperatorTester() |
| 6813 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6814 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6815 | .padding(1) |
| 6816 | .padding_width(1) |
| 6817 | .kernel_size(3, 3) |
| 6818 | .stride_width(stride_width) |
| 6819 | .group_input_channels(17) |
| 6820 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6821 | .iterations(3) |
| 6822 | .TestF32(); |
| 6823 | } |
| 6824 | } |
| 6825 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6826 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6827 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6828 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 6829 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 6830 | DeconvolutionOperatorTester() |
| 6831 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6832 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6833 | .padding_width(1) |
| 6834 | .padding_top(padding_top) |
| 6835 | .padding_bottom(padding_bottom) |
| 6836 | .kernel_size(3, 3) |
| 6837 | .stride(2) |
| 6838 | .group_input_channels(15) |
| 6839 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6840 | .iterations(1) |
| 6841 | .TestF32(); |
| 6842 | } |
| 6843 | } |
| 6844 | } |
| 6845 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6846 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6847 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6848 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 6849 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 6850 | DeconvolutionOperatorTester() |
| 6851 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6852 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6853 | .padding_height(1) |
| 6854 | .padding_left(padding_left) |
| 6855 | .padding_right(padding_right) |
| 6856 | .kernel_size(3, 3) |
| 6857 | .stride(2) |
| 6858 | .group_input_channels(15) |
| 6859 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6860 | .iterations(1) |
| 6861 | .TestF32(); |
| 6862 | } |
| 6863 | } |
| 6864 | } |
| 6865 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6866 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6867 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 6868 | for (size_t adjustment_height = 0; adjustment_height <= 1; adjustment_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6869 | DeconvolutionOperatorTester() |
| 6870 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6871 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6872 | .padding(1) |
| 6873 | .adjustment_height(adjustment_height) |
| 6874 | .kernel_size(3, 3) |
| 6875 | .stride(2) |
| 6876 | .group_input_channels(15) |
| 6877 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6878 | .iterations(1) |
| 6879 | .TestF32(); |
| 6880 | } |
| 6881 | } |
| 6882 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6883 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6884 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 6885 | for (size_t adjustment_width = 0; adjustment_width <= 1; adjustment_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6886 | DeconvolutionOperatorTester() |
| 6887 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6888 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6889 | .padding(1) |
| 6890 | .adjustment_width(adjustment_width) |
| 6891 | .kernel_size(3, 3) |
| 6892 | .stride(2) |
| 6893 | .group_input_channels(15) |
| 6894 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6895 | .iterations(1) |
| 6896 | .TestF32(); |
| 6897 | } |
| 6898 | } |
| 6899 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6900 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6901 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6902 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6903 | DeconvolutionOperatorTester() |
| 6904 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6905 | .input_size(input_height, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6906 | .padding(1) |
| 6907 | .kernel_size(3, 3) |
| 6908 | .stride(2) |
| 6909 | .group_input_channels(15) |
| 6910 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6911 | .iterations(1) |
| 6912 | .TestF32(); |
| 6913 | } |
| 6914 | } |
| 6915 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6916 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6917 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6918 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6919 | DeconvolutionOperatorTester() |
| 6920 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6921 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6922 | .padding(1) |
| 6923 | .kernel_size(3, 3) |
| 6924 | .stride(2) |
| 6925 | .group_input_channels(15) |
| 6926 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6927 | .iterations(1) |
| 6928 | .TestF32(); |
| 6929 | } |
| 6930 | } |
| 6931 | |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 6932 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_varying_input_height_with_tf_same_padding) { |
| 6933 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 6934 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 6935 | DeconvolutionOperatorTester() |
| 6936 | .batch_size(2) |
| 6937 | .input_size(input_height, kStridedInputWidth) |
| 6938 | .padding_tf_same(true) |
| 6939 | .kernel_size(3, 3) |
| 6940 | .stride(2) |
| 6941 | .group_input_channels(15) |
| 6942 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6943 | .iterations(1) |
| 6944 | .TestF32(); |
| 6945 | } |
| 6946 | } |
| 6947 | |
| 6948 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_varying_input_width_with_tf_same_padding) { |
| 6949 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 6950 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 6951 | DeconvolutionOperatorTester() |
| 6952 | .batch_size(2) |
| 6953 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 6954 | .padding_tf_same(true) |
| 6955 | .kernel_size(3, 3) |
| 6956 | .stride(2) |
| 6957 | .group_input_channels(15) |
| 6958 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6959 | .iterations(1) |
| 6960 | .TestF32(); |
| 6961 | } |
| 6962 | } |
| 6963 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6964 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6965 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6966 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 6967 | DeconvolutionOperatorTester() |
| 6968 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6969 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6970 | .padding(1) |
| 6971 | .kernel_size(3, 3) |
| 6972 | .stride(2) |
| 6973 | .group_input_channels(input_channels) |
| 6974 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 6975 | .iterations(1) |
| 6976 | .TestF32(); |
| 6977 | } |
| 6978 | } |
| 6979 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6980 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6981 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6982 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 6983 | DeconvolutionOperatorTester() |
| 6984 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 6985 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6986 | .padding(1) |
| 6987 | .kernel_size(3, 3) |
| 6988 | .stride(2) |
| 6989 | .group_input_channels(23) |
| 6990 | .group_output_channels(output_channels) |
| 6991 | .iterations(1) |
| 6992 | .TestF32(); |
| 6993 | } |
| 6994 | } |
| 6995 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 6996 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 6997 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 6998 | DeconvolutionOperatorTester() |
| 6999 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7000 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7001 | .padding(1) |
| 7002 | .kernel_size(3, 3) |
| 7003 | .stride(2) |
| 7004 | .group_input_channels(23) |
| 7005 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7006 | .input_pixel_stride(28) |
| 7007 | .iterations(3) |
| 7008 | .TestF32(); |
| 7009 | } |
| 7010 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7011 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7012 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7013 | DeconvolutionOperatorTester() |
| 7014 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7015 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7016 | .padding(1) |
| 7017 | .kernel_size(3, 3) |
| 7018 | .stride(2) |
| 7019 | .group_input_channels(23) |
| 7020 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7021 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 7022 | .iterations(3) |
| 7023 | .TestF32(); |
| 7024 | } |
| 7025 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7026 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7027 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7028 | DeconvolutionOperatorTester() |
| 7029 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7030 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7031 | .padding(1) |
| 7032 | .kernel_size(3, 3) |
| 7033 | .stride(2) |
| 7034 | .group_input_channels(23) |
| 7035 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7036 | .qmin(128) |
| 7037 | .iterations(3) |
| 7038 | .TestF32(); |
| 7039 | } |
| 7040 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7041 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7042 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7043 | DeconvolutionOperatorTester() |
| 7044 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7045 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7046 | .padding(1) |
| 7047 | .kernel_size(3, 3) |
| 7048 | .stride(2) |
| 7049 | .group_input_channels(23) |
| 7050 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 7051 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7052 | .iterations(3) |
| 7053 | .TestF32(); |
| 7054 | } |
| 7055 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7056 | TEST(DECONVOLUTION_NHWC_F32, batched_3x3s2_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7057 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 7058 | DeconvolutionOperatorTester() |
| 7059 | .has_bias(false) |
| 7060 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7061 | .input_size(kStridedInputHeight, kStridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 7062 | .padding(1) |
| 7063 | .kernel_size(3, 3) |
| 7064 | .stride(2) |
| 7065 | .group_input_channels(23) |
| 7066 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7067 | .iterations(3) |
| 7068 | .TestF32(); |
| 7069 | } |
| 7070 | |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 7071 | /**************************** SUBCONV2D/IGEMM path, grouped, batched ****************************/ |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7072 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7073 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7074 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7075 | DeconvolutionOperatorTester() |
| 7076 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7077 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7078 | .padding(1) |
| 7079 | .kernel_size(3, 3) |
| 7080 | .stride(2) |
| 7081 | .groups(2) |
| 7082 | .group_input_channels(17) |
| 7083 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7084 | .iterations(3) |
| 7085 | .TestF32(); |
| 7086 | } |
| 7087 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7088 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_Kx3s2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7089 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7090 | for (size_t kernel_height = 2; kernel_height <= 5; kernel_height++) { |
| 7091 | DeconvolutionOperatorTester() |
| 7092 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7093 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7094 | .padding_width(1) |
| 7095 | .kernel_size(kernel_height, 3) |
| 7096 | .stride(2) |
| 7097 | .groups(2) |
| 7098 | .group_input_channels(17) |
| 7099 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7100 | .iterations(3) |
| 7101 | .TestF32(); |
| 7102 | } |
| 7103 | } |
| 7104 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7105 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3xKs2) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7106 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7107 | for (size_t kernel_width = 2; kernel_width <= 5; kernel_width++) { |
| 7108 | DeconvolutionOperatorTester() |
| 7109 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7110 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7111 | .padding_height(1) |
| 7112 | .kernel_size(3, kernel_width) |
| 7113 | .stride(2) |
| 7114 | .groups(2) |
| 7115 | .group_input_channels(17) |
| 7116 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7117 | .iterations(3) |
| 7118 | .TestF32(); |
| 7119 | } |
| 7120 | } |
| 7121 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7122 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3sSx1) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7123 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7124 | for (size_t stride_height = 2; stride_height <= 3; stride_height++) { |
| 7125 | DeconvolutionOperatorTester() |
| 7126 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7127 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7128 | .padding(1) |
| 7129 | .padding_width(1) |
| 7130 | .kernel_size(3, 3) |
| 7131 | .stride_height(stride_height) |
| 7132 | .groups(2) |
| 7133 | .group_input_channels(17) |
| 7134 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7135 | .iterations(3) |
| 7136 | .TestF32(); |
| 7137 | } |
| 7138 | } |
| 7139 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7140 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s1xS) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7141 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7142 | for (size_t stride_width = 2; stride_width <= 3; stride_width++) { |
| 7143 | DeconvolutionOperatorTester() |
| 7144 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7145 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7146 | .padding(1) |
| 7147 | .padding_width(1) |
| 7148 | .kernel_size(3, 3) |
| 7149 | .stride_width(stride_width) |
| 7150 | .groups(2) |
| 7151 | .group_input_channels(17) |
| 7152 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7153 | .iterations(3) |
| 7154 | .TestF32(); |
| 7155 | } |
| 7156 | } |
| 7157 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7158 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_varying_height_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7159 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7160 | for (size_t padding_top = 0; padding_top <= 2; padding_top++) { |
| 7161 | for (size_t padding_bottom = 0; padding_bottom <= 2; padding_bottom++) { |
| 7162 | DeconvolutionOperatorTester() |
| 7163 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7164 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7165 | .padding_width(1) |
| 7166 | .padding_top(padding_top) |
| 7167 | .padding_bottom(padding_bottom) |
| 7168 | .kernel_size(3, 3) |
| 7169 | .stride(2) |
| 7170 | .groups(2) |
| 7171 | .group_input_channels(17) |
| 7172 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7173 | .iterations(1) |
| 7174 | .TestF32(); |
| 7175 | } |
| 7176 | } |
| 7177 | } |
| 7178 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7179 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_varying_width_padding) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7180 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7181 | for (size_t padding_left = 0; padding_left <= 2; padding_left++) { |
| 7182 | for (size_t padding_right = 0; padding_right <= 2; padding_right++) { |
| 7183 | DeconvolutionOperatorTester() |
| 7184 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7185 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7186 | .padding_height(1) |
| 7187 | .padding_left(padding_left) |
| 7188 | .padding_right(padding_right) |
| 7189 | .kernel_size(3, 3) |
| 7190 | .stride(2) |
| 7191 | .groups(2) |
| 7192 | .group_input_channels(17) |
| 7193 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7194 | .iterations(1) |
| 7195 | .TestF32(); |
| 7196 | } |
| 7197 | } |
| 7198 | } |
| 7199 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7200 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_varying_height_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7201 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 7202 | for (size_t adjustment_height = 0; adjustment_height <= 1; adjustment_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7203 | DeconvolutionOperatorTester() |
| 7204 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7205 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7206 | .padding(1) |
| 7207 | .adjustment_height(adjustment_height) |
| 7208 | .kernel_size(3, 3) |
| 7209 | .stride(2) |
| 7210 | .groups(2) |
| 7211 | .group_input_channels(17) |
| 7212 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7213 | .iterations(1) |
| 7214 | .TestF32(); |
| 7215 | } |
| 7216 | } |
| 7217 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7218 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_varying_width_adjustment) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7219 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | 1898b91 | 2019-11-05 12:25:18 -0800 | [diff] [blame] | 7220 | for (size_t adjustment_width = 0; adjustment_width <= 1; adjustment_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7221 | DeconvolutionOperatorTester() |
| 7222 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7223 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7224 | .padding(1) |
| 7225 | .adjustment_width(adjustment_width) |
| 7226 | .kernel_size(3, 3) |
| 7227 | .stride(2) |
| 7228 | .groups(2) |
| 7229 | .group_input_channels(17) |
| 7230 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7231 | .iterations(1) |
| 7232 | .TestF32(); |
| 7233 | } |
| 7234 | } |
| 7235 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7236 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_varying_input_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7237 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7238 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7239 | DeconvolutionOperatorTester() |
| 7240 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7241 | .input_size(input_height, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7242 | .padding(1) |
| 7243 | .kernel_size(3, 3) |
| 7244 | .stride(2) |
| 7245 | .groups(2) |
| 7246 | .group_input_channels(17) |
| 7247 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7248 | .iterations(1) |
| 7249 | .TestF32(); |
| 7250 | } |
| 7251 | } |
| 7252 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7253 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_varying_input_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7254 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7255 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7256 | DeconvolutionOperatorTester() |
| 7257 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7258 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7259 | .padding(1) |
| 7260 | .kernel_size(3, 3) |
| 7261 | .stride(2) |
| 7262 | .groups(2) |
| 7263 | .group_input_channels(17) |
| 7264 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7265 | .iterations(1) |
| 7266 | .TestF32(); |
| 7267 | } |
| 7268 | } |
| 7269 | |
Marat Dukhan | 5871703 | 2020-04-28 15:03:28 -0700 | [diff] [blame] | 7270 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_varying_input_height_with_tf_same_padding) { |
| 7271 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7272 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 7273 | DeconvolutionOperatorTester() |
| 7274 | .batch_size(2) |
| 7275 | .input_size(input_height, kStridedInputWidth) |
| 7276 | .padding_tf_same(true) |
| 7277 | .kernel_size(3, 3) |
| 7278 | .stride(2) |
| 7279 | .groups(2) |
| 7280 | .group_input_channels(17) |
| 7281 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7282 | .iterations(1) |
| 7283 | .TestF32(); |
| 7284 | } |
| 7285 | } |
| 7286 | |
| 7287 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_varying_input_width_with_tf_same_padding) { |
| 7288 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7289 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 7290 | DeconvolutionOperatorTester() |
| 7291 | .batch_size(2) |
| 7292 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7293 | .padding_tf_same(true) |
| 7294 | .kernel_size(3, 3) |
| 7295 | .stride(2) |
| 7296 | .groups(2) |
| 7297 | .group_input_channels(17) |
| 7298 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7299 | .iterations(1) |
| 7300 | .TestF32(); |
| 7301 | } |
| 7302 | } |
| 7303 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7304 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_varying_input_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7305 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7306 | for (size_t input_channels = 14; input_channels <= 20; input_channels++) { |
| 7307 | DeconvolutionOperatorTester() |
| 7308 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7309 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7310 | .padding(1) |
| 7311 | .kernel_size(3, 3) |
| 7312 | .stride(2) |
| 7313 | .groups(2) |
| 7314 | .group_input_channels(input_channels) |
| 7315 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7316 | .iterations(1) |
| 7317 | .TestF32(); |
| 7318 | } |
| 7319 | } |
| 7320 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7321 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_varying_output_channels) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7322 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7323 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 7324 | DeconvolutionOperatorTester() |
| 7325 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7326 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7327 | .padding(1) |
| 7328 | .kernel_size(3, 3) |
| 7329 | .stride(2) |
| 7330 | .groups(2) |
| 7331 | .group_input_channels(17) |
| 7332 | .group_output_channels(output_channels) |
| 7333 | .iterations(1) |
| 7334 | .TestF32(); |
| 7335 | } |
| 7336 | } |
| 7337 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7338 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_with_input_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7339 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7340 | DeconvolutionOperatorTester() |
| 7341 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7342 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7343 | .padding(1) |
| 7344 | .kernel_size(3, 3) |
| 7345 | .stride(2) |
| 7346 | .groups(2) |
| 7347 | .group_input_channels(17) |
| 7348 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7349 | .input_pixel_stride(37) |
| 7350 | .iterations(3) |
| 7351 | .TestF32(); |
| 7352 | } |
| 7353 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7354 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_with_output_stride) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7355 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7356 | DeconvolutionOperatorTester() |
| 7357 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7358 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7359 | .padding(1) |
| 7360 | .kernel_size(3, 3) |
| 7361 | .stride(2) |
| 7362 | .groups(2) |
| 7363 | .group_input_channels(17) |
| 7364 | .group_output_channels(xnn_params.f32.gemm.nr + 3) |
| 7365 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 7366 | .iterations(3) |
| 7367 | .TestF32(); |
| 7368 | } |
| 7369 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7370 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_with_qmin) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7371 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7372 | DeconvolutionOperatorTester() |
| 7373 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7374 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7375 | .padding(1) |
| 7376 | .kernel_size(3, 3) |
| 7377 | .stride(2) |
| 7378 | .groups(2) |
| 7379 | .group_input_channels(17) |
| 7380 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7381 | .qmin(128) |
| 7382 | .iterations(3) |
| 7383 | .TestF32(); |
| 7384 | } |
| 7385 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7386 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_with_qmax) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7387 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7388 | DeconvolutionOperatorTester() |
| 7389 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7390 | .input_size(kStridedInputHeight, kStridedInputWidth) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7391 | .padding(1) |
| 7392 | .kernel_size(3, 3) |
| 7393 | .stride(2) |
| 7394 | .groups(2) |
| 7395 | .group_input_channels(17) |
| 7396 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
Marat Dukhan | ab7424a | 2019-10-30 10:09:50 -0700 | [diff] [blame] | 7397 | .qmax(128) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7398 | .iterations(3) |
| 7399 | .TestF32(); |
| 7400 | } |
| 7401 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7402 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_3x3s2_without_bias) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7403 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 7404 | DeconvolutionOperatorTester() |
| 7405 | .has_bias(false) |
| 7406 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7407 | .input_size(kStridedInputHeight, kStridedInputWidth) |
Marat Dukhan | f568f08 | 2019-10-30 09:47:07 -0700 | [diff] [blame] | 7408 | .padding(1) |
| 7409 | .kernel_size(3, 3) |
| 7410 | .stride(2) |
| 7411 | .groups(2) |
| 7412 | .group_input_channels(17) |
| 7413 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7414 | .iterations(3) |
| 7415 | .TestF32(); |
| 7416 | } |
| 7417 | |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 7418 | /**************************** SUBCONV2D/IGEMM path, setup ****************************/ |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7419 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7420 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_setup_changing_batch) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7421 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7422 | DeconvolutionOperatorTester() |
| 7423 | .batch_size(2) |
| 7424 | .next_batch_size(5) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7425 | .input_size(kStridedInputHeight, kStridedInputWidth) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 7426 | .kernel_size(3, 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7427 | .stride(2) |
| 7428 | .groups(2) |
| 7429 | .group_input_channels(15) |
| 7430 | .group_output_channels(17) |
| 7431 | .TestSetupF32(); |
| 7432 | } |
| 7433 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7434 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_setup_changing_height) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7435 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7436 | DeconvolutionOperatorTester() |
| 7437 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7438 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7439 | .next_input_height(kStridedInputHeight + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 7440 | .kernel_size(3, 3) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7441 | .stride(2) |
| 7442 | .groups(2) |
| 7443 | .group_input_channels(15) |
| 7444 | .group_output_channels(17) |
| 7445 | .TestSetupF32(); |
| 7446 | } |
| 7447 | |
Marat Dukhan | efc47b8 | 2019-11-18 09:25:38 -0800 | [diff] [blame] | 7448 | TEST(DECONVOLUTION_NHWC_F32, 3x3s2_setup_changing_width) { |
Marat Dukhan | 04f03be | 2019-11-19 12:36:47 -0800 | [diff] [blame] | 7449 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 7450 | DeconvolutionOperatorTester() |
| 7451 | .batch_size(2) |
Marat Dukhan | a41533d | 2019-11-04 10:40:51 -0800 | [diff] [blame] | 7452 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7453 | .next_input_width(kStridedInputWidth + 3) |
Marat Dukhan | 2995427 | 2020-02-13 17:56:11 -0800 | [diff] [blame] | 7454 | .kernel_size(3, 3) |
| 7455 | .stride(2) |
| 7456 | .groups(2) |
| 7457 | .group_input_channels(15) |
| 7458 | .group_output_channels(17) |
| 7459 | .TestSetupF32(); |
| 7460 | } |
| 7461 | |
| 7462 | /**************************** SUBCONV2D/GEMM path ****************************/ |
| 7463 | |
| 7464 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2) { |
| 7465 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7466 | DeconvolutionOperatorTester() |
| 7467 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7468 | .kernel_size(2, 2) |
| 7469 | .stride(2) |
| 7470 | .group_input_channels(15) |
| 7471 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7472 | .iterations(3) |
| 7473 | .TestF32(); |
| 7474 | } |
| 7475 | |
| 7476 | TEST(DECONVOLUTION_NHWC_F32, Kx2sKx2) { |
| 7477 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7478 | for (size_t kernel_height = 3; kernel_height <= 5; kernel_height++) { |
| 7479 | DeconvolutionOperatorTester() |
| 7480 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7481 | .kernel_size(kernel_height, 2) |
| 7482 | .stride(kernel_height, 2) |
| 7483 | .group_input_channels(17) |
| 7484 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7485 | .iterations(3) |
| 7486 | .TestF32(); |
| 7487 | } |
| 7488 | } |
| 7489 | |
| 7490 | TEST(DECONVOLUTION_NHWC_F32, 2xKs2xK) { |
| 7491 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7492 | for (size_t kernel_width = 3; kernel_width <= 5; kernel_width++) { |
| 7493 | DeconvolutionOperatorTester() |
| 7494 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7495 | .kernel_size(2, kernel_width) |
| 7496 | .stride(2, kernel_width) |
| 7497 | .group_input_channels(17) |
| 7498 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7499 | .iterations(3) |
| 7500 | .TestF32(); |
| 7501 | } |
| 7502 | } |
| 7503 | |
| 7504 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2_height_adjustment) { |
| 7505 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7506 | DeconvolutionOperatorTester() |
| 7507 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7508 | .adjustment_height(1) |
| 7509 | .kernel_size(2, 2) |
| 7510 | .stride(2) |
| 7511 | .group_input_channels(15) |
| 7512 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7513 | .iterations(1) |
| 7514 | .TestF32(); |
| 7515 | } |
| 7516 | |
| 7517 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2_width_adjustment) { |
| 7518 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7519 | DeconvolutionOperatorTester() |
| 7520 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7521 | .adjustment_width(1) |
| 7522 | .kernel_size(2, 2) |
| 7523 | .stride(2) |
| 7524 | .group_input_channels(15) |
| 7525 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7526 | .iterations(1) |
| 7527 | .TestF32(); |
| 7528 | } |
| 7529 | |
| 7530 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2_varying_input_height) { |
| 7531 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7532 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 7533 | DeconvolutionOperatorTester() |
| 7534 | .input_size(input_height, kStridedInputWidth) |
| 7535 | .kernel_size(2, 2) |
| 7536 | .stride(2) |
| 7537 | .group_input_channels(15) |
| 7538 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7539 | .iterations(1) |
| 7540 | .TestF32(); |
| 7541 | } |
| 7542 | } |
| 7543 | |
| 7544 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2_varying_input_width) { |
| 7545 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7546 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 7547 | DeconvolutionOperatorTester() |
| 7548 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7549 | .kernel_size(2, 2) |
| 7550 | .stride(2) |
| 7551 | .group_input_channels(15) |
| 7552 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7553 | .iterations(1) |
| 7554 | .TestF32(); |
| 7555 | } |
| 7556 | } |
| 7557 | |
| 7558 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2_varying_input_channels) { |
| 7559 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7560 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 7561 | DeconvolutionOperatorTester() |
| 7562 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7563 | .kernel_size(2, 2) |
| 7564 | .stride(2) |
| 7565 | .group_input_channels(input_channels) |
| 7566 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7567 | .iterations(1) |
| 7568 | .TestF32(); |
| 7569 | } |
| 7570 | } |
| 7571 | |
| 7572 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2_varying_output_channels) { |
| 7573 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7574 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 7575 | DeconvolutionOperatorTester() |
| 7576 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7577 | .kernel_size(2, 2) |
| 7578 | .stride(2) |
| 7579 | .group_input_channels(23) |
| 7580 | .group_output_channels(output_channels) |
| 7581 | .iterations(1) |
| 7582 | .TestF32(); |
| 7583 | } |
| 7584 | } |
| 7585 | |
| 7586 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2_with_input_stride) { |
| 7587 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7588 | DeconvolutionOperatorTester() |
| 7589 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7590 | .kernel_size(2, 2) |
| 7591 | .stride(2) |
| 7592 | .group_input_channels(23) |
| 7593 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7594 | .input_pixel_stride(28) |
| 7595 | .iterations(3) |
| 7596 | .TestF32(); |
| 7597 | } |
| 7598 | |
| 7599 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2_with_output_stride) { |
| 7600 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7601 | DeconvolutionOperatorTester() |
| 7602 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7603 | .kernel_size(2, 2) |
| 7604 | .stride(2) |
| 7605 | .group_input_channels(23) |
| 7606 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7607 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 7608 | .iterations(3) |
| 7609 | .TestF32(); |
| 7610 | } |
| 7611 | |
| 7612 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2_with_qmin) { |
| 7613 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7614 | DeconvolutionOperatorTester() |
| 7615 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7616 | .kernel_size(2, 2) |
| 7617 | .stride(2) |
| 7618 | .group_input_channels(23) |
| 7619 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7620 | .qmin(128) |
| 7621 | .iterations(3) |
| 7622 | .TestF32(); |
| 7623 | } |
| 7624 | |
| 7625 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2_with_qmax) { |
| 7626 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7627 | DeconvolutionOperatorTester() |
| 7628 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7629 | .kernel_size(2, 2) |
| 7630 | .stride(2) |
| 7631 | .group_input_channels(23) |
| 7632 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7633 | .qmax(128) |
| 7634 | .iterations(3) |
| 7635 | .TestF32(); |
| 7636 | } |
| 7637 | |
| 7638 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2_without_bias) { |
| 7639 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7640 | DeconvolutionOperatorTester() |
| 7641 | .has_bias(false) |
| 7642 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7643 | .kernel_size(2, 2) |
| 7644 | .stride(2) |
| 7645 | .group_input_channels(23) |
| 7646 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7647 | .iterations(3) |
| 7648 | .TestF32(); |
| 7649 | } |
| 7650 | |
| 7651 | /**************************** SUBCONV2D/GEMM path, grouped ****************************/ |
| 7652 | |
| 7653 | TEST(DECONVOLUTION_NHWC_F32, grouped_2x2s2) { |
| 7654 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7655 | DeconvolutionOperatorTester() |
| 7656 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7657 | .kernel_size(2, 2) |
| 7658 | .stride(2) |
| 7659 | .groups(2) |
| 7660 | .group_input_channels(17) |
| 7661 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7662 | .iterations(3) |
| 7663 | .TestF32(); |
| 7664 | } |
| 7665 | |
| 7666 | TEST(DECONVOLUTION_NHWC_F32, grouped_Kx2sKx2) { |
| 7667 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7668 | for (size_t kernel_height = 3; kernel_height <= 5; kernel_height++) { |
| 7669 | DeconvolutionOperatorTester() |
| 7670 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7671 | .kernel_size(kernel_height, 2) |
| 7672 | .stride(kernel_height, 2) |
| 7673 | .groups(2) |
| 7674 | .group_input_channels(17) |
| 7675 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7676 | .iterations(3) |
| 7677 | .TestF32(); |
| 7678 | } |
| 7679 | } |
| 7680 | |
| 7681 | TEST(DECONVOLUTION_NHWC_F32, grouped_2xKs2xK) { |
| 7682 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7683 | for (size_t kernel_width = 3; kernel_width <= 5; kernel_width++) { |
| 7684 | DeconvolutionOperatorTester() |
| 7685 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7686 | .kernel_size(2, kernel_width) |
| 7687 | .stride(2, kernel_width) |
| 7688 | .groups(2) |
| 7689 | .group_input_channels(17) |
| 7690 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7691 | .iterations(3) |
| 7692 | .TestF32(); |
| 7693 | } |
| 7694 | } |
| 7695 | |
| 7696 | TEST(DECONVOLUTION_NHWC_F32, grouped_2x2s2_height_adjustment) { |
| 7697 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7698 | DeconvolutionOperatorTester() |
| 7699 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7700 | .adjustment_height(1) |
| 7701 | .kernel_size(2, 2) |
| 7702 | .stride(2) |
| 7703 | .groups(2) |
| 7704 | .group_input_channels(17) |
| 7705 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7706 | .iterations(1) |
| 7707 | .TestF32(); |
| 7708 | } |
| 7709 | |
| 7710 | TEST(DECONVOLUTION_NHWC_F32, grouped_2x2s2_width_adjustment) { |
| 7711 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7712 | DeconvolutionOperatorTester() |
| 7713 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7714 | .adjustment_width(1) |
| 7715 | .kernel_size(2, 2) |
| 7716 | .stride(2) |
| 7717 | .groups(2) |
| 7718 | .group_input_channels(17) |
| 7719 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7720 | .iterations(1) |
| 7721 | .TestF32(); |
| 7722 | } |
| 7723 | |
| 7724 | TEST(DECONVOLUTION_NHWC_F32, grouped_2x2s2_varying_input_height) { |
| 7725 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7726 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 7727 | DeconvolutionOperatorTester() |
| 7728 | .input_size(input_height, kStridedInputWidth) |
| 7729 | .kernel_size(2, 2) |
| 7730 | .stride(2) |
| 7731 | .groups(2) |
| 7732 | .group_input_channels(17) |
| 7733 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7734 | .iterations(1) |
| 7735 | .TestF32(); |
| 7736 | } |
| 7737 | } |
| 7738 | |
| 7739 | TEST(DECONVOLUTION_NHWC_F32, grouped_2x2s2_varying_input_width) { |
| 7740 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7741 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 7742 | DeconvolutionOperatorTester() |
| 7743 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7744 | .kernel_size(2, 2) |
| 7745 | .stride(2) |
| 7746 | .groups(2) |
| 7747 | .group_input_channels(17) |
| 7748 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7749 | .iterations(1) |
| 7750 | .TestF32(); |
| 7751 | } |
| 7752 | } |
| 7753 | |
| 7754 | TEST(DECONVOLUTION_NHWC_F32, grouped_2x2s2_varying_input_channels) { |
| 7755 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7756 | for (size_t input_channels = 14; input_channels <= 20; input_channels++) { |
| 7757 | DeconvolutionOperatorTester() |
| 7758 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7759 | .kernel_size(2, 2) |
| 7760 | .stride(2) |
| 7761 | .groups(2) |
| 7762 | .group_input_channels(input_channels) |
| 7763 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7764 | .iterations(1) |
| 7765 | .TestF32(); |
| 7766 | } |
| 7767 | } |
| 7768 | |
| 7769 | TEST(DECONVOLUTION_NHWC_F32, grouped_2x2s2_varying_output_channels) { |
| 7770 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7771 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 7772 | DeconvolutionOperatorTester() |
| 7773 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7774 | .kernel_size(2, 2) |
| 7775 | .stride(2) |
| 7776 | .groups(2) |
| 7777 | .group_input_channels(17) |
| 7778 | .group_output_channels(output_channels) |
| 7779 | .iterations(1) |
| 7780 | .TestF32(); |
| 7781 | } |
| 7782 | } |
| 7783 | |
| 7784 | TEST(DECONVOLUTION_NHWC_F32, grouped_2x2s2_with_input_stride) { |
| 7785 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7786 | DeconvolutionOperatorTester() |
| 7787 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7788 | .kernel_size(2, 2) |
| 7789 | .stride(2) |
| 7790 | .groups(2) |
| 7791 | .group_input_channels(17) |
| 7792 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7793 | .input_pixel_stride(37) |
| 7794 | .iterations(3) |
| 7795 | .TestF32(); |
| 7796 | } |
| 7797 | |
| 7798 | TEST(DECONVOLUTION_NHWC_F32, grouped_2x2s2_with_output_stride) { |
| 7799 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7800 | DeconvolutionOperatorTester() |
| 7801 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7802 | .kernel_size(2, 2) |
| 7803 | .stride(2) |
| 7804 | .groups(2) |
| 7805 | .group_input_channels(17) |
| 7806 | .group_output_channels(xnn_params.f32.gemm.nr + 3) |
| 7807 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 7808 | .iterations(3) |
| 7809 | .TestF32(); |
| 7810 | } |
| 7811 | |
| 7812 | TEST(DECONVOLUTION_NHWC_F32, grouped_2x2s2_with_qmin) { |
| 7813 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7814 | DeconvolutionOperatorTester() |
| 7815 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7816 | .kernel_size(2, 2) |
| 7817 | .stride(2) |
| 7818 | .groups(2) |
| 7819 | .group_input_channels(17) |
| 7820 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7821 | .qmin(128) |
| 7822 | .iterations(3) |
| 7823 | .TestF32(); |
| 7824 | } |
| 7825 | |
| 7826 | TEST(DECONVOLUTION_NHWC_F32, grouped_2x2s2_with_qmax) { |
| 7827 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7828 | DeconvolutionOperatorTester() |
| 7829 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7830 | .kernel_size(2, 2) |
| 7831 | .stride(2) |
| 7832 | .groups(2) |
| 7833 | .group_input_channels(17) |
| 7834 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7835 | .qmax(128) |
| 7836 | .iterations(3) |
| 7837 | .TestF32(); |
| 7838 | } |
| 7839 | |
| 7840 | TEST(DECONVOLUTION_NHWC_F32, grouped_2x2s2_without_bias) { |
| 7841 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7842 | DeconvolutionOperatorTester() |
| 7843 | .has_bias(false) |
| 7844 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7845 | .kernel_size(2, 2) |
| 7846 | .stride(2) |
| 7847 | .groups(2) |
| 7848 | .group_input_channels(17) |
| 7849 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7850 | .iterations(3) |
| 7851 | .TestF32(); |
| 7852 | } |
| 7853 | |
| 7854 | /**************************** SUBCONV2D/GEMM path, batched ****************************/ |
| 7855 | |
| 7856 | TEST(DECONVOLUTION_NHWC_F32, batched_2x2s2) { |
| 7857 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7858 | DeconvolutionOperatorTester() |
| 7859 | .batch_size(2) |
| 7860 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7861 | .kernel_size(2, 2) |
| 7862 | .stride(2) |
| 7863 | .group_input_channels(15) |
| 7864 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7865 | .iterations(3) |
| 7866 | .TestF32(); |
| 7867 | } |
| 7868 | |
| 7869 | TEST(DECONVOLUTION_NHWC_F32, batched_Kx2sKx2) { |
| 7870 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7871 | for (size_t kernel_height = 3; kernel_height <= 5; kernel_height++) { |
| 7872 | DeconvolutionOperatorTester() |
| 7873 | .batch_size(2) |
| 7874 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7875 | .kernel_size(kernel_height, 2) |
| 7876 | .stride(kernel_height, 2) |
| 7877 | .group_input_channels(17) |
| 7878 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7879 | .iterations(3) |
| 7880 | .TestF32(); |
| 7881 | } |
| 7882 | } |
| 7883 | |
| 7884 | TEST(DECONVOLUTION_NHWC_F32, batched_2xKs2xK) { |
| 7885 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7886 | for (size_t kernel_width = 3; kernel_width <= 5; kernel_width++) { |
| 7887 | DeconvolutionOperatorTester() |
| 7888 | .batch_size(2) |
| 7889 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7890 | .kernel_size(2, kernel_width) |
| 7891 | .stride(2, kernel_width) |
| 7892 | .group_input_channels(17) |
| 7893 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7894 | .iterations(3) |
| 7895 | .TestF32(); |
| 7896 | } |
| 7897 | } |
| 7898 | |
| 7899 | TEST(DECONVOLUTION_NHWC_F32, batched_2x2s2_height_adjustment) { |
| 7900 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7901 | DeconvolutionOperatorTester() |
| 7902 | .batch_size(2) |
| 7903 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7904 | .adjustment_height(1) |
| 7905 | .kernel_size(2, 2) |
| 7906 | .stride(2) |
| 7907 | .group_input_channels(15) |
| 7908 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7909 | .iterations(1) |
| 7910 | .TestF32(); |
| 7911 | } |
| 7912 | |
| 7913 | TEST(DECONVOLUTION_NHWC_F32, batched_2x2s2_width_adjustment) { |
| 7914 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7915 | DeconvolutionOperatorTester() |
| 7916 | .batch_size(2) |
| 7917 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7918 | .adjustment_width(1) |
| 7919 | .kernel_size(2, 2) |
| 7920 | .stride(2) |
| 7921 | .group_input_channels(15) |
| 7922 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7923 | .iterations(1) |
| 7924 | .TestF32(); |
| 7925 | } |
| 7926 | |
| 7927 | TEST(DECONVOLUTION_NHWC_F32, batched_2x2s2_varying_input_height) { |
| 7928 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7929 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 7930 | DeconvolutionOperatorTester() |
| 7931 | .batch_size(2) |
| 7932 | .input_size(input_height, kStridedInputWidth) |
| 7933 | .kernel_size(2, 2) |
| 7934 | .stride(2) |
| 7935 | .group_input_channels(15) |
| 7936 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7937 | .iterations(1) |
| 7938 | .TestF32(); |
| 7939 | } |
| 7940 | } |
| 7941 | |
| 7942 | TEST(DECONVOLUTION_NHWC_F32, batched_2x2s2_varying_input_width) { |
| 7943 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7944 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 7945 | DeconvolutionOperatorTester() |
| 7946 | .batch_size(2) |
| 7947 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7948 | .kernel_size(2, 2) |
| 7949 | .stride(2) |
| 7950 | .group_input_channels(15) |
| 7951 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7952 | .iterations(1) |
| 7953 | .TestF32(); |
| 7954 | } |
| 7955 | } |
| 7956 | |
| 7957 | TEST(DECONVOLUTION_NHWC_F32, batched_2x2s2_varying_input_channels) { |
| 7958 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7959 | for (size_t input_channels = 1; input_channels <= 16; input_channels *= 4) { |
| 7960 | DeconvolutionOperatorTester() |
| 7961 | .batch_size(2) |
| 7962 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7963 | .kernel_size(2, 2) |
| 7964 | .stride(2) |
| 7965 | .group_input_channels(input_channels) |
| 7966 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7967 | .iterations(1) |
| 7968 | .TestF32(); |
| 7969 | } |
| 7970 | } |
| 7971 | |
| 7972 | TEST(DECONVOLUTION_NHWC_F32, batched_2x2s2_varying_output_channels) { |
| 7973 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7974 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 7975 | DeconvolutionOperatorTester() |
| 7976 | .batch_size(2) |
| 7977 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7978 | .kernel_size(2, 2) |
| 7979 | .stride(2) |
| 7980 | .group_input_channels(23) |
| 7981 | .group_output_channels(output_channels) |
| 7982 | .iterations(1) |
| 7983 | .TestF32(); |
| 7984 | } |
| 7985 | } |
| 7986 | |
| 7987 | TEST(DECONVOLUTION_NHWC_F32, batched_2x2s2_with_input_stride) { |
| 7988 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 7989 | DeconvolutionOperatorTester() |
| 7990 | .batch_size(2) |
| 7991 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 7992 | .kernel_size(2, 2) |
| 7993 | .stride(2) |
| 7994 | .group_input_channels(23) |
| 7995 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 7996 | .input_pixel_stride(28) |
| 7997 | .iterations(3) |
| 7998 | .TestF32(); |
| 7999 | } |
| 8000 | |
| 8001 | TEST(DECONVOLUTION_NHWC_F32, batched_2x2s2_with_output_stride) { |
| 8002 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8003 | DeconvolutionOperatorTester() |
| 8004 | .batch_size(2) |
| 8005 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8006 | .kernel_size(2, 2) |
| 8007 | .stride(2) |
| 8008 | .group_input_channels(23) |
| 8009 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8010 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 8011 | .iterations(3) |
| 8012 | .TestF32(); |
| 8013 | } |
| 8014 | |
| 8015 | TEST(DECONVOLUTION_NHWC_F32, batched_2x2s2_with_qmin) { |
| 8016 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8017 | DeconvolutionOperatorTester() |
| 8018 | .batch_size(2) |
| 8019 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8020 | .kernel_size(2, 2) |
| 8021 | .stride(2) |
| 8022 | .group_input_channels(23) |
| 8023 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8024 | .qmin(128) |
| 8025 | .iterations(3) |
| 8026 | .TestF32(); |
| 8027 | } |
| 8028 | |
| 8029 | TEST(DECONVOLUTION_NHWC_F32, batched_2x2s2_with_qmax) { |
| 8030 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8031 | DeconvolutionOperatorTester() |
| 8032 | .batch_size(2) |
| 8033 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8034 | .kernel_size(2, 2) |
| 8035 | .stride(2) |
| 8036 | .group_input_channels(23) |
| 8037 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8038 | .qmax(128) |
| 8039 | .iterations(3) |
| 8040 | .TestF32(); |
| 8041 | } |
| 8042 | |
| 8043 | TEST(DECONVOLUTION_NHWC_F32, batched_2x2s2_without_bias) { |
| 8044 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8045 | DeconvolutionOperatorTester() |
| 8046 | .has_bias(false) |
| 8047 | .batch_size(2) |
| 8048 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8049 | .kernel_size(2, 2) |
| 8050 | .stride(2) |
| 8051 | .group_input_channels(23) |
| 8052 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8053 | .iterations(3) |
| 8054 | .TestF32(); |
| 8055 | } |
| 8056 | |
| 8057 | /**************************** SUBCONV2D/GEMM path, grouped, batched ****************************/ |
| 8058 | |
| 8059 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_2x2s2) { |
| 8060 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8061 | DeconvolutionOperatorTester() |
| 8062 | .batch_size(2) |
| 8063 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8064 | .kernel_size(2, 2) |
| 8065 | .stride(2) |
| 8066 | .groups(2) |
| 8067 | .group_input_channels(17) |
| 8068 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8069 | .iterations(3) |
| 8070 | .TestF32(); |
| 8071 | } |
| 8072 | |
| 8073 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_Kx2sKx2) { |
| 8074 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8075 | for (size_t kernel_height = 3; kernel_height <= 5; kernel_height++) { |
| 8076 | DeconvolutionOperatorTester() |
| 8077 | .batch_size(2) |
| 8078 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8079 | .kernel_size(kernel_height, 2) |
| 8080 | .stride(kernel_height, 2) |
| 8081 | .groups(2) |
| 8082 | .group_input_channels(17) |
| 8083 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8084 | .iterations(3) |
| 8085 | .TestF32(); |
| 8086 | } |
| 8087 | } |
| 8088 | |
| 8089 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_2xKs2xK) { |
| 8090 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8091 | for (size_t kernel_width = 3; kernel_width <= 5; kernel_width++) { |
| 8092 | DeconvolutionOperatorTester() |
| 8093 | .batch_size(2) |
| 8094 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8095 | .kernel_size(2, kernel_width) |
| 8096 | .stride(2, kernel_width) |
| 8097 | .groups(2) |
| 8098 | .group_input_channels(17) |
| 8099 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8100 | .iterations(3) |
| 8101 | .TestF32(); |
| 8102 | } |
| 8103 | } |
| 8104 | |
| 8105 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_2x2s2_height_adjustment) { |
| 8106 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8107 | DeconvolutionOperatorTester() |
| 8108 | .batch_size(2) |
| 8109 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8110 | .adjustment_height(1) |
| 8111 | .kernel_size(2, 2) |
| 8112 | .stride(2) |
| 8113 | .groups(2) |
| 8114 | .group_input_channels(17) |
| 8115 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8116 | .iterations(1) |
| 8117 | .TestF32(); |
| 8118 | } |
| 8119 | |
| 8120 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_2x2s2_width_adjustment) { |
| 8121 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8122 | DeconvolutionOperatorTester() |
| 8123 | .batch_size(2) |
| 8124 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8125 | .adjustment_width(1) |
| 8126 | .kernel_size(2, 2) |
| 8127 | .stride(2) |
| 8128 | .groups(2) |
| 8129 | .group_input_channels(17) |
| 8130 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8131 | .iterations(1) |
| 8132 | .TestF32(); |
| 8133 | } |
| 8134 | |
| 8135 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_2x2s2_varying_input_height) { |
| 8136 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8137 | for (size_t input_height = kStridedInputHeight - 2; input_height <= kStridedInputHeight + 2; input_height++) { |
| 8138 | DeconvolutionOperatorTester() |
| 8139 | .batch_size(2) |
| 8140 | .input_size(input_height, kStridedInputWidth) |
| 8141 | .kernel_size(2, 2) |
| 8142 | .stride(2) |
| 8143 | .groups(2) |
| 8144 | .group_input_channels(17) |
| 8145 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8146 | .iterations(1) |
| 8147 | .TestF32(); |
| 8148 | } |
| 8149 | } |
| 8150 | |
| 8151 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_2x2s2_varying_input_width) { |
| 8152 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8153 | for (size_t input_width = kStridedInputWidth - 2; input_width <= kStridedInputWidth + 2; input_width++) { |
| 8154 | DeconvolutionOperatorTester() |
| 8155 | .batch_size(2) |
| 8156 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8157 | .kernel_size(2, 2) |
| 8158 | .stride(2) |
| 8159 | .groups(2) |
| 8160 | .group_input_channels(17) |
| 8161 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8162 | .iterations(1) |
| 8163 | .TestF32(); |
| 8164 | } |
| 8165 | } |
| 8166 | |
| 8167 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_2x2s2_varying_input_channels) { |
| 8168 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8169 | for (size_t input_channels = 14; input_channels <= 20; input_channels++) { |
| 8170 | DeconvolutionOperatorTester() |
| 8171 | .batch_size(2) |
| 8172 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8173 | .kernel_size(2, 2) |
| 8174 | .stride(2) |
| 8175 | .groups(2) |
| 8176 | .group_input_channels(input_channels) |
| 8177 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8178 | .iterations(1) |
| 8179 | .TestF32(); |
| 8180 | } |
| 8181 | } |
| 8182 | |
| 8183 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_2x2s2_varying_output_channels) { |
| 8184 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8185 | for (size_t output_channels = 1; output_channels <= xnn_params.f32.gemm.nr * 2; output_channels *= 2) { |
| 8186 | DeconvolutionOperatorTester() |
| 8187 | .batch_size(2) |
| 8188 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8189 | .kernel_size(2, 2) |
| 8190 | .stride(2) |
| 8191 | .groups(2) |
| 8192 | .group_input_channels(17) |
| 8193 | .group_output_channels(output_channels) |
| 8194 | .iterations(1) |
| 8195 | .TestF32(); |
| 8196 | } |
| 8197 | } |
| 8198 | |
| 8199 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_2x2s2_with_input_stride) { |
| 8200 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8201 | DeconvolutionOperatorTester() |
| 8202 | .batch_size(2) |
| 8203 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8204 | .kernel_size(2, 2) |
| 8205 | .stride(2) |
| 8206 | .groups(2) |
| 8207 | .group_input_channels(17) |
| 8208 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8209 | .input_pixel_stride(37) |
| 8210 | .iterations(3) |
| 8211 | .TestF32(); |
| 8212 | } |
| 8213 | |
| 8214 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_2x2s2_with_output_stride) { |
| 8215 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8216 | DeconvolutionOperatorTester() |
| 8217 | .batch_size(2) |
| 8218 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8219 | .kernel_size(2, 2) |
| 8220 | .stride(2) |
| 8221 | .groups(2) |
| 8222 | .group_input_channels(17) |
| 8223 | .group_output_channels(xnn_params.f32.gemm.nr + 3) |
| 8224 | .output_pixel_stride(xnn_params.f32.gemm.nr * 2 + 13) |
| 8225 | .iterations(3) |
| 8226 | .TestF32(); |
| 8227 | } |
| 8228 | |
| 8229 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_2x2s2_with_qmin) { |
| 8230 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8231 | DeconvolutionOperatorTester() |
| 8232 | .batch_size(2) |
| 8233 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8234 | .kernel_size(2, 2) |
| 8235 | .stride(2) |
| 8236 | .groups(2) |
| 8237 | .group_input_channels(17) |
| 8238 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8239 | .qmin(128) |
| 8240 | .iterations(3) |
| 8241 | .TestF32(); |
| 8242 | } |
| 8243 | |
| 8244 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_2x2s2_with_qmax) { |
| 8245 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8246 | DeconvolutionOperatorTester() |
| 8247 | .batch_size(2) |
| 8248 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8249 | .kernel_size(2, 2) |
| 8250 | .stride(2) |
| 8251 | .groups(2) |
| 8252 | .group_input_channels(17) |
| 8253 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8254 | .qmax(128) |
| 8255 | .iterations(3) |
| 8256 | .TestF32(); |
| 8257 | } |
| 8258 | |
| 8259 | TEST(DECONVOLUTION_NHWC_F32, batched_grouped_2x2s2_without_bias) { |
| 8260 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8261 | DeconvolutionOperatorTester() |
| 8262 | .has_bias(false) |
| 8263 | .batch_size(2) |
| 8264 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8265 | .kernel_size(2, 2) |
| 8266 | .stride(2) |
| 8267 | .groups(2) |
| 8268 | .group_input_channels(17) |
| 8269 | .group_output_channels(xnn_params.f32.gemm.nr * 2 + 3) |
| 8270 | .iterations(3) |
| 8271 | .TestF32(); |
| 8272 | } |
| 8273 | |
| 8274 | /**************************** SUBCONV2D/GEMM path, setup ****************************/ |
| 8275 | |
| 8276 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2_setup_changing_batch) { |
| 8277 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8278 | DeconvolutionOperatorTester() |
| 8279 | .batch_size(2) |
| 8280 | .next_batch_size(5) |
| 8281 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8282 | .kernel_size(2, 2) |
| 8283 | .stride(2) |
| 8284 | .groups(2) |
| 8285 | .group_input_channels(15) |
| 8286 | .group_output_channels(17) |
| 8287 | .TestSetupF32(); |
| 8288 | } |
| 8289 | |
| 8290 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2_setup_changing_height) { |
| 8291 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8292 | DeconvolutionOperatorTester() |
| 8293 | .batch_size(2) |
| 8294 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8295 | .next_input_height(kStridedInputHeight + 3) |
| 8296 | .kernel_size(2, 2) |
| 8297 | .stride(2) |
| 8298 | .groups(2) |
| 8299 | .group_input_channels(15) |
| 8300 | .group_output_channels(17) |
| 8301 | .TestSetupF32(); |
| 8302 | } |
| 8303 | |
| 8304 | TEST(DECONVOLUTION_NHWC_F32, 2x2s2_setup_changing_width) { |
| 8305 | ASSERT_EQ(xnn_status_success, xnn_initialize(nullptr /* allocator */)); |
| 8306 | DeconvolutionOperatorTester() |
| 8307 | .batch_size(2) |
| 8308 | .input_size(kStridedInputHeight, kStridedInputWidth) |
| 8309 | .next_input_width(kStridedInputWidth + 3) |
| 8310 | .kernel_size(2, 2) |
XNNPACK Team | b455b12 | 2019-09-27 18:10:33 -0700 | [diff] [blame] | 8311 | .stride(2) |
| 8312 | .groups(2) |
| 8313 | .group_input_channels(15) |
| 8314 | .group_output_channels(17) |
| 8315 | .TestSetupF32(); |
| 8316 | } |