1/*******************************************************************************
2* Copyright 2016-2022 Intel Corporation
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8* http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*******************************************************************************/
16
17#include "dnnl_test_common.hpp"
18#include "gtest/gtest.h"
19
20#include "oneapi/dnnl/dnnl.hpp"
21
22#include <limits>
23
24namespace dnnl {
25
26static constexpr memory::dim undef_padding
27 = std::numeric_limits<memory::dim>::max();
28
29struct test_pool_desc_t {
30 memory::dim mb, c;
31 memory::dim id, ih, iw;
32 memory::dim od, oh, ow;
33 memory::dim kd, kh, kw;
34 memory::dim dd, dh, dw;
35 memory::dim padf, padt, padl;
36 memory::dim pad_back, pad_bottom, pad_right;
37 memory::dim strd, strh, strw;
38
39 memory::dim get_pad_back() const {
40 if (pad_back != undef_padding) return pad_back;
41 return right_padding(id, od, kd, padf, strd, dd);
42 }
43
44 memory::dim get_pad_bottom() const {
45 if (pad_bottom != undef_padding) return pad_bottom;
46 return right_padding(ih, oh, kh, padt, strh, dh);
47 }
48
49 memory::dim get_pad_right() const {
50 if (pad_right != undef_padding) return pad_right;
51 return right_padding(iw, ow, kw, padl, strw, dw);
52 }
53};
54
55struct pool_test_params_t {
56 prop_kind aprop_kind;
57 algorithm aalgorithm;
58 memory::format_tag src_format;
59 memory::format_tag dst_format;
60 int ndims;
61 test_pool_desc_t test_pd;
62 bool expect_to_fail;
63 dnnl_status_t expected_status;
64};
65
66bool cuda_check_format_tags(memory::format_tag format) {
67 bool format_ok = format == memory::format_tag::ncdhw
68 || format == memory::format_tag::ndhwc
69 || format == memory::format_tag::nchw
70 || format == memory::format_tag::nhwc
71 || format == memory::format_tag::ncw
72 || format == memory::format_tag::nwc
73 || format == memory::format_tag::any
74 || format == memory::format_tag::nCdhw4c;
75
76 return format_ok;
77}
78
79bool hip_check_format_tags(memory::format_tag format) {
80 bool format_ok = format == memory::format_tag::nchw
81 || format == memory::format_tag::ncdhw;
82
83 return format_ok;
84}
85
86template <typename data_t>
87void check_pool_fwd(const pool_test_params_t &p, const memory &src,
88 const memory &dst, const memory &ws) {
89 auto src_data = map_memory<data_t>(src);
90 auto dst_data = map_memory<data_t>(dst);
91 auto ws_data_ptr = map_memory<unsigned char>(ws);
92
93 auto ws_data = [&](size_t idx) -> int {
94 auto w = (const unsigned char *)ws_data_ptr;
95 if (w == nullptr) return -1;
96 if (ws.get_desc().get_data_type() == dnnl_u8)
97 return (int)w[idx];
98 else
99 return ((const int *)w)[idx];
100 };
101
102 const memory::desc src_d = src.get_desc();
103 const memory::desc dst_d = dst.get_desc();
104 const memory::desc ws_d = ws.get_desc();
105
106 const dnnl::impl::memory_desc_wrapper src_mdw(src_d.get());
107 const dnnl::impl::memory_desc_wrapper dst_mdw(dst_d.get());
108 const dnnl::impl::memory_desc_wrapper ws_mdw(ws_d.get());
109
110 auto pd = p.test_pd;
111 size_t padded_c = src_d.get_padded_dims()[1];
112
113 const bool is_cudnn_gpu = is_nvidia_gpu(src.get_engine());
114 const bool is_miopen_gpu = is_amd_gpu(get_test_engine());
115
116 dnnl::impl::parallel_nd(pd.mb, pd.c, pd.od, pd.oh, pd.ow,
117 [&](memory::dim n, memory::dim c, memory::dim od, memory::dim oh,
118 memory::dim ow) {
119 if (is_current_test_failed()) return;
120
121 memory::dim oidx = n * padded_c * pd.od * pd.oh * pd.ow
122 + c * pd.od * pd.oh * pd.ow + od * pd.oh * pd.ow
123 + oh * pd.ow + ow;
124 data_t out = dst_data[dst_mdw.off_l(oidx, true)];
125 int out_index = -1;
126 if (p.aalgorithm == algorithm::pooling_max
127 && p.aprop_kind == prop_kind::forward_training) {
128 out_index = ws_data(ws_mdw.off_l(oidx, true));
129 }
130 // match implementation for pooling_max: padding
131 // is done with lowest value and not zero, it
132 // affects the case when kernel slips into
133 // the padding area entirely
134 typename acc_t<data_t>::type acc_ref
135 = (p.aalgorithm == algorithm::pooling_max)
136 ? std::numeric_limits<data_t>::lowest()
137 : data_t(0);
138 int out_ref_index = 0;
139 bool is_initialized = false;
140 int num_summands = 0;
141
142 for_(memory::dim kd = 0; kd < pd.kd; ++kd)
143 for_(memory::dim kh = 0; kh < pd.kh; ++kh)
144 for (memory::dim kw = 0; kw < pd.kw; ++kw) {
145 const memory::dim id
146 = od * pd.strd - pd.padf + kd * (pd.dd + 1);
147 const memory::dim ih
148 = oh * pd.strh - pd.padt + kh * (pd.dh + 1);
149 const memory::dim iw
150 = ow * pd.strw - pd.padl + kw * (pd.dw + 1);
151
152 if (id < 0 || id >= pd.id) continue;
153 if (ih < 0 || ih >= pd.ih) continue;
154 if (iw < 0 || iw >= pd.iw) continue;
155
156 size_t iidx = (size_t)n * padded_c * pd.id * pd.ih * pd.iw
157 + (size_t)c * pd.id * pd.ih * pd.iw
158 + (size_t)id * pd.ih * pd.iw + (size_t)ih * pd.iw
159 + iw;
160
161 data_t d = src_data[src_mdw.off_l(iidx, true)];
162 if (p.aalgorithm == algorithm::pooling_max) {
163 if (!is_initialized) {
164 acc_ref = d;
165 out_ref_index = (int)(kd * pd.kw * pd.kh
166 + kh * pd.kw + kw);
167 is_initialized = true;
168 } else {
169 if (acc_ref < d) {
170 acc_ref = d;
171 out_ref_index = (int)(kd * pd.kw * pd.kh
172 + kh * pd.kw + kw);
173 }
174 }
175 } else if (p.aalgorithm
176 == algorithm::pooling_avg_include_padding
177 || p.aalgorithm
178 == algorithm::pooling_avg_exclude_padding) {
179 acc_ref += d;
180 num_summands++;
181 }
182 }
183
184 if (p.aalgorithm == algorithm::pooling_avg_include_padding) {
185 num_summands = pd.kw * pd.kh * pd.kd;
186 }
187
188 if ((p.aalgorithm == algorithm::pooling_avg_include_padding
189 || p.aalgorithm
190 == algorithm::pooling_avg_exclude_padding)
191 && num_summands) {
192 acc_ref = out_round<data_t>((float)acc_ref / num_summands);
193 }
194
195 const data_t out_ref = (data_t)acc_ref;
196 ASSERT_NEAR(out, out_ref, 1e-6);
197 // The workspace layout is different when the cuDNN backend is used
198 // and therefore this check must be skipped
199 if ((p.aalgorithm == algorithm::pooling_max
200 && p.aprop_kind == prop_kind::forward_training)
201 && ((!is_cudnn_gpu) && (!is_miopen_gpu))) {
202 ASSERT_EQ(out_index, out_ref_index)
203 << " n = " << n << " c = " << c << " od = " << od
204 << " oh = " << oh << " ow = " << ow;
205 }
206 });
207}
208
209template <typename data_t>
210class pooling_test_t : public ::testing::TestWithParam<pool_test_params_t> {
211 pool_test_params_t p;
212 memory::dims strides, ker, dilation, pad_l, pad_r;
213
214protected:
215 void SetUp() override {
216 p = ::testing::TestWithParam<decltype(p)>::GetParam();
217
218 SKIP_IF(unsupported_data_type(data_traits<data_t>::data_type),
219 "Engine does not support this data type.");
220 SKIP_IF_CUDA(!cuda_check_format_tags(p.src_format),
221 "Unsupported format tag");
222 SKIP_IF_CUDA(!cuda_check_format_tags(p.dst_format),
223 "Unsupported format tag");
224 SKIP_IF_HIP(
225 !hip_check_format_tags(p.src_format), "Unsupported format tag");
226 SKIP_IF_HIP(
227 !hip_check_format_tags(p.dst_format), "Unsupported format tag");
228 SKIP_IF_HIP(data_traits<data_t>::data_type == memory::data_type::s8,
229 "Unsupported data type");
230
231 catch_expected_failures(
232 [=]() { Test(); }, p.expect_to_fail, p.expected_status);
233 }
234
235 void check_prim_desc(
236 const pooling_forward::primitive_desc &pool_prim_desc) {
237
238 ASSERT_TRUE(pool_prim_desc.query_md(query::exec_arg_md, DNNL_ARG_SRC)
239 == pool_prim_desc.src_desc());
240 ASSERT_TRUE(pool_prim_desc.query_md(query::exec_arg_md, DNNL_ARG_DST)
241 == pool_prim_desc.dst_desc());
242 ASSERT_TRUE(
243 pool_prim_desc.query_md(query::exec_arg_md, DNNL_ARG_WORKSPACE)
244 == pool_prim_desc.workspace_desc());
245
246 ASSERT_EQ(pool_prim_desc.get_prop_kind(), p.aprop_kind);
247 ASSERT_EQ(pool_prim_desc.get_algorithm(), p.aalgorithm);
248 ASSERT_EQ(pool_prim_desc.get_kernel(), ker);
249 ASSERT_EQ(pool_prim_desc.get_strides(), strides);
250 ASSERT_EQ(pool_prim_desc.get_padding_l(), pad_l);
251 ASSERT_EQ(pool_prim_desc.get_padding_r(), pad_r);
252
253 if (p.test_pd.dd == 0 && p.test_pd.dh == 0 && p.test_pd.dw == 0)
254 ASSERT_EQ(pool_prim_desc.get_dilations(),
255 memory::dims(pool_prim_desc.src_desc().get_ndims() - 2));
256 else
257 ASSERT_EQ(pool_prim_desc.get_dilations(), dilation);
258 }
259
260 void Test() {
261 ASSERT_TRUE(p.aprop_kind == prop_kind::forward_training
262 || p.aprop_kind == prop_kind::forward_inference);
263 auto eng = get_test_engine();
264 auto strm = make_stream(eng);
265 memory::data_type data_type = data_traits<data_t>::data_type;
266
267 test_pool_desc_t pd = p.test_pd;
268 auto p_src_desc = (p.ndims == 5)
269 ? create_md({pd.mb, pd.c, pd.id, pd.ih, pd.iw}, data_type,
270 p.src_format)
271 : create_md(
272 {pd.mb, pd.c, pd.ih, pd.iw}, data_type, p.src_format);
273 auto p_dst_desc = (p.ndims == 5)
274 ? create_md({pd.mb, pd.c, pd.od, pd.oh, pd.ow}, data_type,
275 p.dst_format)
276 : create_md(
277 {pd.mb, pd.c, pd.oh, pd.ow}, data_type, p.dst_format);
278
279 if (p.ndims == 5) {
280 strides = memory::dims({pd.strd, pd.strh, pd.strw});
281 ker = memory::dims({pd.kd, pd.kh, pd.kw});
282 dilation = memory::dims({pd.dd, pd.dh, pd.dw});
283 pad_l = memory::dims({pd.padf, pd.padt, pd.padl});
284 pad_r = memory::dims({pd.get_pad_back(), pd.get_pad_bottom(),
285 pd.get_pad_right()});
286 } else {
287 strides = memory::dims({pd.strh, pd.strw});
288 ker = memory::dims({pd.kh, pd.kw});
289 dilation = memory::dims({pd.dh, pd.dw});
290 pad_l = memory::dims({pd.padt, pd.padl});
291 pad_r = memory::dims({pd.get_pad_bottom(), pd.get_pad_right()});
292 }
293
294 memory workspace;
295
296 for (size_t i = 0; i < pad_l.size(); ++i) {
297 SKIP_IF_CUDA(
298 (p.aalgorithm
299 == dnnl::algorithm::pooling_avg_include_padding)
300 && (pad_l[i] < pad_r[i]),
301 "Asymmetric padding is not supported!");
302 }
303
304 for (size_t i = 0; i < dilation.size(); ++i) {
305 SKIP_IF_CUDA(dilation[i] != 0, "Dilation is not supported!");
306 SKIP_IF_HIP(dilation[i] != 0, "Dilation is not supported!");
307 }
308
309 memory p_src, p_dst;
310 auto pool_prim_desc = pooling_forward::primitive_desc(eng, p.aprop_kind,
311 p.aalgorithm, p_src_desc, p_dst_desc, strides, ker, dilation,
312 pad_l, pad_r);
313 // test construction from a C pd
314 pool_prim_desc = pooling_forward::primitive_desc(pool_prim_desc.get());
315 check_prim_desc(pool_prim_desc);
316
317 if (p.src_format != memory::format_tag::any) {
318 ASSERT_TRUE(p_src_desc == pool_prim_desc.src_desc());
319 }
320
321 auto workspace_desc = pool_prim_desc.workspace_desc();
322 workspace = test::make_memory(workspace_desc, eng);
323 p_src = test::make_memory(pool_prim_desc.src_desc(), eng);
324 p_dst = test::make_memory(pool_prim_desc.dst_desc(), eng);
325
326 fill_data<data_t>(
327 p_src.get_desc().get_size() / sizeof(data_t), p_src, 1., true);
328 fill_data<data_t>(
329 p_dst.get_desc().get_size() / sizeof(data_t), p_dst, 1., true);
330 check_zero_tail<data_t>(1, p_src);
331 check_zero_tail<data_t>(1, p_dst);
332
333 EXPECT_ANY_THROW(pooling_forward(pool_prim_desc, {}));
334 pooling_forward(pool_prim_desc)
335 .execute(strm,
336 {{DNNL_ARG_SRC, p_src}, {DNNL_ARG_DST, p_dst},
337 {DNNL_ARG_WORKSPACE, workspace}});
338
339 strm.wait();
340 check_pool_fwd<data_t>(p, p_src, p_dst, workspace);
341 check_zero_tail<data_t>(0, p_dst);
342 }
343};
344
345using pooling_test_float = pooling_test_t<float>;
346using pooling_test_s8 = pooling_test_t<int8_t>;
347using pooling_test_u8 = pooling_test_t<uint8_t>;
348using pooling_test_s32 = pooling_test_t<int32_t>;
349using pool_test_params_float = pool_test_params_t;
350
351// Since ACL supports only forward, to avoid triggering workspace check which is not available.
352#if DNNL_AARCH64_USE_ACL
353#define forward_training forward_inference
354#endif
355
356// sizes with explicit opposite side paddings
357#define EXPAND_SIZES_3D_XPADD(...) \
358 5, { __VA_ARGS__ }
359
360#define EXPAND_SIZES_3D(mb, ic, id, ih, iw, od, oh, ow, kd, kh, kw, dd, dh, \
361 dw, padf, padt, padl, strd, strh, strw) \
362 5, { \
363 mb, ic, id, ih, iw, od, oh, ow, kd, kh, kw, dd, dh, dw, padf, padt, \
364 padl, undef_padding, undef_padding, undef_padding, strd, strh, \
365 strw \
366 }
367
368// sizes with explicit opposite side paddings
369#define EXPAND_SIZES_2D_XPADD(mb, ic, ih, iw, oh, ow, kh, kw, dh, dw, padt, \
370 padl, pad_bottom, pad_right, strh, strw) \
371 4, { \
372 mb, ic, 1, ih, iw, 1, oh, ow, 1, kh, kw, 0, dh, dw, 0, padt, padl, 0, \
373 pad_bottom, pad_right, 1, strh, strw \
374 }
375#define EXPAND_SIZES_2D( \
376 mb, ic, ih, iw, oh, ow, kh, kw, dh, dw, padt, padl, strh, strw) \
377 4, { \
378 mb, ic, 1, ih, iw, 1, oh, ow, 1, kh, kw, 0, dh, dw, 0, padt, padl, 0, \
379 undef_padding, undef_padding, 1, strh, strw \
380 }
381
382#define GPU_INST_TEST_CASE(test, ...) \
383 GPU_INSTANTIATE_TEST_SUITE_P(TestPoolingForwardSlipsToPadding, test, \
384 ::testing::Values( \
385 pool_test_params_t {prop_kind::forward_inference, \
386 algorithm::pooling_max, \
387 memory::format_tag::NChw16n16c, \
388 memory::format_tag::NChw16n16c, \
389 EXPAND_SIZES_2D(64, 64, 56, 56, 56, 56, 3, 3, 0, \
390 0, 1, 1, 1, 1)}, \
391 pool_test_params_t {prop_kind::forward_inference, \
392 algorithm::pooling_avg_exclude_padding, \
393 memory::format_tag::NChw16n16c, \
394 memory::format_tag::NChw16n16c, \
395 EXPAND_SIZES_2D(64, 64, 56, 56, 56, 56, 3, 3, 0, \
396 0, 1, 1, 1, 1)}, \
397 pool_test_params_t {prop_kind::forward_inference, \
398 algorithm::pooling_avg_include_padding, \
399 memory::format_tag::NChw16n16c, \
400 memory::format_tag::NChw16n16c, \
401 EXPAND_SIZES_2D(64, 64, 56, 56, 56, 56, 3, 3, 0, \
402 0, 1, 1, 1, 1)})); \
403 GPU_INSTANTIATE_TEST_SUITE_P(TestPoolingForward_gpu_3D, test, \
404 ::testing::Values( \
405 pool_test_params_t {prop_kind::forward_inference, \
406 algorithm::pooling_max, memory::format_tag::ncdhw, \
407 memory::format_tag::ncdhw, \
408 EXPAND_SIZES_3D(4, 16, 10, 10, 10, 10, 10, 10, 2, \
409 2, 2, 0, 0, 0, 1, 1, 1, 1, 1, 1)}, \
410 pool_test_params_t {prop_kind::forward_inference, \
411 algorithm::pooling_avg_exclude_padding, \
412 memory::format_tag::ncdhw, \
413 memory::format_tag::ncdhw, \
414 EXPAND_SIZES_3D(4, 16, 10, 10, 10, 10, 10, 10, 2, \
415 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1)}, \
416 pool_test_params_t {prop_kind::forward_inference, \
417 algorithm::pooling_avg_include_padding, \
418 memory::format_tag::ncdhw, \
419 memory::format_tag::ncdhw, \
420 EXPAND_SIZES_3D(4, 16, 10, 10, 10, 10, 10, 10, 2, \
421 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1)}, \
422 pool_test_params_t {prop_kind::forward_inference, \
423 algorithm::pooling_max, \
424 memory::format_tag::NCdhw16n16c, \
425 memory::format_tag::NCdhw16n16c, \
426 EXPAND_SIZES_3D(32, 32, 14, 14, 14, 14, 14, 14, 3, \
427 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1)}, \
428 pool_test_params_t {prop_kind::forward_inference, \
429 algorithm::pooling_avg_exclude_padding, \
430 memory::format_tag::NCdhw16n16c, \
431 memory::format_tag::NCdhw16n16c, \
432 EXPAND_SIZES_3D(32, 32, 14, 14, 14, 14, 14, 14, 3, \
433 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1)}, \
434 pool_test_params_t {prop_kind::forward_inference, \
435 algorithm::pooling_avg_include_padding, \
436 memory::format_tag::NCdhw16n16c, \
437 memory::format_tag::NCdhw16n16c, \
438 EXPAND_SIZES_3D(32, 32, 14, 14, 14, 14, 14, 14, 3, \
439 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1)}, \
440 pool_test_params_t {prop_kind::forward_inference, \
441 algorithm::pooling_max, \
442 memory::format_tag::nCdhw16c, \
443 memory::format_tag::nCdhw16c, \
444 EXPAND_SIZES_3D(13, 32, 14, 14, 14, 14, 14, 14, 3, \
445 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1)}, \
446 pool_test_params_t {prop_kind::forward_inference, \
447 algorithm::pooling_avg_exclude_padding, \
448 memory::format_tag::nCdhw16c, \
449 memory::format_tag::nCdhw16c, \
450 EXPAND_SIZES_3D(13, 32, 14, 14, 14, 14, 14, 14, 3, \
451 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1)}, \
452 pool_test_params_t {prop_kind::forward_inference, \
453 algorithm::pooling_avg_include_padding, \
454 memory::format_tag::nCdhw16c, \
455 memory::format_tag::nCdhw16c, \
456 EXPAND_SIZES_3D(13, 32, 14, 14, 14, 14, 14, 14, 3, \
457 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1)}));
458
459TEST_P(pooling_test_s8, TestsPooling) {}
460
461INSTANTIATE_TEST_SUITE_P(TestPoolingAlexnetForwardS8, pooling_test_s8,
462 ::testing::Values(
463 pool_test_params_t {prop_kind::forward_inference,
464 algorithm::pooling_max, memory::format_tag::nhwc,
465 memory::format_tag::nhwc,
466 EXPAND_SIZES_2D(
467 1, 96, 55, 55, 27, 27, 3, 3, 0, 0, 0, 0, 2, 2)},
468 pool_test_params_t {prop_kind::forward_inference,
469 algorithm::pooling_max, memory::format_tag::nhwc,
470 memory::format_tag::nhwc,
471 EXPAND_SIZES_2D(1, 256, 27, 27, 13, 13, 3, 3, 0, 0, 0,
472 0, 2, 2)},
473 pool_test_params_t {prop_kind::forward_inference,
474 algorithm::pooling_max, memory::format_tag::nhwc,
475 memory::format_tag::nhwc,
476 EXPAND_SIZES_2D(1, 256, 13, 13, 6, 6, 3, 3, 1, 1, 0, 0,
477 2, 2)}));
478
479INSTANTIATE_TEST_SUITE_P(TestPoolingForwardMaxS8, pooling_test_s8,
480 ::testing::Values(
481 pool_test_params_t {prop_kind::forward_inference,
482 algorithm::pooling_max, memory::format_tag::nhwc,
483 memory::format_tag::nhwc,
484 EXPAND_SIZES_2D(
485 2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
486 pool_test_params_t {prop_kind::forward_inference,
487 algorithm::pooling_max, memory::format_tag::nhwc,
488 memory::format_tag::nhwc,
489 EXPAND_SIZES_2D(
490 2, 64, 1, 1, 1, 1, 3, 3, 0, 0, 1, 1, 1, 1)},
491 pool_test_params_t {prop_kind::forward_inference,
492 algorithm::pooling_max, memory::format_tag::nhwc,
493 memory::format_tag::nhwc,
494 EXPAND_SIZES_2D(
495 2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
496 pool_test_params_t {prop_kind::forward_inference,
497 algorithm::pooling_max, memory::format_tag::nhwc,
498 memory::format_tag::nhwc,
499 EXPAND_SIZES_2D(
500 2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1, 1, 1)},
501 pool_test_params_t {prop_kind::forward_inference,
502 algorithm::pooling_max, memory::format_tag::nhwc,
503 memory::format_tag::nhwc,
504 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 2, 2, 0,
505 0, 2, 2)}));
506
507INSTANTIATE_TEST_SUITE_P(TestPoolingForwardAvgS8, pooling_test_s8,
508 ::testing::Values(
509 pool_test_params_t {prop_kind::forward_inference,
510 algorithm::pooling_avg_include_padding,
511 memory::format_tag::nhwc, memory::format_tag::nhwc,
512 EXPAND_SIZES_2D(
513 2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
514 pool_test_params_t {prop_kind::forward_inference,
515 algorithm::pooling_avg_exclude_padding,
516 memory::format_tag::nhwc, memory::format_tag::nhwc,
517 EXPAND_SIZES_2D(
518 2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
519 pool_test_params_t {prop_kind::forward_inference,
520 algorithm::pooling_avg_include_padding,
521 memory::format_tag::nhwc, memory::format_tag::nhwc,
522 EXPAND_SIZES_2D(
523 2, 64, 1, 1, 1, 1, 3, 3, 0, 0, 1, 1, 1, 1)},
524 pool_test_params_t {prop_kind::forward_inference,
525 algorithm::pooling_avg_exclude_padding,
526 memory::format_tag::nhwc, memory::format_tag::nhwc,
527 EXPAND_SIZES_2D(
528 2, 64, 1, 1, 1, 1, 3, 3, 0, 0, 1, 1, 1, 1)},
529 pool_test_params_t {prop_kind::forward_inference,
530 algorithm::pooling_avg_include_padding,
531 memory::format_tag::nhwc, memory::format_tag::nhwc,
532 EXPAND_SIZES_2D(
533 2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
534 pool_test_params_t {prop_kind::forward_inference,
535 algorithm::pooling_avg_exclude_padding,
536 memory::format_tag::nhwc, memory::format_tag::nhwc,
537 EXPAND_SIZES_2D(
538 2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
539 pool_test_params_t {prop_kind::forward_inference,
540 algorithm::pooling_avg_include_padding,
541 memory::format_tag::nhwc, memory::format_tag::nhwc,
542 EXPAND_SIZES_2D(
543 2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1, 1, 1)},
544 pool_test_params_t {prop_kind::forward_inference,
545 algorithm::pooling_avg_exclude_padding,
546 memory::format_tag::nhwc, memory::format_tag::nhwc,
547 EXPAND_SIZES_2D(
548 2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1, 1, 1)},
549 pool_test_params_t {prop_kind::forward_inference,
550 algorithm::pooling_avg_include_padding,
551 memory::format_tag::nhwc, memory::format_tag::nhwc,
552 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 2, 2, 0,
553 0, 2, 2)},
554 pool_test_params_t {prop_kind::forward_inference,
555 algorithm::pooling_avg_exclude_padding,
556 memory::format_tag::nhwc, memory::format_tag::nhwc,
557 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 3, 3, 0,
558 0, 2, 2)}));
559
560GPU_INST_TEST_CASE(pooling_test_s8);
561
562TEST_P(pooling_test_u8, TestsPooling) {}
563
564INSTANTIATE_TEST_SUITE_P(TestPoolingForwardMaxU8, pooling_test_u8,
565 ::testing::Values(
566 pool_test_params_t {prop_kind::forward_inference,
567 algorithm::pooling_max, memory::format_tag::nhwc,
568 memory::format_tag::nhwc,
569 EXPAND_SIZES_2D(
570 2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
571 pool_test_params_t {prop_kind::forward_inference,
572 algorithm::pooling_max, memory::format_tag::nhwc,
573 memory::format_tag::nhwc,
574 EXPAND_SIZES_2D(
575 2, 64, 1, 1, 1, 1, 3, 3, 0, 0, 1, 1, 1, 1)},
576 pool_test_params_t {prop_kind::forward_inference,
577 algorithm::pooling_max, memory::format_tag::nhwc,
578 memory::format_tag::nhwc,
579 EXPAND_SIZES_2D(
580 2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
581 pool_test_params_t {prop_kind::forward_inference,
582 algorithm::pooling_max, memory::format_tag::nhwc,
583 memory::format_tag::nhwc,
584 EXPAND_SIZES_2D(
585 2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1, 1, 1)},
586 pool_test_params_t {prop_kind::forward_inference,
587 algorithm::pooling_max, memory::format_tag::nhwc,
588 memory::format_tag::nhwc,
589 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 3, 3, 0,
590 0, 2, 2)}));
591
592INSTANTIATE_TEST_SUITE_P(TestPoolingForwardAvgU8, pooling_test_u8,
593 ::testing::Values(
594 pool_test_params_t {prop_kind::forward_inference,
595 algorithm::pooling_avg_include_padding,
596 memory::format_tag::nhwc, memory::format_tag::nhwc,
597 EXPAND_SIZES_2D(
598 2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
599 pool_test_params_t {prop_kind::forward_inference,
600 algorithm::pooling_avg_exclude_padding,
601 memory::format_tag::nhwc, memory::format_tag::nhwc,
602 EXPAND_SIZES_2D(
603 2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
604 pool_test_params_t {prop_kind::forward_inference,
605 algorithm::pooling_avg_include_padding,
606 memory::format_tag::nhwc, memory::format_tag::nhwc,
607 EXPAND_SIZES_2D(
608 2, 64, 1, 1, 1, 1, 3, 3, 0, 0, 1, 1, 1, 1)},
609 pool_test_params_t {prop_kind::forward_inference,
610 algorithm::pooling_avg_exclude_padding,
611 memory::format_tag::nhwc, memory::format_tag::nhwc,
612 EXPAND_SIZES_2D(
613 2, 64, 1, 1, 1, 1, 3, 3, 0, 0, 1, 1, 1, 1)},
614 pool_test_params_t {prop_kind::forward_inference,
615 algorithm::pooling_avg_include_padding,
616 memory::format_tag::nhwc, memory::format_tag::nhwc,
617 EXPAND_SIZES_2D(
618 2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
619 pool_test_params_t {prop_kind::forward_inference,
620 algorithm::pooling_avg_exclude_padding,
621 memory::format_tag::nhwc, memory::format_tag::nhwc,
622 EXPAND_SIZES_2D(
623 2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
624 pool_test_params_t {prop_kind::forward_inference,
625 algorithm::pooling_avg_include_padding,
626 memory::format_tag::nhwc, memory::format_tag::nhwc,
627 EXPAND_SIZES_2D(
628 2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1, 1, 1)},
629 pool_test_params_t {prop_kind::forward_inference,
630 algorithm::pooling_avg_exclude_padding,
631 memory::format_tag::nhwc, memory::format_tag::nhwc,
632 EXPAND_SIZES_2D(
633 2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1, 1, 1)},
634 pool_test_params_t {prop_kind::forward_inference,
635 algorithm::pooling_avg_include_padding,
636 memory::format_tag::nhwc, memory::format_tag::nhwc,
637 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 2, 2, 0,
638 0, 2, 2)},
639 pool_test_params_t {prop_kind::forward_inference,
640 algorithm::pooling_avg_exclude_padding,
641 memory::format_tag::nhwc, memory::format_tag::nhwc,
642 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 2, 2, 0,
643 0, 2, 2)}));
644
645GPU_INST_TEST_CASE(pooling_test_u8);
646
647TEST_P(pooling_test_s32, TestsPooling) {}
648
649CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAlexnetForwardS32, pooling_test_s32,
650 ::testing::Values(
651 pool_test_params_t {prop_kind::forward_inference,
652 algorithm::pooling_max, memory::format_tag::nhwc,
653 memory::format_tag::nhwc,
654 EXPAND_SIZES_2D(
655 1, 96, 55, 55, 27, 27, 3, 3, 0, 0, 0, 0, 2, 2)},
656 pool_test_params_t {prop_kind::forward_inference,
657 algorithm::pooling_max, memory::format_tag::nhwc,
658 memory::format_tag::nhwc,
659 EXPAND_SIZES_2D(1, 256, 27, 27, 13, 13, 3, 3, 0, 0, 0,
660 0, 2, 2)},
661 pool_test_params_t {prop_kind::forward_inference,
662 algorithm::pooling_max, memory::format_tag::nhwc,
663 memory::format_tag::nhwc,
664 EXPAND_SIZES_2D(1, 256, 13, 13, 6, 6, 3, 3, 0, 0, 0, 0,
665 2, 2)}));
666
667CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingForwardMaxS32, pooling_test_s32,
668 ::testing::Values(
669 pool_test_params_t {prop_kind::forward_inference,
670 algorithm::pooling_max, memory::format_tag::nhwc,
671 memory::format_tag::nhwc,
672 EXPAND_SIZES_2D(
673 2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
674 pool_test_params_t {prop_kind::forward_inference,
675 algorithm::pooling_max, memory::format_tag::nhwc,
676 memory::format_tag::nhwc,
677 EXPAND_SIZES_2D(
678 2, 64, 1, 1, 1, 1, 3, 3, 0, 0, 1, 1, 1, 1)},
679 pool_test_params_t {prop_kind::forward_inference,
680 algorithm::pooling_max, memory::format_tag::nhwc,
681 memory::format_tag::nhwc,
682 EXPAND_SIZES_2D(
683 2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
684 pool_test_params_t {prop_kind::forward_inference,
685 algorithm::pooling_max, memory::format_tag::nhwc,
686 memory::format_tag::nhwc,
687 EXPAND_SIZES_2D(
688 2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1, 1, 1)},
689 pool_test_params_t {prop_kind::forward_inference,
690 algorithm::pooling_max, memory::format_tag::nhwc,
691 memory::format_tag::nhwc,
692 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 2, 2, 0,
693 0, 2, 2)}));
694
695CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingForwardAvgS32, pooling_test_s32,
696 ::testing::Values(
697 pool_test_params_t {prop_kind::forward_inference,
698 algorithm::pooling_avg_include_padding,
699 memory::format_tag::nhwc, memory::format_tag::nhwc,
700 EXPAND_SIZES_2D(
701 2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
702 pool_test_params_t {prop_kind::forward_inference,
703 algorithm::pooling_avg_exclude_padding,
704 memory::format_tag::nhwc, memory::format_tag::nhwc,
705 EXPAND_SIZES_2D(
706 2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
707 pool_test_params_t {prop_kind::forward_inference,
708 algorithm::pooling_avg_include_padding,
709 memory::format_tag::nhwc, memory::format_tag::nhwc,
710 EXPAND_SIZES_2D(
711 2, 64, 1, 1, 1, 1, 3, 3, 0, 0, 1, 1, 1, 1)},
712 pool_test_params_t {prop_kind::forward_inference,
713 algorithm::pooling_avg_exclude_padding,
714 memory::format_tag::nhwc, memory::format_tag::nhwc,
715 EXPAND_SIZES_2D(
716 2, 64, 1, 1, 1, 1, 3, 3, 0, 0, 1, 1, 1, 1)},
717 pool_test_params_t {prop_kind::forward_inference,
718 algorithm::pooling_avg_include_padding,
719 memory::format_tag::nhwc, memory::format_tag::nhwc,
720 EXPAND_SIZES_2D(
721 2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
722 pool_test_params_t {prop_kind::forward_inference,
723 algorithm::pooling_avg_exclude_padding,
724 memory::format_tag::nhwc, memory::format_tag::nhwc,
725 EXPAND_SIZES_2D(
726 2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
727 pool_test_params_t {prop_kind::forward_inference,
728 algorithm::pooling_avg_include_padding,
729 memory::format_tag::nhwc, memory::format_tag::nhwc,
730 EXPAND_SIZES_2D(
731 2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1, 1, 1)},
732 pool_test_params_t {prop_kind::forward_inference,
733 algorithm::pooling_avg_exclude_padding,
734 memory::format_tag::nhwc, memory::format_tag::nhwc,
735 EXPAND_SIZES_2D(
736 2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1, 1, 1)},
737 pool_test_params_t {prop_kind::forward_inference,
738 algorithm::pooling_avg_include_padding,
739 memory::format_tag::nhwc, memory::format_tag::nhwc,
740 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 2, 2, 0,
741 0, 2, 2)},
742 pool_test_params_t {prop_kind::forward_inference,
743 algorithm::pooling_avg_exclude_padding,
744 memory::format_tag::nhwc, memory::format_tag::nhwc,
745 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 2, 2, 0,
746 0, 2, 2)}));
747
748TEST_P(pooling_test_float, TestsPooling) {}
749
750INSTANTIATE_TEST_SUITE_P(TestPoolingForwardZeroDim, pooling_test_float,
751 ::testing::Values(
752 pool_test_params_float {prop_kind::forward_training,
753 algorithm::pooling_max, memory::format_tag::nchw,
754 memory::format_tag::nchw,
755 EXPAND_SIZES_2D(
756 2, 0, 4, 4, 4, 4, 3, 3, 0, 0, 1, 1, 1, 1)},
757 pool_test_params_float {prop_kind::forward_training,
758 algorithm::pooling_max, memory::format_tag::nhwc,
759 memory::format_tag::nhwc,
760 EXPAND_SIZES_2D(
761 0, 4, 4, 4, 4, 4, 3, 3, 0, 0, 1, 1, 1, 1)},
762 pool_test_params_float {prop_kind::forward_training,
763 algorithm::pooling_max, memory::format_tag::nchw,
764 memory::format_tag::nchw,
765 EXPAND_SIZES_2D(
766 2, 4, 0, 4, 4, 4, 3, 3, 1, 1, 1, 1, 1, 1)}));
767
768INSTANTIATE_TEST_SUITE_P(TestPoolingForwardEF, pooling_test_float,
769 ::testing::Values(
770 pool_test_params_float {prop_kind::forward_training,
771 algorithm::pooling_max, memory::format_tag::nchw,
772 memory::format_tag::nchw,
773 EXPAND_SIZES_2D(
774 2, -4, 4, 4, 4, 4, 3, 3, 0, 0, 1, 1, 1, 1),
775 true, dnnl_invalid_arguments},
776 pool_test_params_float {prop_kind::forward_training,
777 algorithm::pooling_max, memory::format_tag::nchw,
778 memory::format_tag::nchw,
779 EXPAND_SIZES_2D(
780 -1, 4, 4, 4, 4, 4, 3, 3, 0, 0, 1, 1, 1, 1),
781 true, dnnl_invalid_arguments},
782 pool_test_params_float {prop_kind::forward_training,
783 algorithm::eltwise_square, memory::format_tag::nchw,
784 memory::format_tag::nchw,
785 EXPAND_SIZES_2D(
786 2, 4, 4, 4, 4, 4, 3, 3, 0, 0, 1, 1, 1, 1),
787 true, dnnl_invalid_arguments},
788 pool_test_params_t {prop_kind::forward_inference,
789 algorithm::pooling_max, memory::format_tag::any,
790 memory::format_tag::nChw16c,
791 EXPAND_SIZES_2D(
792 4, 14, 60, 60, 31, 31, 2, 3, 1, 1, 1, 1, 2, 2),
793 true, dnnl_invalid_arguments}));
794
795INSTANTIATE_TEST_SUITE_P(TestPooling_nChw16c_with_padded, pooling_test_float,
796 ::testing::Values(
797 pool_test_params_t {prop_kind::forward_training,
798 algorithm::pooling_max, memory::format_tag::nChw16c,
799 memory::format_tag::nChw16c,
800 EXPAND_SIZES_2D(
801 4, 17, 6, 6, 7, 7, 2, 2, 0, 0, 1, 1, 1, 1)},
802 pool_test_params_t {prop_kind::forward_training,
803 algorithm::pooling_max, memory::format_tag::nChw16c,
804 memory::format_tag::nChw16c,
805 EXPAND_SIZES_2D(
806 4, 23, 60, 60, 31, 31, 3, 4, 1, 0, 0, 1, 2, 2)},
807 pool_test_params_t {prop_kind::forward_training,
808 algorithm::pooling_avg_exclude_padding,
809 memory::format_tag::nChw16c,
810 memory::format_tag::nChw16c,
811 EXPAND_SIZES_2D(
812 4, 14, 60, 60, 31, 31, 3, 2, 0, 0, 1, 1, 2, 2)},
813 pool_test_params_t {prop_kind::forward_training,
814 algorithm::pooling_avg_include_padding,
815 memory::format_tag::nChw16c,
816 memory::format_tag::nChw16c,
817 EXPAND_SIZES_2D(
818 4, 17, 60, 60, 31, 31, 4, 3, 1, 0, 0, 1, 2, 2)},
819 pool_test_params_t {prop_kind::forward_inference,
820 algorithm::pooling_max, memory::format_tag::nChw16c,
821 memory::format_tag::nChw16c,
822 EXPAND_SIZES_2D(
823 4, 14, 60, 60, 31, 31, 2, 3, 1, 1, 1, 1, 2, 2)},
824 pool_test_params_t {prop_kind::forward_inference,
825 algorithm::pooling_avg_exclude_padding,
826 memory::format_tag::nChw16c,
827 memory::format_tag::nChw16c,
828 EXPAND_SIZES_2D(
829 4, 25, 60, 60, 31, 31, 2, 4, 1, 1, 1, 1, 2, 2)},
830 pool_test_params_t {prop_kind::forward_inference,
831 algorithm::pooling_avg_include_padding,
832 memory::format_tag::nChw16c,
833 memory::format_tag::nChw16c,
834 EXPAND_SIZES_2D(4, 28, 60, 60, 31, 31, 4, 2, 1, 1, 1, 1,
835 2, 2)}));
836
837INSTANTIATE_TEST_SUITE_P(TestPooling_nChw8c_with_padded, pooling_test_float,
838 ::testing::Values(
839 pool_test_params_t {prop_kind::forward_training,
840 algorithm::pooling_max, memory::format_tag::nChw8c,
841 memory::format_tag::nChw8c,
842 EXPAND_SIZES_2D(
843 4, 5, 6, 6, 7, 7, 2, 2, 0, 0, 1, 1, 1, 1)},
844 pool_test_params_t {prop_kind::forward_training,
845 algorithm::pooling_max, memory::format_tag::nChw8c,
846 memory::format_tag::nChw8c,
847 EXPAND_SIZES_2D(
848 4, 9, 60, 60, 31, 31, 3, 4, 0, 0, 1, 1, 2, 2)},
849 pool_test_params_t {prop_kind::forward_training,
850 algorithm::pooling_avg_exclude_padding,
851 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
852 EXPAND_SIZES_2D(
853 4, 14, 60, 60, 31, 31, 3, 2, 0, 0, 1, 1, 2, 2)},
854 pool_test_params_t {prop_kind::forward_training,
855 algorithm::pooling_avg_include_padding,
856 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
857 EXPAND_SIZES_2D(
858 4, 17, 60, 60, 31, 31, 4, 3, 0, 0, 1, 1, 2, 2)},
859 pool_test_params_t {prop_kind::forward_inference,
860 algorithm::pooling_max, memory::format_tag::nChw8c,
861 memory::format_tag::nChw8c,
862 EXPAND_SIZES_2D(
863 4, 14, 60, 60, 31, 31, 2, 3, 1, 1, 1, 1, 2, 2)},
864 pool_test_params_t {prop_kind::forward_inference,
865 algorithm::pooling_avg_exclude_padding,
866 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
867 EXPAND_SIZES_2D(
868 4, 25, 60, 60, 31, 31, 2, 4, 1, 1, 1, 1, 2, 2)},
869 pool_test_params_t {prop_kind::forward_inference,
870 algorithm::pooling_avg_include_padding,
871 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
872 EXPAND_SIZES_2D(4, 28, 60, 60, 31, 31, 4, 2, 1, 1, 1, 1,
873 2, 2)}));
874
875INSTANTIATE_TEST_SUITE_P(TestPoolingForwardMaxKernelSlipsToPadding,
876 pooling_test_float,
877 ::testing::Values(
878 pool_test_params_t {prop_kind::forward_training,
879 algorithm::pooling_max, memory::format_tag::nchw,
880 memory::format_tag::nchw,
881 EXPAND_SIZES_2D(
882 1, 16, 10, 10, 6, 6, 5, 5, 0, 0, 10, 10, 5, 5)},
883 pool_test_params_t {prop_kind::forward_training,
884 algorithm::pooling_max, memory::format_tag::nchw,
885 memory::format_tag::nhwc,
886 EXPAND_SIZES_2D(
887 1, 16, 10, 10, 6, 6, 5, 5, 0, 0, 10, 10, 5, 5)},
888 pool_test_params_t {prop_kind::forward_training,
889 algorithm::pooling_max, memory::format_tag::nchw,
890 memory::format_tag::nChw8c,
891 EXPAND_SIZES_2D(
892 1, 16, 10, 10, 6, 6, 5, 5, 0, 0, 10, 10, 5, 5)},
893 pool_test_params_t {prop_kind::forward_training,
894 algorithm::pooling_max, memory::format_tag::nchw,
895 memory::format_tag::nChw16c,
896 EXPAND_SIZES_2D(1, 16, 10, 10, 6, 6, 5, 5, 0, 0, 10, 10,
897 5, 5)}));
898
899CPU_INSTANTIATE_TEST_SUITE_P(TestPooling3D_nCdhw16c, pooling_test_float,
900 ::testing::Values(
901 // try using padding different from what is expected
902 // padding_back == 2
903 pool_test_params_t {prop_kind::forward_training,
904 algorithm::pooling_max, memory::format_tag::nCdhw16c,
905 memory::format_tag::nCdhw16c,
906 EXPAND_SIZES_3D_XPADD(2, 32, 60, 60, 60, 31, 31, 31, 2,
907 3, 4, 0, 0, 0, 1, 1, 1, 2, undef_padding,
908 undef_padding, 2, 2, 2)},
909
910 pool_test_params_t {prop_kind::forward_training,
911 algorithm::pooling_max, memory::format_tag::nCdhw16c,
912 memory::format_tag::nCdhw16c,
913 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 3, 4,
914 0, 0, 0, 1, 1, 1, 2, 2, 2)},
915 pool_test_params_t {prop_kind::forward_training,
916 algorithm::pooling_avg_exclude_padding,
917 memory::format_tag::nCdhw16c,
918 memory::format_tag::nCdhw16c,
919 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 3, 2,
920 0, 0, 0, 1, 1, 1, 2, 2, 2)},
921 pool_test_params_t {prop_kind::forward_training,
922 algorithm::pooling_avg_include_padding,
923 memory::format_tag::nCdhw16c,
924 memory::format_tag::nCdhw16c,
925 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 4, 3,
926 0, 0, 0, 1, 1, 1, 2, 2, 2)},
927 pool_test_params_t {prop_kind::forward_inference,
928 algorithm::pooling_max, memory::format_tag::nCdhw16c,
929 memory::format_tag::nCdhw16c,
930 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 2, 3,
931 1, 1, 1, 1, 1, 1, 2, 2, 2)},
932 pool_test_params_t {prop_kind::forward_inference,
933 algorithm::pooling_avg_exclude_padding,
934 memory::format_tag::nCdhw16c,
935 memory::format_tag::nCdhw16c,
936 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 2, 4,
937 1, 1, 1, 1, 1, 1, 2, 2, 2)},
938 pool_test_params_t {prop_kind::forward_inference,
939 algorithm::pooling_avg_include_padding,
940 memory::format_tag::nCdhw16c,
941 memory::format_tag::nCdhw16c,
942 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 4, 2,
943 1, 1, 1, 1, 1, 1, 2, 2, 2)}));
944
945CPU_INSTANTIATE_TEST_SUITE_P(TestPooling3D_nCdhw8c, pooling_test_float,
946 ::testing::Values(
947 pool_test_params_t {prop_kind::forward_training,
948 algorithm::pooling_max, memory::format_tag::nCdhw8c,
949 memory::format_tag::nCdhw8c,
950 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 3, 4,
951 0, 0, 0, 1, 1, 1, 2, 2, 2)},
952 pool_test_params_t {prop_kind::forward_training,
953 algorithm::pooling_avg_exclude_padding,
954 memory::format_tag::nCdhw8c,
955 memory::format_tag::nCdhw8c,
956 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 3, 2,
957 0, 0, 0, 1, 1, 1, 2, 2, 2)},
958 pool_test_params_t {prop_kind::forward_training,
959 algorithm::pooling_avg_include_padding,
960 memory::format_tag::nCdhw8c,
961 memory::format_tag::nCdhw8c,
962 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 4, 3,
963 0, 0, 0, 1, 1, 1, 2, 2, 2)},
964 pool_test_params_t {prop_kind::forward_inference,
965 algorithm::pooling_max, memory::format_tag::nCdhw8c,
966 memory::format_tag::nCdhw8c,
967 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 2, 3,
968 1, 1, 1, 1, 1, 1, 2, 2, 2)},
969 pool_test_params_t {prop_kind::forward_inference,
970 algorithm::pooling_avg_exclude_padding,
971 memory::format_tag::nCdhw8c,
972 memory::format_tag::nCdhw8c,
973 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 2, 4,
974 1, 1, 1, 1, 1, 1, 2, 2, 2)},
975 pool_test_params_t {prop_kind::forward_inference,
976 algorithm::pooling_avg_include_padding,
977 memory::format_tag::nCdhw8c,
978 memory::format_tag::nCdhw8c,
979 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 4, 2,
980 1, 1, 1, 1, 1, 1, 2, 2, 2)}));
981
982CPU_INSTANTIATE_TEST_SUITE_P(TestPooling3D_ndhwc, pooling_test_float,
983 ::testing::Values(
984 pool_test_params_t {prop_kind::forward_training,
985 algorithm::pooling_max, memory::format_tag::ndhwc,
986 memory::format_tag::ndhwc,
987 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 3, 4,
988 0, 0, 0, 1, 1, 1, 2, 2, 2)},
989 pool_test_params_t {prop_kind::forward_training,
990 algorithm::pooling_avg_exclude_padding,
991 memory::format_tag::ndhwc, memory::format_tag::ndhwc,
992 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 3, 2,
993 0, 0, 0, 1, 1, 1, 2, 2, 2)},
994 pool_test_params_t {prop_kind::forward_training,
995 algorithm::pooling_avg_include_padding,
996 memory::format_tag::ndhwc, memory::format_tag::ndhwc,
997 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 4, 3,
998 0, 0, 0, 1, 1, 1, 2, 2, 2)},
999 pool_test_params_t {prop_kind::forward_inference,
1000 algorithm::pooling_max, memory::format_tag::ndhwc,
1001 memory::format_tag::ndhwc,
1002 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 2, 3,
1003 1, 1, 1, 1, 1, 1, 2, 2, 2)},
1004 pool_test_params_t {prop_kind::forward_inference,
1005 algorithm::pooling_avg_exclude_padding,
1006 memory::format_tag::ndhwc, memory::format_tag::ndhwc,
1007 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 2, 4,
1008 1, 1, 1, 1, 1, 1, 2, 2, 2)},
1009 pool_test_params_t {prop_kind::forward_inference,
1010 algorithm::pooling_avg_include_padding,
1011 memory::format_tag::ndhwc, memory::format_tag::ndhwc,
1012 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 4, 2,
1013 1, 1, 1, 1, 1, 1, 2, 2, 2)}));
1014
1015CPU_INSTANTIATE_TEST_SUITE_P(TestPooling3D_ncdhw, pooling_test_float,
1016 ::testing::Values(
1017 pool_test_params_t {prop_kind::forward_training,
1018 algorithm::pooling_max, memory::format_tag::ncdhw,
1019 memory::format_tag::ncdhw,
1020 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 3, 4,
1021 0, 0, 0, 1, 1, 1, 2, 2, 2)},
1022 pool_test_params_t {prop_kind::forward_training,
1023 algorithm::pooling_avg_exclude_padding,
1024 memory::format_tag::ncdhw, memory::format_tag::ncdhw,
1025 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 3, 2,
1026 0, 0, 0, 1, 1, 1, 2, 2, 2)},
1027 pool_test_params_t {prop_kind::forward_training,
1028 algorithm::pooling_avg_include_padding,
1029 memory::format_tag::ncdhw, memory::format_tag::ncdhw,
1030 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 4, 3,
1031 0, 0, 0, 1, 1, 1, 2, 2, 2)},
1032 pool_test_params_t {prop_kind::forward_inference,
1033 algorithm::pooling_max, memory::format_tag::ncdhw,
1034 memory::format_tag::ncdhw,
1035 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 2, 3,
1036 1, 1, 1, 1, 1, 1, 2, 2, 2)},
1037 pool_test_params_t {prop_kind::forward_inference,
1038 algorithm::pooling_avg_exclude_padding,
1039 memory::format_tag::ncdhw, memory::format_tag::ncdhw,
1040 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 2, 4,
1041 1, 1, 1, 1, 1, 1, 2, 2, 2)},
1042 pool_test_params_t {prop_kind::forward_inference,
1043 algorithm::pooling_avg_include_padding,
1044 memory::format_tag::ncdhw, memory::format_tag::ncdhw,
1045 EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 4, 2,
1046 1, 1, 1, 1, 1, 1, 2, 2, 2)}));
1047
1048CPU_INSTANTIATE_TEST_SUITE_P(TestPooling3Dunet_ncdhw, pooling_test_float,
1049 ::testing::Values(
1050 pool_test_params_t {prop_kind::forward_inference,
1051 algorithm::pooling_max, memory::format_tag::ncdhw,
1052 memory::format_tag::ncdhw,
1053 EXPAND_SIZES_3D(1, 64, 64, 64, 64, 64, 64, 64, 2, 2, 2,
1054 0, 0, 0, 0, 0, 0, 1, 1, 1)},
1055 pool_test_params_t {prop_kind::forward_inference,
1056 algorithm::pooling_max, memory::format_tag::ncdhw,
1057 memory::format_tag::ncdhw,
1058 EXPAND_SIZES_3D(1, 128, 28, 28, 28, 28, 28, 28, 2, 2, 2,
1059 0, 0, 0, 0, 0, 0, 1, 1, 1)},
1060 pool_test_params_t {prop_kind::forward_inference,
1061 algorithm::pooling_max, memory::format_tag::ncdhw,
1062 memory::format_tag::ncdhw,
1063 EXPAND_SIZES_3D(1, 256, 12, 12, 12, 12, 12, 12, 2, 2, 2,
1064 0, 0, 0, 0, 0, 0, 1, 1, 1)}));
1065
1066CPU_INSTANTIATE_TEST_SUITE_P(TestPooling3Dunet_ndhwc, pooling_test_float,
1067 ::testing::Values(
1068 pool_test_params_t {prop_kind::forward_inference,
1069 algorithm::pooling_max, memory::format_tag::ndhwc,
1070 memory::format_tag::ndhwc,
1071 EXPAND_SIZES_3D(1, 64, 64, 64, 64, 64, 64, 64, 2, 2, 2,
1072 0, 0, 0, 0, 0, 0, 1, 1, 1)},
1073 pool_test_params_t {prop_kind::forward_inference,
1074 algorithm::pooling_max, memory::format_tag::ndhwc,
1075 memory::format_tag::ndhwc,
1076 EXPAND_SIZES_3D(1, 128, 28, 28, 28, 28, 28, 28, 2, 2, 2,
1077 0, 0, 0, 0, 0, 0, 1, 1, 1)},
1078 pool_test_params_t {prop_kind::forward_inference,
1079 algorithm::pooling_max, memory::format_tag::ndhwc,
1080 memory::format_tag::ndhwc,
1081 EXPAND_SIZES_3D(1, 256, 12, 12, 12, 12, 12, 12, 2, 2, 2,
1082 0, 0, 0, 0, 0, 0, 1, 1, 1)}));
1083
1084CPU_INSTANTIATE_TEST_SUITE_P(TestPooling3Dunet_blocked, pooling_test_float,
1085 ::testing::Values(
1086 pool_test_params_t {prop_kind::forward_inference,
1087 algorithm::pooling_max, memory::format_tag::nCdhw16c,
1088 memory::format_tag::nCdhw16c,
1089 EXPAND_SIZES_3D(1, 64, 64, 64, 64, 64, 64, 64, 2, 2, 2,
1090 0, 0, 0, 0, 0, 0, 1, 1, 1)},
1091 pool_test_params_t {prop_kind::forward_inference,
1092 algorithm::pooling_max, memory::format_tag::nCdhw16c,
1093 memory::format_tag::nCdhw16c,
1094 EXPAND_SIZES_3D(1, 128, 28, 28, 28, 28, 28, 28, 2, 2, 2,
1095 0, 0, 0, 0, 0, 0, 1, 1, 1)},
1096 pool_test_params_t {prop_kind::forward_inference,
1097 algorithm::pooling_max, memory::format_tag::nCdhw16c,
1098 memory::format_tag::nCdhw16c,
1099 EXPAND_SIZES_3D(1, 256, 12, 12, 12, 12, 12, 12, 2, 2, 2,
1100 0, 0, 0, 0, 0, 0, 1, 1, 1)}));
1101
1102CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingForwardMax, pooling_test_float,
1103 ::testing::Values(
1104 pool_test_params_float {prop_kind::forward_training,
1105 algorithm::pooling_max, memory::format_tag::nchw,
1106 memory::format_tag::nchw,
1107 EXPAND_SIZES_2D(
1108 2, 4, 4, 4, 4, 4, 3, 3, 0, 0, 1, 1, 1, 1)},
1109 pool_test_params_float {prop_kind::forward_inference,
1110 algorithm::pooling_max, memory::format_tag::nchw,
1111 memory::format_tag::nchw,
1112 EXPAND_SIZES_2D(
1113 2, 4, 4, 4, 4, 4, 3, 3, 0, 0, 1, 1, 1, 1)},
1114 pool_test_params_float {prop_kind::forward_training,
1115 algorithm::pooling_max, memory::format_tag::nchw,
1116 memory::format_tag::nchw,
1117 EXPAND_SIZES_2D(
1118 2, 4, 4, 4, 2, 2, 3, 3, 1, 1, 0, 0, 1, 1)},
1119 pool_test_params_float {prop_kind::forward_inference,
1120 algorithm::pooling_max, memory::format_tag::nchw,
1121 memory::format_tag::nchw,
1122 EXPAND_SIZES_2D(
1123 2, 4, 4, 4, 2, 2, 3, 3, 3, 3, 0, 0, 1, 1)}));
1124
1125CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingForwardMaxNHWC, pooling_test_float,
1126 ::testing::Values(pool_test_params_float {prop_kind::forward_training,
1127 algorithm::pooling_max, memory::format_tag::nhwc,
1128 memory::format_tag::nhwc,
1129 EXPAND_SIZES_2D(2, 4, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)}));
1130
1131CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingForwardMaxBlocked, pooling_test_float,
1132 ::testing::Values(
1133 pool_test_params_float {prop_kind::forward_training,
1134 algorithm::pooling_max, memory::format_tag::nChw8c,
1135 memory::format_tag::nChw8c,
1136 EXPAND_SIZES_2D(
1137 2, 32, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
1138 pool_test_params_float {prop_kind::forward_training,
1139 algorithm::pooling_max, memory::format_tag::nChw8c,
1140 memory::format_tag::nChw8c,
1141 EXPAND_SIZES_2D(
1142 2, 32, 13, 13, 12, 12, 3, 3, 0, 0, 0, 0, 1, 1)},
1143 pool_test_params_float {prop_kind::forward_training,
1144 algorithm::pooling_max, memory::format_tag::nChw8c,
1145 memory::format_tag::nChw8c,
1146 EXPAND_SIZES_2D(
1147 2, 32, 4, 4, 4, 4, 3, 3, 0, 0, 0, 0, 1, 1)},
1148 pool_test_params_float {prop_kind::forward_training,
1149 algorithm::pooling_max, memory::format_tag::nChw8c,
1150 memory::format_tag::nChw8c,
1151 EXPAND_SIZES_2D(
1152 2, 32, 3, 3, 4, 4, 3, 3, 1, 1, 1, 1, 1, 1)},
1153 pool_test_params_float {prop_kind::forward_training,
1154 algorithm::pooling_max, memory::format_tag::nChw8c,
1155 memory::format_tag::nChw8c,
1156 EXPAND_SIZES_2D(
1157 2, 32, 3, 3, 2, 2, 3, 3, 1, 1, 0, 0, 1, 1)},
1158 pool_test_params_float {prop_kind::forward_training,
1159 algorithm::pooling_max, memory::format_tag::nChw8c,
1160 memory::format_tag::nChw8c,
1161 EXPAND_SIZES_2D(
1162 122, 32, 32, 2, 32, 2, 3, 3, 2, 2, 1, 1, 1, 1)}
1163
1164 ));
1165
1166CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingForwardMaxBlockedPerf,
1167 pooling_test_float,
1168 ::testing::Values(
1169 pool_test_params_float {prop_kind::forward_training,
1170 algorithm::pooling_max, memory::format_tag::nChw8c,
1171 memory::format_tag::nChw8c,
1172 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 0,
1173 0, 2, 2)},
1174 pool_test_params_float {prop_kind::forward_training,
1175 algorithm::pooling_max, memory::format_tag::nChw8c,
1176 memory::format_tag::nChw8c,
1177 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 1, 1, 0,
1178 0, 2, 2)}));
1179
1180CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingForwardAvgBlockedPerf,
1181 pooling_test_float,
1182 ::testing::Values(
1183 pool_test_params_float {prop_kind::forward_training,
1184 algorithm::pooling_avg_exclude_padding,
1185 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1186 EXPAND_SIZES_2D(
1187 1, 8, 3, 3, 3, 3, 3, 3, 0, 0, 1, 1, 1, 1)},
1188 pool_test_params_float {prop_kind::forward_training,
1189 algorithm::pooling_avg_include_padding,
1190 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1191 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 0,
1192 0, 2, 2)},
1193 pool_test_params_float {prop_kind::forward_training,
1194 algorithm::pooling_avg_exclude_padding,
1195 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1196 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 0,
1197 0, 2, 2)},
1198 pool_test_params_float {prop_kind::forward_training,
1199 algorithm::pooling_avg_include_padding,
1200 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1201 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 0,
1202 0, 2, 2)},
1203 pool_test_params_float {prop_kind::forward_training,
1204 algorithm::pooling_avg_exclude_padding,
1205 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1206 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 1, 1, 0,
1207 0, 2, 2)}));
1208
1209CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingForwardMaxBlocked16, pooling_test_float,
1210 ::testing::Values(
1211 pool_test_params_float {prop_kind::forward_training,
1212 algorithm::pooling_max, memory::format_tag::nChw16c,
1213 memory::format_tag::nChw16c,
1214 EXPAND_SIZES_2D(
1215 2, 32, 4, 4, 2, 2, 3, 3, 0, 0, 0, 0, 1, 1)},
1216 pool_test_params_float {prop_kind::forward_training,
1217 algorithm::pooling_max, memory::format_tag::nChw16c,
1218 memory::format_tag::nChw16c,
1219 EXPAND_SIZES_2D(
1220 2, 32, 13, 13, 12, 12, 3, 3, 0, 0, 0, 0, 1, 1)},
1221 pool_test_params_float {prop_kind::forward_training,
1222 algorithm::pooling_max, memory::format_tag::nChw16c,
1223 memory::format_tag::nChw16c,
1224 EXPAND_SIZES_2D(
1225 2, 32, 4, 4, 4, 4, 3, 3, 0, 0, 0, 0, 1, 1)},
1226 pool_test_params_float {prop_kind::forward_training,
1227 algorithm::pooling_max, memory::format_tag::nChw16c,
1228 memory::format_tag::nChw16c,
1229 EXPAND_SIZES_2D(
1230 2, 32, 3, 3, 4, 4, 3, 3, 1, 1, 1, 1, 1, 1)},
1231 pool_test_params_float {prop_kind::forward_training,
1232 algorithm::pooling_max, memory::format_tag::nChw16c,
1233 memory::format_tag::nChw16c,
1234 EXPAND_SIZES_2D(
1235 2, 32, 3, 3, 2, 2, 3, 3, 1, 1, 0, 0, 1, 1)},
1236 pool_test_params_float {prop_kind::forward_training,
1237 algorithm::pooling_max, memory::format_tag::nChw16c,
1238 memory::format_tag::nChw16c,
1239 EXPAND_SIZES_2D(
1240 122, 32, 32, 2, 32, 2, 3, 3, 2, 2, 1, 1, 1, 1)}
1241
1242 ));
1243
1244CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingForwardMaxBlocked16Perf,
1245 pooling_test_float,
1246 ::testing::Values(
1247 pool_test_params_float {prop_kind::forward_training,
1248 algorithm::pooling_max, memory::format_tag::nChw16c,
1249 memory::format_tag::nChw16c,
1250 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 0,
1251 0, 2, 2)},
1252 pool_test_params_float {prop_kind::forward_training,
1253 algorithm::pooling_max, memory::format_tag::nChw16c,
1254 memory::format_tag::nChw16c,
1255 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 1, 1, 0,
1256 0, 2, 2)}));
1257
1258CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingForwardAvgBlocked16Perf,
1259 pooling_test_float,
1260 ::testing::Values(pool_test_params_float {prop_kind::forward_training,
1261 algorithm::pooling_avg_include_padding,
1262 memory::format_tag::nChw16c,
1263 memory::format_tag::nChw16c,
1264 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3,
1265 0, 0, 0, 0, 2, 2)},
1266 pool_test_params_float {prop_kind::forward_training,
1267 algorithm::pooling_avg_exclude_padding,
1268 memory::format_tag::nChw16c,
1269 memory::format_tag::nChw16c,
1270 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 0,
1271 0, 2, 2)},
1272 pool_test_params_float {prop_kind::forward_training,
1273 algorithm::pooling_avg_include_padding,
1274 memory::format_tag::nChw16c,
1275 memory::format_tag::nChw16c,
1276 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 1, 1, 0,
1277 0, 2, 2)},
1278 pool_test_params_float {prop_kind::forward_training,
1279 algorithm::pooling_avg_exclude_padding,
1280 memory::format_tag::nChw16c,
1281 memory::format_tag::nChw16c,
1282 EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 2, 2, 0,
1283 0, 2, 2)}));
1284
1285CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAlexnetForwardMaxNCHW,
1286 pooling_test_float,
1287 ::testing::Values(
1288 pool_test_params_float {prop_kind::forward_training,
1289 algorithm::pooling_max, memory::format_tag::nchw,
1290 memory::format_tag::nchw,
1291 EXPAND_SIZES_2D(
1292 2, 16, 55, 55, 27, 27, 3, 3, 0, 0, 0, 0, 2, 2)},
1293 pool_test_params_float {prop_kind::forward_inference,
1294 algorithm::pooling_max, memory::format_tag::nchw,
1295 memory::format_tag::nchw,
1296 EXPAND_SIZES_2D(
1297 2, 16, 55, 55, 27, 27, 3, 3, 0, 0, 0, 0, 2, 2)},
1298 pool_test_params_float {prop_kind::forward_training,
1299 algorithm::pooling_max, memory::format_tag::nchw,
1300 memory::format_tag::nchw,
1301 EXPAND_SIZES_2D(
1302 2, 16, 27, 27, 13, 13, 3, 3, 0, 0, 0, 0, 2, 2)},
1303 pool_test_params_float {prop_kind::forward_inference,
1304 algorithm::pooling_max, memory::format_tag::nchw,
1305 memory::format_tag::nchw,
1306 EXPAND_SIZES_2D(
1307 2, 16, 27, 27, 13, 13, 3, 3, 0, 0, 0, 0, 2, 2)},
1308 pool_test_params_float {prop_kind::forward_training,
1309 algorithm::pooling_max, memory::format_tag::nchw,
1310 memory::format_tag::nchw,
1311 EXPAND_SIZES_2D(
1312 2, 16, 13, 13, 6, 6, 3, 3, 0, 0, 0, 0, 2, 2)},
1313 pool_test_params_float {prop_kind::forward_inference,
1314 algorithm::pooling_max, memory::format_tag::nchw,
1315 memory::format_tag::nchw,
1316 EXPAND_SIZES_2D(
1317 2, 16, 13, 13, 6, 6, 3, 3, 0, 0, 0, 0, 2, 2)}));
1318
1319CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAlexnetForwardMaxBlocked,
1320 pooling_test_float,
1321 ::testing::Values(
1322 pool_test_params_float {prop_kind::forward_training,
1323 algorithm::pooling_max, memory::format_tag::nChw8c,
1324 memory::format_tag::nChw8c,
1325 EXPAND_SIZES_2D(
1326 2, 16, 55, 55, 27, 27, 3, 3, 0, 0, 0, 0, 2, 2)},
1327 pool_test_params_float {prop_kind::forward_inference,
1328 algorithm::pooling_max, memory::format_tag::nChw8c,
1329 memory::format_tag::nChw8c,
1330 EXPAND_SIZES_2D(
1331 2, 16, 55, 55, 27, 27, 3, 3, 0, 0, 0, 0, 2, 2)},
1332 pool_test_params_float {prop_kind::forward_training,
1333 algorithm::pooling_max, memory::format_tag::nChw8c,
1334 memory::format_tag::nChw8c,
1335 EXPAND_SIZES_2D(
1336 2, 16, 27, 27, 13, 13, 3, 3, 0, 0, 0, 0, 2, 2)},
1337 pool_test_params_float {prop_kind::forward_inference,
1338 algorithm::pooling_max, memory::format_tag::nChw8c,
1339 memory::format_tag::nChw8c,
1340 EXPAND_SIZES_2D(
1341 2, 16, 27, 27, 13, 13, 3, 3, 0, 0, 0, 0, 2, 2)},
1342 pool_test_params_float {prop_kind::forward_training,
1343 algorithm::pooling_max, memory::format_tag::nChw8c,
1344 memory::format_tag::nChw8c,
1345 EXPAND_SIZES_2D(
1346 2, 16, 13, 13, 6, 6, 3, 3, 0, 0, 0, 0, 2, 2)},
1347 pool_test_params_float {prop_kind::forward_inference,
1348 algorithm::pooling_max, memory::format_tag::nChw8c,
1349 memory::format_tag::nChw8c,
1350 EXPAND_SIZES_2D(
1351 2, 16, 13, 13, 6, 6, 3, 3, 0, 0, 0, 0, 2, 2)}));
1352
1353CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAlexnetForwardMaxBlocked16,
1354 pooling_test_float,
1355 ::testing::Values(
1356 pool_test_params_float {prop_kind::forward_training,
1357 algorithm::pooling_max, memory::format_tag::nChw16c,
1358 memory::format_tag::nChw16c,
1359 EXPAND_SIZES_2D(
1360 2, 16, 55, 55, 27, 27, 3, 3, 0, 0, 0, 0, 2, 2)},
1361 pool_test_params_float {prop_kind::forward_inference,
1362 algorithm::pooling_max, memory::format_tag::nChw16c,
1363 memory::format_tag::nChw16c,
1364 EXPAND_SIZES_2D(
1365 2, 16, 55, 55, 27, 27, 3, 3, 0, 0, 0, 0, 2, 2)},
1366 pool_test_params_float {prop_kind::forward_training,
1367 algorithm::pooling_max, memory::format_tag::nChw16c,
1368 memory::format_tag::nChw16c,
1369 EXPAND_SIZES_2D(
1370 2, 16, 27, 27, 13, 13, 3, 3, 0, 0, 0, 0, 2, 2)},
1371 pool_test_params_float {prop_kind::forward_inference,
1372 algorithm::pooling_max, memory::format_tag::nChw16c,
1373 memory::format_tag::nChw16c,
1374 EXPAND_SIZES_2D(
1375 2, 16, 27, 27, 13, 13, 3, 3, 0, 0, 0, 0, 2, 2)},
1376 pool_test_params_float {prop_kind::forward_training,
1377 algorithm::pooling_max, memory::format_tag::nChw16c,
1378 memory::format_tag::nChw16c,
1379 EXPAND_SIZES_2D(
1380 2, 16, 13, 13, 6, 6, 3, 3, 0, 0, 0, 0, 2, 2)},
1381 pool_test_params_float {prop_kind::forward_inference,
1382 algorithm::pooling_max, memory::format_tag::nChw16c,
1383 memory::format_tag::nChw16c,
1384 EXPAND_SIZES_2D(
1385 2, 16, 13, 13, 6, 6, 3, 3, 0, 0, 0, 0, 2, 2)}));
1386
1387CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingMaxBlockedStride1, pooling_test_float,
1388 ::testing::Values(
1389 pool_test_params_float {prop_kind::forward_training,
1390 algorithm::pooling_max, memory::format_tag::nChw8c,
1391 memory::format_tag::nChw8c,
1392 EXPAND_SIZES_2D(
1393 2, 16, 55, 55, 53, 53, 3, 3, 0, 0, 0, 0, 1, 1)},
1394 pool_test_params_float {prop_kind::forward_inference,
1395 algorithm::pooling_max, memory::format_tag::nChw8c,
1396 memory::format_tag::nChw8c,
1397 EXPAND_SIZES_2D(
1398 2, 16, 55, 55, 53, 53, 3, 3, 0, 0, 0, 0, 1, 1)},
1399 pool_test_params_float {prop_kind::forward_training,
1400 algorithm::pooling_max, memory::format_tag::nChw8c,
1401 memory::format_tag::nChw8c,
1402 EXPAND_SIZES_2D(
1403 2, 16, 27, 27, 25, 25, 3, 3, 0, 0, 0, 0, 1, 1)},
1404 pool_test_params_float {prop_kind::forward_inference,
1405 algorithm::pooling_max, memory::format_tag::nChw8c,
1406 memory::format_tag::nChw8c,
1407 EXPAND_SIZES_2D(
1408 2, 16, 27, 27, 25, 25, 3, 3, 0, 0, 0, 0, 1, 1)},
1409 pool_test_params_float {prop_kind::forward_training,
1410 algorithm::pooling_max, memory::format_tag::nChw8c,
1411 memory::format_tag::nChw8c,
1412 EXPAND_SIZES_2D(
1413 2, 16, 13, 13, 11, 11, 3, 3, 1, 1, 0, 0, 1, 1)},
1414 pool_test_params_float {prop_kind::forward_inference,
1415 algorithm::pooling_max, memory::format_tag::nChw8c,
1416 memory::format_tag::nChw8c,
1417 EXPAND_SIZES_2D(2, 16, 13, 13, 11, 11, 3, 3, 2, 2, 0, 0,
1418 1, 1)}));
1419
1420CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingMaxCIFAR10NCHW, pooling_test_float,
1421 ::testing::Values(
1422 pool_test_params_float {prop_kind::forward_training,
1423 algorithm::pooling_max, memory::format_tag::nchw,
1424 memory::format_tag::nchw,
1425 EXPAND_SIZES_2D(
1426 2, 32, 32, 32, 16, 16, 3, 3, 0, 0, 0, 0, 2, 2)},
1427 pool_test_params_float {prop_kind::forward_inference,
1428 algorithm::pooling_max, memory::format_tag::nchw,
1429 memory::format_tag::nchw,
1430 EXPAND_SIZES_2D(2, 32, 32, 32, 16, 16, 3, 3, 0, 0, 0, 0,
1431 2, 2)}));
1432
1433CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAvgCIFAR10NCHW, pooling_test_float,
1434 ::testing::Values(
1435 pool_test_params_float {prop_kind::forward_training,
1436 algorithm::pooling_avg_include_padding,
1437 memory::format_tag::nchw, memory::format_tag::nchw,
1438 EXPAND_SIZES_2D(
1439 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 0, 0, 2, 2)},
1440 pool_test_params_float {prop_kind::forward_training,
1441 algorithm::pooling_avg_exclude_padding,
1442 memory::format_tag::nchw, memory::format_tag::nchw,
1443 EXPAND_SIZES_2D(
1444 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 0, 0, 2, 2)},
1445 pool_test_params_float {prop_kind::forward_inference,
1446 algorithm::pooling_avg_include_padding,
1447 memory::format_tag::nchw, memory::format_tag::nchw,
1448 EXPAND_SIZES_2D(
1449 2, 32, 16, 15, 8, 8, 3, 3, 0, 0, 0, 0, 2, 2)},
1450 pool_test_params_float {prop_kind::forward_inference,
1451 algorithm::pooling_avg_exclude_padding,
1452 memory::format_tag::nchw, memory::format_tag::nchw,
1453 EXPAND_SIZES_2D(
1454 2, 32, 16, 15, 8, 8, 3, 3, 0, 0, 0, 0, 2, 2)},
1455 pool_test_params_float {prop_kind::forward_training,
1456 algorithm::pooling_avg_include_padding,
1457 memory::format_tag::nchw, memory::format_tag::nchw,
1458 EXPAND_SIZES_2D(
1459 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 0, 0, 2, 2)},
1460 pool_test_params_float {prop_kind::forward_training,
1461 algorithm::pooling_avg_exclude_padding,
1462 memory::format_tag::nchw, memory::format_tag::nchw,
1463 EXPAND_SIZES_2D(
1464 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 0, 0, 2, 2)},
1465 pool_test_params_float {prop_kind::forward_inference,
1466 algorithm::pooling_avg_exclude_padding,
1467 memory::format_tag::nchw, memory::format_tag::nchw,
1468 EXPAND_SIZES_2D(
1469 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 0, 0, 2, 2)},
1470 pool_test_params_float {prop_kind::forward_inference,
1471 algorithm::pooling_avg_include_padding,
1472 memory::format_tag::nchw, memory::format_tag::nchw,
1473 EXPAND_SIZES_2D(
1474 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 0, 0, 2, 2)}));
1475
1476CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingMaxCIFAR10Blocked, pooling_test_float,
1477 ::testing::Values(
1478 pool_test_params_float {prop_kind::forward_training,
1479 algorithm::pooling_max, memory::format_tag::nChw8c,
1480 memory::format_tag::nChw8c,
1481 EXPAND_SIZES_2D(
1482 2, 32, 32, 32, 16, 16, 3, 3, 0, 0, 0, 0, 2, 2)},
1483 pool_test_params_float {prop_kind::forward_inference,
1484 algorithm::pooling_max, memory::format_tag::nChw8c,
1485 memory::format_tag::nChw8c,
1486 EXPAND_SIZES_2D(2, 32, 32, 32, 16, 16, 3, 3, 0, 0, 0, 0,
1487 2, 2)}));
1488
1489CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAvgCIFAR10Blocked, pooling_test_float,
1490 ::testing::Values(
1491 pool_test_params_float {prop_kind::forward_training,
1492 algorithm::pooling_avg_include_padding,
1493 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1494 EXPAND_SIZES_2D(
1495 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 0, 0, 2, 2)},
1496 pool_test_params_float {prop_kind::forward_training,
1497 algorithm::pooling_avg_exclude_padding,
1498 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1499 EXPAND_SIZES_2D(
1500 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 0, 0, 2, 2)},
1501 pool_test_params_float {prop_kind::forward_inference,
1502 algorithm::pooling_avg_include_padding,
1503 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1504 EXPAND_SIZES_2D(
1505 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 0, 0, 2, 2)},
1506 pool_test_params_float {prop_kind::forward_inference,
1507 algorithm::pooling_avg_exclude_padding,
1508 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1509 EXPAND_SIZES_2D(
1510 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 0, 0, 2, 2)},
1511 pool_test_params_float {prop_kind::forward_training,
1512 algorithm::pooling_avg_include_padding,
1513 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1514 EXPAND_SIZES_2D(
1515 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 0, 0, 2, 2)},
1516 pool_test_params_float {prop_kind::forward_training,
1517 algorithm::pooling_avg_exclude_padding,
1518 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1519 EXPAND_SIZES_2D(
1520 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 0, 0, 2, 2)},
1521 pool_test_params_float {prop_kind::forward_inference,
1522 algorithm::pooling_avg_include_padding,
1523 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1524 EXPAND_SIZES_2D(
1525 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 0, 0, 2, 2)},
1526 pool_test_params_float {prop_kind::forward_inference,
1527 algorithm::pooling_avg_exclude_padding,
1528 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1529 EXPAND_SIZES_2D(
1530 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 0, 0, 2, 2)}));
1531
1532CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingMaxCIFAR10Blocked16, pooling_test_float,
1533 ::testing::Values(
1534 pool_test_params_float {prop_kind::forward_training,
1535 algorithm::pooling_max, memory::format_tag::nChw16c,
1536 memory::format_tag::nChw16c,
1537 EXPAND_SIZES_2D(
1538 2, 32, 32, 32, 16, 16, 3, 3, 0, 0, 0, 0, 2, 2)},
1539 pool_test_params_float {prop_kind::forward_inference,
1540 algorithm::pooling_max, memory::format_tag::nChw16c,
1541 memory::format_tag::nChw16c,
1542 EXPAND_SIZES_2D(2, 32, 32, 32, 16, 16, 3, 3, 0, 0, 0, 0,
1543 2, 2)}));
1544
1545CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAvgCIFAR10Blocked16, pooling_test_float,
1546 ::testing::Values(pool_test_params_float {prop_kind::forward_training,
1547 algorithm::pooling_avg_include_padding,
1548 memory::format_tag::nChw16c,
1549 memory::format_tag::nChw16c,
1550 EXPAND_SIZES_2D(2, 32, 16, 16, 8, 8, 3, 3, 0,
1551 0, 0, 0, 2, 2)},
1552 pool_test_params_float {prop_kind::forward_training,
1553 algorithm::pooling_avg_exclude_padding,
1554 memory::format_tag::nChw16c,
1555 memory::format_tag::nChw16c,
1556 EXPAND_SIZES_2D(
1557 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 0, 0, 2, 2)},
1558 pool_test_params_float {prop_kind::forward_inference,
1559 algorithm::pooling_avg_include_padding,
1560 memory::format_tag::nChw16c,
1561 memory::format_tag::nChw16c,
1562 EXPAND_SIZES_2D(
1563 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 0, 0, 2, 2)},
1564 pool_test_params_float {prop_kind::forward_inference,
1565 algorithm::pooling_avg_exclude_padding,
1566 memory::format_tag::nChw16c,
1567 memory::format_tag::nChw16c,
1568 EXPAND_SIZES_2D(
1569 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 0, 0, 2, 2)},
1570 pool_test_params_float {prop_kind::forward_training,
1571 algorithm::pooling_avg_include_padding,
1572 memory::format_tag::nChw16c,
1573 memory::format_tag::nChw16c,
1574 EXPAND_SIZES_2D(
1575 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 0, 0, 2, 2)},
1576 pool_test_params_float {prop_kind::forward_training,
1577 algorithm::pooling_avg_exclude_padding,
1578 memory::format_tag::nChw16c,
1579 memory::format_tag::nChw16c,
1580 EXPAND_SIZES_2D(
1581 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 0, 0, 2, 2)},
1582 pool_test_params_float {prop_kind::forward_inference,
1583 algorithm::pooling_avg_include_padding,
1584 memory::format_tag::nChw16c,
1585 memory::format_tag::nChw16c,
1586 EXPAND_SIZES_2D(
1587 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 0, 0, 2, 2)},
1588 pool_test_params_float {prop_kind::forward_inference,
1589 algorithm::pooling_avg_exclude_padding,
1590 memory::format_tag::nChw16c,
1591 memory::format_tag::nChw16c,
1592 EXPAND_SIZES_2D(
1593 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 0, 0, 2, 2)}));
1594
1595CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingMaxGoogleNetV1NCHW, pooling_test_float,
1596 ::testing::Values(
1597 pool_test_params_float {prop_kind::forward_training,
1598 algorithm::pooling_max, memory::format_tag::nchw,
1599 memory::format_tag::nchw,
1600 EXPAND_SIZES_2D(
1601 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1602 pool_test_params_float {prop_kind::forward_inference,
1603 algorithm::pooling_max, memory::format_tag::nchw,
1604 memory::format_tag::nchw,
1605 EXPAND_SIZES_2D(
1606 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1607 pool_test_params_float {prop_kind::forward_training,
1608 algorithm::pooling_max, memory::format_tag::nchw,
1609 memory::format_tag::nchw,
1610 EXPAND_SIZES_2D(
1611 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1612 pool_test_params_float {prop_kind::forward_inference,
1613 algorithm::pooling_max, memory::format_tag::nchw,
1614 memory::format_tag::nchw,
1615 EXPAND_SIZES_2D(
1616 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1617 pool_test_params_float {prop_kind::forward_training,
1618 algorithm::pooling_max, memory::format_tag::nchw,
1619 memory::format_tag::nchw,
1620 EXPAND_SIZES_2D(
1621 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1622 pool_test_params_float {prop_kind::forward_inference,
1623 algorithm::pooling_max, memory::format_tag::nchw,
1624 memory::format_tag::nchw,
1625 EXPAND_SIZES_2D(
1626 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)}));
1627
1628CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingMaxGoogleNetV1Blocked,
1629 pooling_test_float,
1630 ::testing::Values(
1631 pool_test_params_float {prop_kind::forward_training,
1632 algorithm::pooling_max, memory::format_tag::nChw8c,
1633 memory::format_tag::nChw8c,
1634 EXPAND_SIZES_2D(
1635 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1636 pool_test_params_float {prop_kind::forward_inference,
1637 algorithm::pooling_max, memory::format_tag::nChw8c,
1638 memory::format_tag::nChw8c,
1639 EXPAND_SIZES_2D(
1640 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1641 pool_test_params_float {prop_kind::forward_training,
1642 algorithm::pooling_max, memory::format_tag::nChw8c,
1643 memory::format_tag::nChw8c,
1644 EXPAND_SIZES_2D(
1645 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1646 pool_test_params_float {prop_kind::forward_inference,
1647 algorithm::pooling_max, memory::format_tag::nChw8c,
1648 memory::format_tag::nChw8c,
1649 EXPAND_SIZES_2D(
1650 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1651 pool_test_params_float {prop_kind::forward_training,
1652 algorithm::pooling_max, memory::format_tag::nChw8c,
1653 memory::format_tag::nChw8c,
1654 EXPAND_SIZES_2D(
1655 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1656 pool_test_params_float {prop_kind::forward_inference,
1657 algorithm::pooling_max, memory::format_tag::nChw8c,
1658 memory::format_tag::nChw8c,
1659 EXPAND_SIZES_2D(
1660 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)}));
1661
1662CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingMaxGoogleNetV1Blocked16,
1663 pooling_test_float,
1664 ::testing::Values(
1665 pool_test_params_float {prop_kind::forward_training,
1666 algorithm::pooling_max, memory::format_tag::nChw16c,
1667 memory::format_tag::nChw16c,
1668 EXPAND_SIZES_2D(
1669 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1670 pool_test_params_float {prop_kind::forward_inference,
1671 algorithm::pooling_max, memory::format_tag::nChw16c,
1672 memory::format_tag::nChw16c,
1673 EXPAND_SIZES_2D(
1674 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1675 pool_test_params_float {prop_kind::forward_training,
1676 algorithm::pooling_max, memory::format_tag::nChw16c,
1677 memory::format_tag::nChw16c,
1678 EXPAND_SIZES_2D(
1679 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1680 pool_test_params_float {prop_kind::forward_inference,
1681 algorithm::pooling_max, memory::format_tag::nChw16c,
1682 memory::format_tag::nChw16c,
1683 EXPAND_SIZES_2D(
1684 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1685 pool_test_params_float {prop_kind::forward_training,
1686 algorithm::pooling_max, memory::format_tag::nChw16c,
1687 memory::format_tag::nChw16c,
1688 EXPAND_SIZES_2D(
1689 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1690 pool_test_params_float {prop_kind::forward_inference,
1691 algorithm::pooling_max, memory::format_tag::nChw16c,
1692 memory::format_tag::nChw16c,
1693 EXPAND_SIZES_2D(
1694 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)}));
1695
1696CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingMaxResnet50NCHW, pooling_test_float,
1697 ::testing::Values(
1698 pool_test_params_float {prop_kind::forward_training,
1699 algorithm::pooling_max, memory::format_tag::nchw,
1700 memory::format_tag::nchw,
1701 EXPAND_SIZES_2D(
1702 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1703 pool_test_params_float {prop_kind::forward_inference,
1704 algorithm::pooling_max, memory::format_tag::nchw,
1705 memory::format_tag::nchw,
1706 EXPAND_SIZES_2D(
1707 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)}));
1708
1709CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingMaxResnet50Blocked, pooling_test_float,
1710 ::testing::Values(
1711 pool_test_params_float {prop_kind::forward_training,
1712 algorithm::pooling_max, memory::format_tag::nChw8c,
1713 memory::format_tag::nChw8c,
1714 EXPAND_SIZES_2D(
1715 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1716 pool_test_params_float {prop_kind::forward_inference,
1717 algorithm::pooling_max, memory::format_tag::nChw8c,
1718 memory::format_tag::nChw8c,
1719 EXPAND_SIZES_2D(
1720 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)}));
1721
1722CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingMaxResnet50Blocked16,
1723 pooling_test_float,
1724 ::testing::Values(
1725 pool_test_params_float {prop_kind::forward_training,
1726 algorithm::pooling_max, memory::format_tag::nChw16c,
1727 memory::format_tag::nChw16c,
1728 EXPAND_SIZES_2D(
1729 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1730 pool_test_params_float {prop_kind::forward_inference,
1731 algorithm::pooling_max, memory::format_tag::nChw16c,
1732 memory::format_tag::nChw16c,
1733 EXPAND_SIZES_2D(
1734 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)}));
1735
1736CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAvgGoogleNetV1NCHW, pooling_test_float,
1737 ::testing::Values(
1738 pool_test_params_float {prop_kind::forward_training,
1739 algorithm::pooling_avg_include_padding,
1740 memory::format_tag::nchw, memory::format_tag::nchw,
1741 EXPAND_SIZES_2D(
1742 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1743 pool_test_params_float {prop_kind::forward_training,
1744 algorithm::pooling_avg_exclude_padding,
1745 memory::format_tag::nchw, memory::format_tag::nchw,
1746 EXPAND_SIZES_2D(
1747 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1748 pool_test_params_float {prop_kind::forward_inference,
1749 algorithm::pooling_avg_include_padding,
1750 memory::format_tag::nchw, memory::format_tag::nchw,
1751 EXPAND_SIZES_2D(
1752 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1753 pool_test_params_float {prop_kind::forward_inference,
1754 algorithm::pooling_avg_exclude_padding,
1755 memory::format_tag::nchw, memory::format_tag::nchw,
1756 EXPAND_SIZES_2D(
1757 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1758 pool_test_params_float {prop_kind::forward_training,
1759 algorithm::pooling_avg_include_padding,
1760 memory::format_tag::nchw, memory::format_tag::nchw,
1761 EXPAND_SIZES_2D(
1762 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1763 pool_test_params_float {prop_kind::forward_training,
1764 algorithm::pooling_avg_exclude_padding,
1765 memory::format_tag::nchw, memory::format_tag::nchw,
1766 EXPAND_SIZES_2D(
1767 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1768 pool_test_params_float {prop_kind::forward_inference,
1769 algorithm::pooling_avg_include_padding,
1770 memory::format_tag::nchw, memory::format_tag::nchw,
1771 EXPAND_SIZES_2D(
1772 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1773 pool_test_params_float {prop_kind::forward_inference,
1774 algorithm::pooling_avg_exclude_padding,
1775 memory::format_tag::nchw, memory::format_tag::nchw,
1776 EXPAND_SIZES_2D(
1777 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1778 pool_test_params_float {prop_kind::forward_training,
1779 algorithm::pooling_avg_include_padding,
1780 memory::format_tag::nchw, memory::format_tag::nchw,
1781 EXPAND_SIZES_2D(
1782 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1783 pool_test_params_float {prop_kind::forward_training,
1784 algorithm::pooling_avg_exclude_padding,
1785 memory::format_tag::nchw, memory::format_tag::nchw,
1786 EXPAND_SIZES_2D(
1787 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1788 pool_test_params_float {prop_kind::forward_inference,
1789 algorithm::pooling_avg_include_padding,
1790 memory::format_tag::nchw, memory::format_tag::nchw,
1791 EXPAND_SIZES_2D(
1792 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1793 pool_test_params_float {prop_kind::forward_inference,
1794 algorithm::pooling_avg_exclude_padding,
1795 memory::format_tag::nchw, memory::format_tag::nchw,
1796 EXPAND_SIZES_2D(
1797 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)}));
1798
1799CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAvgGoogleNetV1Blocked,
1800 pooling_test_float,
1801 ::testing::Values(
1802 pool_test_params_float {prop_kind::forward_training,
1803 algorithm::pooling_avg_include_padding,
1804 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1805 EXPAND_SIZES_2D(
1806 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1807 pool_test_params_float {prop_kind::forward_training,
1808 algorithm::pooling_avg_exclude_padding,
1809 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1810 EXPAND_SIZES_2D(
1811 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1812 pool_test_params_float {prop_kind::forward_inference,
1813 algorithm::pooling_avg_include_padding,
1814 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1815 EXPAND_SIZES_2D(
1816 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1817 pool_test_params_float {prop_kind::forward_inference,
1818 algorithm::pooling_avg_exclude_padding,
1819 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1820 EXPAND_SIZES_2D(
1821 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1822 pool_test_params_float {prop_kind::forward_training,
1823 algorithm::pooling_avg_include_padding,
1824 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1825 EXPAND_SIZES_2D(
1826 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1827 pool_test_params_float {prop_kind::forward_training,
1828 algorithm::pooling_avg_exclude_padding,
1829 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1830 EXPAND_SIZES_2D(
1831 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1832 pool_test_params_float {prop_kind::forward_inference,
1833 algorithm::pooling_avg_include_padding,
1834 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1835 EXPAND_SIZES_2D(
1836 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1837 pool_test_params_float {prop_kind::forward_inference,
1838 algorithm::pooling_avg_exclude_padding,
1839 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1840 EXPAND_SIZES_2D(
1841 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1842 pool_test_params_float {prop_kind::forward_training,
1843 algorithm::pooling_avg_include_padding,
1844 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1845 EXPAND_SIZES_2D(
1846 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1847 pool_test_params_float {prop_kind::forward_training,
1848 algorithm::pooling_avg_exclude_padding,
1849 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1850 EXPAND_SIZES_2D(
1851 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1852 pool_test_params_float {prop_kind::forward_inference,
1853 algorithm::pooling_avg_include_padding,
1854 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1855 EXPAND_SIZES_2D(
1856 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1857 pool_test_params_float {prop_kind::forward_inference,
1858 algorithm::pooling_avg_exclude_padding,
1859 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1860 EXPAND_SIZES_2D(
1861 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)}));
1862
1863CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAvgGoogleNetV1Blocked16,
1864 pooling_test_float,
1865 ::testing::Values(pool_test_params_float {prop_kind::forward_training,
1866 algorithm::pooling_avg_include_padding,
1867 memory::format_tag::nChw16c,
1868 memory::format_tag::nChw16c,
1869 EXPAND_SIZES_2D(2, 512, 14, 14, 4, 4, 5, 5, 0,
1870 0, 0, 0, 3, 3)},
1871 pool_test_params_float {prop_kind::forward_training,
1872 algorithm::pooling_avg_exclude_padding,
1873 memory::format_tag::nChw16c,
1874 memory::format_tag::nChw16c,
1875 EXPAND_SIZES_2D(
1876 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1877 pool_test_params_float {prop_kind::forward_inference,
1878 algorithm::pooling_avg_include_padding,
1879 memory::format_tag::nChw16c,
1880 memory::format_tag::nChw16c,
1881 EXPAND_SIZES_2D(
1882 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1883 pool_test_params_float {prop_kind::forward_inference,
1884 algorithm::pooling_avg_exclude_padding,
1885 memory::format_tag::nChw16c,
1886 memory::format_tag::nChw16c,
1887 EXPAND_SIZES_2D(
1888 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1889 pool_test_params_float {prop_kind::forward_training,
1890 algorithm::pooling_avg_include_padding,
1891 memory::format_tag::nChw16c,
1892 memory::format_tag::nChw16c,
1893 EXPAND_SIZES_2D(
1894 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1895 pool_test_params_float {prop_kind::forward_training,
1896 algorithm::pooling_avg_exclude_padding,
1897 memory::format_tag::nChw16c,
1898 memory::format_tag::nChw16c,
1899 EXPAND_SIZES_2D(
1900 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1901 pool_test_params_float {prop_kind::forward_inference,
1902 algorithm::pooling_avg_include_padding,
1903 memory::format_tag::nChw16c,
1904 memory::format_tag::nChw16c,
1905 EXPAND_SIZES_2D(
1906 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1907 pool_test_params_float {prop_kind::forward_inference,
1908 algorithm::pooling_avg_exclude_padding,
1909 memory::format_tag::nChw16c,
1910 memory::format_tag::nChw16c,
1911 EXPAND_SIZES_2D(
1912 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 0, 0, 3, 3)},
1913 pool_test_params_float {prop_kind::forward_training,
1914 algorithm::pooling_avg_include_padding,
1915 memory::format_tag::nChw16c,
1916 memory::format_tag::nChw16c,
1917 EXPAND_SIZES_2D(
1918 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1919 pool_test_params_float {prop_kind::forward_training,
1920 algorithm::pooling_avg_exclude_padding,
1921 memory::format_tag::nChw16c,
1922 memory::format_tag::nChw16c,
1923 EXPAND_SIZES_2D(
1924 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1925 pool_test_params_float {prop_kind::forward_inference,
1926 algorithm::pooling_avg_include_padding,
1927 memory::format_tag::nChw16c,
1928 memory::format_tag::nChw16c,
1929 EXPAND_SIZES_2D(
1930 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1931 pool_test_params_float {prop_kind::forward_inference,
1932 algorithm::pooling_avg_exclude_padding,
1933 memory::format_tag::nChw16c,
1934 memory::format_tag::nChw16c,
1935 EXPAND_SIZES_2D(
1936 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)}));
1937
1938CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAvgResnet50NCHW, pooling_test_float,
1939 ::testing::Values(
1940 pool_test_params_float {prop_kind::forward_training,
1941 algorithm::pooling_avg_include_padding,
1942 memory::format_tag::nchw, memory::format_tag::nchw,
1943 EXPAND_SIZES_2D(
1944 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1945 pool_test_params_float {prop_kind::forward_training,
1946 algorithm::pooling_avg_exclude_padding,
1947 memory::format_tag::nchw, memory::format_tag::nchw,
1948 EXPAND_SIZES_2D(
1949 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1950 pool_test_params_float {prop_kind::forward_inference,
1951 algorithm::pooling_avg_include_padding,
1952 memory::format_tag::nchw, memory::format_tag::nchw,
1953 EXPAND_SIZES_2D(
1954 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1955 pool_test_params_float {prop_kind::forward_inference,
1956 algorithm::pooling_avg_exclude_padding,
1957 memory::format_tag::nchw, memory::format_tag::nchw,
1958 EXPAND_SIZES_2D(
1959 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)}));
1960
1961CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAvgResnet50Blocked, pooling_test_float,
1962 ::testing::Values(
1963 pool_test_params_float {prop_kind::forward_training,
1964 algorithm::pooling_avg_include_padding,
1965 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1966 EXPAND_SIZES_2D(
1967 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1968 pool_test_params_float {prop_kind::forward_training,
1969 algorithm::pooling_avg_exclude_padding,
1970 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1971 EXPAND_SIZES_2D(
1972 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1973 pool_test_params_float {prop_kind::forward_inference,
1974 algorithm::pooling_avg_include_padding,
1975 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1976 EXPAND_SIZES_2D(
1977 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1978 pool_test_params_float {prop_kind::forward_inference,
1979 algorithm::pooling_avg_exclude_padding,
1980 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
1981 EXPAND_SIZES_2D(
1982 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)}));
1983
1984CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAvgResnet50Blocked16,
1985 pooling_test_float,
1986 ::testing::Values(pool_test_params_float {prop_kind::forward_training,
1987 algorithm::pooling_avg_include_padding,
1988 memory::format_tag::nChw16c,
1989 memory::format_tag::nChw16c,
1990 EXPAND_SIZES_2D(2, 512, 7, 7, 1, 1, 7, 7, 0,
1991 0, 0, 0, 1, 1)},
1992 pool_test_params_float {prop_kind::forward_training,
1993 algorithm::pooling_avg_exclude_padding,
1994 memory::format_tag::nChw16c,
1995 memory::format_tag::nChw16c,
1996 EXPAND_SIZES_2D(
1997 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
1998 pool_test_params_float {prop_kind::forward_inference,
1999 algorithm::pooling_avg_include_padding,
2000 memory::format_tag::nChw16c,
2001 memory::format_tag::nChw16c,
2002 EXPAND_SIZES_2D(
2003 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)},
2004 pool_test_params_float {prop_kind::forward_inference,
2005 algorithm::pooling_avg_exclude_padding,
2006 memory::format_tag::nChw16c,
2007 memory::format_tag::nChw16c,
2008 EXPAND_SIZES_2D(
2009 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 0, 0, 1, 1)}));
2010
2011CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAsymmPadding, pooling_test_float,
2012 ::testing::Values(
2013 pool_test_params_float {prop_kind::forward_inference,
2014 algorithm::pooling_max, memory::format_tag::nChw8c,
2015 memory::format_tag::nChw8c,
2016 EXPAND_SIZES_2D(
2017 1, 8, 3, 4, 1, 5, 3, 3, 0, 0, 0, 1, 1, 1)},
2018 pool_test_params_float {prop_kind::forward_inference,
2019 algorithm::pooling_avg_include_padding,
2020 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2021 EXPAND_SIZES_2D(
2022 1, 8, 3, 4, 1, 5, 3, 3, 0, 0, 0, 1, 1, 1)},
2023 pool_test_params_float {prop_kind::forward_inference,
2024 algorithm::pooling_avg_exclude_padding,
2025 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2026 EXPAND_SIZES_2D(
2027 1, 8, 3, 4, 1, 5, 3, 3, 0, 0, 0, 1, 1, 1)}
2028
2029 ,
2030 pool_test_params_float {prop_kind::forward_inference,
2031 algorithm::pooling_max, memory::format_tag::nChw8c,
2032 memory::format_tag::nChw8c,
2033 EXPAND_SIZES_2D(
2034 1, 8, 3, 14, 1, 8, 3, 3, 0, 0, 0, 1, 1, 2)},
2035 pool_test_params_float {prop_kind::forward_inference,
2036 algorithm::pooling_avg_include_padding,
2037 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2038 EXPAND_SIZES_2D(
2039 1, 8, 3, 14, 1, 8, 3, 3, 0, 0, 0, 1, 1, 2)},
2040 pool_test_params_float {prop_kind::forward_inference,
2041 algorithm::pooling_avg_exclude_padding,
2042 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2043 EXPAND_SIZES_2D(
2044 1, 8, 3, 14, 1, 8, 3, 3, 0, 0, 0, 1, 1, 2)}
2045
2046 ,
2047 pool_test_params_float {prop_kind::forward_inference,
2048 algorithm::pooling_max, memory::format_tag::nChw8c,
2049 memory::format_tag::nChw8c,
2050 EXPAND_SIZES_2D(
2051 1, 96, 3, 100, 1, 51, 3, 3, 0, 0, 0, 1, 1, 2)},
2052 pool_test_params_float {prop_kind::forward_inference,
2053 algorithm::pooling_avg_include_padding,
2054 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2055 EXPAND_SIZES_2D(
2056 1, 96, 3, 100, 1, 51, 3, 3, 0, 0, 0, 1, 1, 2)},
2057 pool_test_params_float {prop_kind::forward_inference,
2058 algorithm::pooling_avg_exclude_padding,
2059 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2060 EXPAND_SIZES_2D(
2061 1, 96, 3, 100, 1, 51, 3, 3, 0, 0, 0, 1, 1, 2)}
2062
2063 ,
2064 pool_test_params_float {prop_kind::forward_inference,
2065 algorithm::pooling_max, memory::format_tag::nChw8c,
2066 memory::format_tag::nChw8c,
2067 EXPAND_SIZES_2D(
2068 1, 96, 3, 102, 1, 52, 3, 3, 1, 1, 0, 1, 1, 2)},
2069 pool_test_params_float {prop_kind::forward_inference,
2070 algorithm::pooling_avg_include_padding,
2071 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2072 EXPAND_SIZES_2D(
2073 1, 96, 3, 102, 1, 52, 3, 3, 1, 1, 0, 1, 1, 2)},
2074 pool_test_params_float {prop_kind::forward_inference,
2075 algorithm::pooling_avg_exclude_padding,
2076 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2077 EXPAND_SIZES_2D(
2078 1, 96, 3, 102, 1, 52, 3, 3, 2, 2, 0, 1, 1, 2)}
2079
2080 ,
2081 pool_test_params_float {prop_kind::forward_inference,
2082 algorithm::pooling_max, memory::format_tag::nChw8c,
2083 memory::format_tag::nChw8c,
2084 EXPAND_SIZES_2D(
2085 1, 96, 9, 103, 7, 52, 3, 3, 1, 1, 0, 1, 1, 2)},
2086 pool_test_params_float {prop_kind::forward_inference,
2087 algorithm::pooling_avg_include_padding,
2088 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2089 EXPAND_SIZES_2D(
2090 1, 96, 9, 103, 7, 52, 3, 3, 1, 1, 0, 1, 1, 2)},
2091 pool_test_params_float {prop_kind::forward_inference,
2092 algorithm::pooling_avg_exclude_padding,
2093 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2094 EXPAND_SIZES_2D(
2095 1, 96, 9, 103, 7, 52, 3, 3, 2, 2, 0, 1, 1, 2)}
2096
2097 ,
2098 pool_test_params_float {prop_kind::forward_inference,
2099 algorithm::pooling_max, memory::format_tag::nChw8c,
2100 memory::format_tag::nChw8c,
2101 EXPAND_SIZES_2D(1, 96, 300, 500, 151, 251, 3, 3, 1, 1,
2102 1, 1, 2, 2)},
2103 pool_test_params_float {prop_kind::forward_inference,
2104 algorithm::pooling_avg_include_padding,
2105 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2106 EXPAND_SIZES_2D(1, 96, 300, 500, 151, 251, 3, 3, 1, 1,
2107 1, 1, 2, 2)},
2108 pool_test_params_float {prop_kind::forward_inference,
2109 algorithm::pooling_avg_exclude_padding,
2110 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2111 EXPAND_SIZES_2D(1, 96, 300, 500, 151, 251, 3, 3, 2, 2,
2112 1, 1, 2, 2)}
2113
2114 ));
2115
2116CPU_INSTANTIATE_TEST_SUITE_P(TestPoolingAsymmDilation, pooling_test_float,
2117 ::testing::Values(
2118 pool_test_params_float {prop_kind::forward_inference,
2119 algorithm::pooling_max, memory::format_tag::nChw8c,
2120 memory::format_tag::nChw8c,
2121 EXPAND_SIZES_2D(
2122 1, 8, 3, 4, 1, 5, 3, 3, 1, 0, 1, 1, 1, 1)},
2123 pool_test_params_float {prop_kind::forward_inference,
2124 algorithm::pooling_avg_include_padding,
2125 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2126 EXPAND_SIZES_2D(
2127 1, 8, 3, 4, 1, 5, 3, 3, 1, 0, 1, 1, 1, 1)},
2128 pool_test_params_float {prop_kind::forward_inference,
2129 algorithm::pooling_avg_exclude_padding,
2130 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2131 EXPAND_SIZES_2D(
2132 1, 8, 3, 4, 1, 5, 3, 3, 1, 0, 1, 1, 1, 1)}
2133
2134 ,
2135 pool_test_params_float {prop_kind::forward_inference,
2136 algorithm::pooling_max, memory::format_tag::nChw8c,
2137 memory::format_tag::nChw8c,
2138 EXPAND_SIZES_2D(
2139 1, 8, 3, 4, 1, 5, 3, 3, 0, 1, 1, 1, 1, 1)},
2140 pool_test_params_float {prop_kind::forward_inference,
2141 algorithm::pooling_avg_include_padding,
2142 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2143 EXPAND_SIZES_2D(
2144 1, 8, 3, 4, 1, 5, 3, 3, 0, 1, 1, 1, 1, 1)},
2145 pool_test_params_float {prop_kind::forward_inference,
2146 algorithm::pooling_avg_exclude_padding,
2147 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2148 EXPAND_SIZES_2D(
2149 1, 8, 3, 4, 1, 5, 3, 3, 0, 1, 1, 1, 1, 1)}
2150
2151 ,
2152 pool_test_params_float {prop_kind::forward_inference,
2153 algorithm::pooling_max, memory::format_tag::nChw8c,
2154 memory::format_tag::nChw8c,
2155 EXPAND_SIZES_2D(1, 96, 300, 500, 151, 251, 3, 3, 2, 4,
2156 1, 1, 2, 2)},
2157 pool_test_params_float {prop_kind::forward_inference,
2158 algorithm::pooling_avg_include_padding,
2159 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2160 EXPAND_SIZES_2D(1, 96, 300, 500, 151, 251, 3, 3, 2, 4,
2161 1, 1, 2, 2)},
2162 pool_test_params_float {prop_kind::forward_inference,
2163 algorithm::pooling_avg_exclude_padding,
2164 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2165 EXPAND_SIZES_2D(1, 96, 300, 500, 151, 251, 3, 3, 2, 4,
2166 1, 1, 2, 2)}
2167
2168 ,
2169 pool_test_params_float {prop_kind::forward_inference,
2170 algorithm::pooling_max, memory::format_tag::nChw8c,
2171 memory::format_tag::nChw8c,
2172 EXPAND_SIZES_2D(1, 96, 300, 500, 151, 251, 3, 3, 4, 2,
2173 1, 1, 2, 2)},
2174 pool_test_params_float {prop_kind::forward_inference,
2175 algorithm::pooling_avg_include_padding,
2176 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2177 EXPAND_SIZES_2D(1, 96, 300, 500, 151, 251, 3, 3, 4, 2,
2178 1, 1, 2, 2)},
2179 pool_test_params_float {prop_kind::forward_inference,
2180 algorithm::pooling_avg_exclude_padding,
2181 memory::format_tag::nChw8c, memory::format_tag::nChw8c,
2182 EXPAND_SIZES_2D(1, 96, 300, 500, 151, 251, 3, 3, 4, 2,
2183 1, 1, 2, 2)}));
2184
2185GPU_INST_TEST_CASE(pooling_test_float);
2186
2187} // namespace dnnl
2188