Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / mkl-dnn / tests / gtests / test_pooling_forward.cpp
1 /*******************************************************************************
2 * Copyright 2016-2018 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 "mkldnn_test_common.hpp"
18 #include "gtest/gtest.h"
19
20 #include "mkldnn.hpp"
21
22 namespace mkldnn {
23
24 struct test_pool_desc_t {
25     int mb, c;
26     int id, ih, iw;
27     int od, oh, ow;
28     int kd, kh, kw;
29     int padf, padt, padl;
30     int strd, strh, strw;
31 };
32
33 struct pool_test_params {
34     prop_kind aprop_kind;
35     engine::kind engine_kind;
36     algorithm aalgorithm;
37     memory::format src_format;
38     memory::format dst_format;
39     int ndims;
40     test_pool_desc_t test_pd;
41     bool expect_to_fail;
42     mkldnn_status_t expected_status;
43 };
44
45 template <typename data_t>
46 void check_pool_fwd(const pool_test_params &p, const memory &src,
47         const memory &dst, const memory &ws)
48 {
49     data_t *src_data = (data_t *)src.get_data_handle();
50     data_t *dst_data = (data_t *)dst.get_data_handle();
51
52     auto ws_data = [=](size_t idx) -> int {
53         auto w = (unsigned char *)ws.get_data_handle();
54         if (w == nullptr) return -1;
55         if (ws.get_primitive_desc().desc().data.data_type == mkldnn_u8)
56             return (int)w[idx];
57         else
58             return ((int *)w)[idx];
59     };
60
61     const memory::desc src_d = src.get_primitive_desc().desc();
62     const memory::desc dst_d = dst.get_primitive_desc().desc();
63     const memory::desc ws_d  = ws.get_primitive_desc().desc();
64
65     auto pd = p.test_pd;
66     size_t padded_c = src_d.data.layout_desc.blocking.padding_dims[1];
67
68     mkldnn::impl::parallel_nd(pd.mb, pd.c, pd.od, pd.oh, pd.ow,
69         [&](int n, int c, int od, int oh, int ow) {
70             size_t oidx = (size_t)n * padded_c * pd.od * pd.oh * pd.ow
71                     + (size_t)c * pd.od * pd.oh * pd.ow
72                     + (size_t)od * pd.oh * pd.ow
73                     + (size_t)oh * pd.ow + ow;
74             data_t out = dst_data[map_index(dst_d, oidx)];
75             int out_index = -1;
76             if(p.aalgorithm == pooling_max
77                 && p.aprop_kind == prop_kind::forward_training) {
78                 out_index = ws_data(map_index(ws_d, oidx));
79             }
80             // match implementation for pooling_max: padding
81             // is done with lowest value and not zero, it
82             // affects the case when kernel slips into
83             // the padding area entirely
84             typename acc_t<data_t>::type acc_ref
85                     = (p.aalgorithm == pooling_max) ?
86                     std::numeric_limits<data_t>::lowest() :
87                     data_t(0);
88             int out_ref_index = 0;
89             bool is_initialized = false;
90             int num_summands = 0;
91
92             for (int kd = 0; kd < pd.kd; ++kd)
93             for (int kh = 0; kh < pd.kh; ++kh)
94             for (int kw = 0; kw < pd.kw; ++kw)
95             {
96                 const int id = od * pd.strd - pd.padf + kd;
97                 const int ih = oh * pd.strh - pd.padt + kh;
98                 const int iw = ow * pd.strw - pd.padl + kw;
99
100                 if (id < 0 || id >= pd.id) continue;
101                 if (ih < 0 || ih >= pd.ih) continue;
102                 if (iw < 0 || iw >= pd.iw) continue;
103
104                 size_t iidx
105                         = (size_t)n * padded_c * pd.id * pd.ih * pd.iw
106                         + (size_t)c * pd.id * pd.ih * pd.iw
107                         + (size_t)id * pd.ih * pd.iw
108                         + (size_t)ih * pd.iw + iw;
109
110                 data_t d = src_data[map_index(src_d, iidx)];
111                 if (p.aalgorithm == pooling_max) {
112                     if (!is_initialized) {
113                         acc_ref = d;
114                         out_ref_index = kd * pd.kw * pd.kh
115                         + kh * pd.kw + kw;
116                         is_initialized = true;
117                     } else {
118                         if (acc_ref < d) {
119                             acc_ref = d;
120                             out_ref_index = kd * pd.kw * pd.kh
121                             + kh * pd.kw + kw;
122                         }
123                     }
124                 } else if (p.aalgorithm == pooling_avg_include_padding ||
125                     p.aalgorithm == pooling_avg_exclude_padding) {
126                     acc_ref += d;
127                     num_summands++;
128                 }
129             }
130
131             if (p.aalgorithm == pooling_avg_include_padding) {
132                 num_summands = pd.kw * pd.kh * pd.kd;
133             }
134
135             if ((p.aalgorithm == pooling_avg_include_padding ||
136                 p.aalgorithm == pooling_avg_exclude_padding) &&
137                 num_summands)  {
138                 acc_ref = out_round<data_t>(
139                     (float)acc_ref / num_summands);
140             }
141
142             const data_t out_ref = (data_t)acc_ref;
143             EXPECT_NEAR(out, out_ref, 1e-6);
144             if(p.aalgorithm == pooling_max
145                 && p.aprop_kind == forward_training) {
146                 EXPECT_EQ(out_index, out_ref_index) << " n = " << n
147                 << " c = " << c << " od = " << od << " oh = " << oh
148                 << " ow = " << ow;
149             }
150         }
151     );
152 }
153
154 template <typename data_t>
155 class pooling_test : public ::testing::TestWithParam<pool_test_params> {
156     pool_test_params p;
157
158 protected:
159     virtual void SetUp() {
160         p = ::testing::TestWithParam<decltype(p)>::GetParam();
161         catch_expected_failures([=](){Test();}, p.expect_to_fail,
162                     p.expected_status);
163     }
164
165     void Test() {
166         ASSERT_TRUE(p.engine_kind == engine::kind::cpu);
167         ASSERT_TRUE(p.aprop_kind == prop_kind::forward_training
168                 || p.aprop_kind == prop_kind::forward_scoring);
169         auto eng = engine(p.engine_kind, 0);
170         memory::data_type data_type = data_traits<data_t>::data_type;
171
172         test_pool_desc_t pd = p.test_pd;
173         auto p_src_desc = (p.ndims == 5)
174             ? create_md({ pd.mb, pd.c, pd.id, pd.ih, pd.iw }, data_type,
175                 p.src_format)
176             : create_md({ pd.mb, pd.c, pd.ih, pd.iw }, data_type, p.src_format);
177         auto p_dst_desc = (p.ndims == 5)
178             ? create_md({ pd.mb, pd.c, pd.od, pd.oh, pd.ow }, data_type,
179             p.dst_format)
180             : create_md({ pd.mb, pd.c, pd.oh, pd.ow }, data_type, p.dst_format);
181
182         auto p_src = memory({p_src_desc, eng});
183         auto p_dst = memory({p_dst_desc, eng});
184
185         fill_data<data_t>(p_src.get_primitive_desc().get_size()/ sizeof(data_t),
186                 (data_t *)p_src.get_data_handle(), 1., true);
187         fill_data<data_t>(p_dst.get_primitive_desc().get_size()/ sizeof(data_t),
188                 (data_t *)p_dst.get_data_handle(), 1., true);
189         check_zero_tail<data_t>(1, p_src);
190         check_zero_tail<data_t>(1, p_dst);
191
192         // calculate right padding exactly
193         std::vector<ptrdiff_t> padR_2d = {
194             right_padding(pd.ih, pd.oh, pd.kh, pd.padt, pd.strh),
195             right_padding(pd.iw, pd.ow, pd.kw, pd.padl, pd.strw)
196         };
197         std::vector<ptrdiff_t> padR_3d = {
198             right_padding(pd.id, pd.od, pd.kd, pd.padf, pd.strd),
199             right_padding(pd.ih, pd.oh, pd.kh, pd.padt, pd.strh),
200             right_padding(pd.iw, pd.ow, pd.kw, pd.padl, pd.strw)
201         };
202
203         std::shared_ptr<memory> p_workspace;
204
205         auto pool_desc = (p.ndims == 5)
206             ? pooling_forward::desc(p.aprop_kind, p.aalgorithm,
207                     p_src_desc, p_dst_desc, {pd.strd, pd.strh, pd.strw},
208                     {pd.kd, pd.kh, pd.kw}, {pd.padf, pd.padt, pd.padl}, padR_3d,
209                     padding_kind::zero)
210             : pooling_forward::desc(p.aprop_kind, p.aalgorithm,
211                     p_src_desc, p_dst_desc, {pd.strh, pd.strw}, {pd.kh, pd.kw},
212                     {pd.padt, pd.padl}, padR_2d, padding_kind::zero);
213
214         auto pool_prim_desc
215             = pooling_forward::primitive_desc(pool_desc, eng);
216
217         bool with_workspace = true
218             && p.aprop_kind == prop_kind::forward_training
219             && p.aalgorithm == pooling_max;
220         auto p_workspace_desc = with_workspace
221             ? pool_prim_desc.workspace_primitive_desc()
222             : memory::primitive_desc( {{}, data_type, p.dst_format}, eng);
223         p_workspace.reset(new memory(p_workspace_desc));
224
225         auto pool = with_workspace
226             ? pooling_forward(pool_prim_desc, p_src, p_dst, *p_workspace)
227             : pooling_forward(pool_prim_desc, p_src, p_dst);
228
229         std::vector<primitive> pipeline;
230         pipeline.push_back(pool);
231
232         stream(stream::kind::lazy).submit(pipeline).wait();
233
234         check_pool_fwd<data_t>(p, p_src, p_dst, *p_workspace);
235         check_zero_tail<data_t>(0, p_dst);
236     }
237 };
238
239 using pooling_test_float = pooling_test<float>;
240 using pooling_test_s8 = pooling_test<int8_t>;
241 using pooling_test_u8 = pooling_test<uint8_t>;
242 using pooling_test_s32 = pooling_test<int32_t>;
243 using pool_test_params_float = pool_test_params;
244
245 //#define EXPAND_NDIMS(ndims, ...) ndims, {__VA_ARGS__}
246
247 #define EXPAND_SIZES_3D(...) 5, {__VA_ARGS__}
248 #define EXPAND_SIZES_2D(mb,ic,ih,iw,oh,ow,kh,kw,padt,padl,strh,strw) \
249     4, {mb,ic,1,ih,iw,1,oh,ow,1,kh,kw,0,padt,padl,1,strh,strw}
250
251 TEST_P(pooling_test_s8, TestsPooling)
252 {
253 }
254
255 INSTANTIATE_TEST_CASE_P(
256         TestPoolingAlexnetForwardS8, pooling_test_s8, ::testing::Values(
257             pool_test_params{ prop_kind::forward_inference,
258             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
259             memory::format::nhwc, EXPAND_SIZES_2D(1, 96, 55, 55, 27, 27, 3, 3, 0, 0, 2, 2 ) },
260             pool_test_params{ prop_kind::forward_inference,
261             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
262             memory::format::nhwc, EXPAND_SIZES_2D(1, 256, 27, 27, 13, 13, 3, 3, 0, 0, 2, 2 ) },
263             pool_test_params{ prop_kind::forward_inference,
264             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
265             memory::format::nhwc, EXPAND_SIZES_2D(1, 256, 13, 13, 6, 6, 3, 3, 0, 0, 2, 2 ) }
266             ));
267
268 INSTANTIATE_TEST_CASE_P(
269         TestPoolingForwardMaxS8, pooling_test_s8, ::testing::Values(
270             pool_test_params{ prop_kind::forward_inference,
271             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
272             memory::format::nhwc,  EXPAND_SIZES_2D(2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
273             pool_test_params{ prop_kind::forward_inference,
274             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
275             memory::format::nhwc,  EXPAND_SIZES_2D(2, 64, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1 ) },
276             pool_test_params{ prop_kind::forward_inference,
277             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
278             memory::format::nhwc,  EXPAND_SIZES_2D(2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
279             pool_test_params{ prop_kind::forward_inference,
280             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
281             memory::format::nhwc,  EXPAND_SIZES_2D(2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 ) },
282             pool_test_params{ prop_kind::forward_inference, engine::kind::cpu,
283             algorithm::pooling_max, memory::format::nhwc, memory::format::nhwc,
284              EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
285             ));
286
287 INSTANTIATE_TEST_CASE_P(
288         TestPoolingForwardAvgS8, pooling_test_s8, ::testing::Values(
289             pool_test_params{ prop_kind::forward_inference,
290             engine::kind::cpu, algorithm::pooling_avg_include_padding,
291             memory::format::nhwc, memory::format::nhwc,
292              EXPAND_SIZES_2D(2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
293             pool_test_params{ prop_kind::forward_inference,
294             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
295             memory::format::nhwc, memory::format::nhwc,
296              EXPAND_SIZES_2D(2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
297             pool_test_params{ prop_kind::forward_inference,
298             engine::kind::cpu, algorithm::pooling_avg_include_padding,
299             memory::format::nhwc, memory::format::nhwc,
300              EXPAND_SIZES_2D(2, 64, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1 ) },
301             pool_test_params{ prop_kind::forward_inference,
302             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
303             memory::format::nhwc, memory::format::nhwc,
304              EXPAND_SIZES_2D(2, 64, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1 ) },
305             pool_test_params{ prop_kind::forward_inference,
306             engine::kind::cpu, algorithm::pooling_avg_include_padding,
307             memory::format::nhwc, memory::format::nhwc,
308              EXPAND_SIZES_2D(2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
309             pool_test_params{ prop_kind::forward_inference,
310             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
311             memory::format::nhwc, memory::format::nhwc,
312              EXPAND_SIZES_2D(2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
313             pool_test_params{ prop_kind::forward_inference,
314             engine::kind::cpu, algorithm::pooling_avg_include_padding,
315             memory::format::nhwc, memory::format::nhwc,
316              EXPAND_SIZES_2D(2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 ) },
317             pool_test_params{ prop_kind::forward_inference,
318             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
319             memory::format::nhwc, memory::format::nhwc,
320              EXPAND_SIZES_2D(2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 ) },
321             pool_test_params{ prop_kind::forward_inference, engine::kind::cpu,
322             algorithm::pooling_avg_include_padding,
323             memory::format::nhwc, memory::format::nhwc,
324              EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) },
325             pool_test_params{ prop_kind::forward_inference, engine::kind::cpu,
326             algorithm::pooling_avg_exclude_padding,
327             memory::format::nhwc, memory::format::nhwc,
328              EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
329             ));
330
331 TEST_P(pooling_test_u8, TestsPooling)
332 {
333 }
334
335 INSTANTIATE_TEST_CASE_P(
336         TestPoolingForwardMaxU8, pooling_test_u8, ::testing::Values(
337             pool_test_params{ prop_kind::forward_inference,
338             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
339             memory::format::nhwc,  EXPAND_SIZES_2D(2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
340             pool_test_params{ prop_kind::forward_inference,
341             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
342             memory::format::nhwc,  EXPAND_SIZES_2D(2, 64, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1 ) },
343             pool_test_params{ prop_kind::forward_inference,
344             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
345             memory::format::nhwc,  EXPAND_SIZES_2D(2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
346             pool_test_params{ prop_kind::forward_inference,
347             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
348             memory::format::nhwc,  EXPAND_SIZES_2D(2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 ) },
349             pool_test_params{ prop_kind::forward_inference, engine::kind::cpu,
350             algorithm::pooling_max, memory::format::nhwc, memory::format::nhwc,
351              EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
352             ));
353
354 INSTANTIATE_TEST_CASE_P(
355         TestPoolingForwardAvgU8, pooling_test_u8, ::testing::Values(
356             pool_test_params{ prop_kind::forward_inference,
357             engine::kind::cpu, algorithm::pooling_avg_include_padding,
358             memory::format::nhwc, memory::format::nhwc,
359              EXPAND_SIZES_2D(2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
360             pool_test_params{ prop_kind::forward_inference,
361             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
362             memory::format::nhwc, memory::format::nhwc,
363              EXPAND_SIZES_2D(2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
364             pool_test_params{ prop_kind::forward_inference,
365             engine::kind::cpu, algorithm::pooling_avg_include_padding,
366             memory::format::nhwc, memory::format::nhwc,
367              EXPAND_SIZES_2D(2, 64, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1 ) },
368             pool_test_params{ prop_kind::forward_inference,
369             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
370             memory::format::nhwc, memory::format::nhwc,
371              EXPAND_SIZES_2D(2, 64, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1 ) },
372             pool_test_params{ prop_kind::forward_inference,
373             engine::kind::cpu, algorithm::pooling_avg_include_padding,
374             memory::format::nhwc, memory::format::nhwc,
375              EXPAND_SIZES_2D(2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
376             pool_test_params{ prop_kind::forward_inference,
377             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
378             memory::format::nhwc, memory::format::nhwc,
379              EXPAND_SIZES_2D(2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
380             pool_test_params{ prop_kind::forward_inference,
381             engine::kind::cpu, algorithm::pooling_avg_include_padding,
382             memory::format::nhwc, memory::format::nhwc,
383              EXPAND_SIZES_2D(2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 ) },
384             pool_test_params{ prop_kind::forward_inference,
385             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
386             memory::format::nhwc, memory::format::nhwc,
387              EXPAND_SIZES_2D(2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 ) },
388             pool_test_params{ prop_kind::forward_inference, engine::kind::cpu,
389             algorithm::pooling_avg_include_padding,
390             memory::format::nhwc, memory::format::nhwc,
391              EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) },
392             pool_test_params{ prop_kind::forward_inference, engine::kind::cpu,
393             algorithm::pooling_avg_exclude_padding,
394             memory::format::nhwc, memory::format::nhwc,
395              EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
396             ));
397
398 TEST_P(pooling_test_s32, TestsPooling)
399 {
400 }
401
402 INSTANTIATE_TEST_CASE_P(
403         TestPoolingAlexnetForwardS32, pooling_test_s32, ::testing::Values(
404             pool_test_params{ prop_kind::forward_inference,
405             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
406             memory::format::nhwc,  EXPAND_SIZES_2D(1, 96, 55, 55, 27, 27, 3, 3, 0, 0, 2, 2 ) },
407             pool_test_params{ prop_kind::forward_inference,
408             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
409             memory::format::nhwc,  EXPAND_SIZES_2D(1, 256, 27, 27, 13, 13, 3, 3, 0, 0, 2, 2 ) },
410             pool_test_params{ prop_kind::forward_inference,
411             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
412             memory::format::nhwc,  EXPAND_SIZES_2D(1, 256, 13, 13, 6, 6, 3, 3, 0, 0, 2, 2 ) }
413             ));
414
415 INSTANTIATE_TEST_CASE_P(
416         TestPoolingForwardMaxS32, pooling_test_s32, ::testing::Values(
417             pool_test_params{ prop_kind::forward_inference,
418             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
419             memory::format::nhwc,  EXPAND_SIZES_2D(2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
420             pool_test_params{ prop_kind::forward_inference,
421             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
422             memory::format::nhwc,  EXPAND_SIZES_2D(2, 64, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1 ) },
423             pool_test_params{ prop_kind::forward_inference,
424             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
425             memory::format::nhwc,  EXPAND_SIZES_2D(2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
426             pool_test_params{ prop_kind::forward_inference,
427             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
428             memory::format::nhwc,  EXPAND_SIZES_2D(2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 ) },
429             pool_test_params{ prop_kind::forward_inference, engine::kind::cpu,
430             algorithm::pooling_max, memory::format::nhwc, memory::format::nhwc,
431              EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
432             ));
433
434 INSTANTIATE_TEST_CASE_P(
435         TestPoolingForwardAvgS32, pooling_test_s32, ::testing::Values(
436             pool_test_params{ prop_kind::forward_inference,
437             engine::kind::cpu, algorithm::pooling_avg_include_padding,
438             memory::format::nhwc, memory::format::nhwc,
439              EXPAND_SIZES_2D(2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
440             pool_test_params{ prop_kind::forward_inference,
441             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
442             memory::format::nhwc, memory::format::nhwc,
443              EXPAND_SIZES_2D(2, 128, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
444             pool_test_params{ prop_kind::forward_inference,
445             engine::kind::cpu, algorithm::pooling_avg_include_padding,
446             memory::format::nhwc, memory::format::nhwc,
447              EXPAND_SIZES_2D(2, 64, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1 ) },
448             pool_test_params{ prop_kind::forward_inference,
449             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
450             memory::format::nhwc, memory::format::nhwc,
451              EXPAND_SIZES_2D(2, 64, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1 ) },
452             pool_test_params{ prop_kind::forward_inference,
453             engine::kind::cpu, algorithm::pooling_avg_include_padding,
454             memory::format::nhwc, memory::format::nhwc,
455              EXPAND_SIZES_2D(2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
456             pool_test_params{ prop_kind::forward_inference,
457             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
458             memory::format::nhwc, memory::format::nhwc,
459              EXPAND_SIZES_2D(2, 96, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
460             pool_test_params{ prop_kind::forward_inference,
461             engine::kind::cpu, algorithm::pooling_avg_include_padding,
462             memory::format::nhwc, memory::format::nhwc,
463              EXPAND_SIZES_2D(2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 ) },
464             pool_test_params{ prop_kind::forward_inference,
465             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
466             memory::format::nhwc, memory::format::nhwc,
467              EXPAND_SIZES_2D(2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 ) },
468             pool_test_params{ prop_kind::forward_inference, engine::kind::cpu,
469             algorithm::pooling_avg_include_padding,
470             memory::format::nhwc, memory::format::nhwc,
471              EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) },
472             pool_test_params{ prop_kind::forward_inference, engine::kind::cpu,
473             algorithm::pooling_avg_exclude_padding,
474             memory::format::nhwc, memory::format::nhwc,
475              EXPAND_SIZES_2D(16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
476             ));
477
478 TEST_P(pooling_test_float, TestsPooling)
479 {
480 }
481
482 INSTANTIATE_TEST_CASE_P(
483         TestPoolingForwardZeroDim, pooling_test_float, ::testing::Values(
484             pool_test_params_float{ prop_kind::forward_training,
485             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
486             memory::format::nchw,  EXPAND_SIZES_2D( 2, 0, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 )},
487             pool_test_params_float{ prop_kind::forward_training,
488             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
489             memory::format::nhwc,  EXPAND_SIZES_2D( 0, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 )},
490             pool_test_params_float{ prop_kind::forward_training,
491             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
492             memory::format::nchw,  EXPAND_SIZES_2D( 2, 4, 0, 4, 4, 4, 3, 3, 1, 1, 1, 1 )}
493             ));
494
495 INSTANTIATE_TEST_CASE_P(
496         TestPoolingForwardEF, pooling_test_float, ::testing::Values(
497             pool_test_params_float{ prop_kind::forward_training,
498             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
499             memory::format::nchw,  EXPAND_SIZES_2D( 2, -4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 ),
500             true, mkldnn_invalid_arguments},
501             pool_test_params_float{ prop_kind::forward_training,
502             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
503             memory::format::nchw,  EXPAND_SIZES_2D( -1, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 ),
504             true, mkldnn_invalid_arguments},
505             pool_test_params_float{ prop_kind::forward_training,
506             engine::kind::cpu, algorithm::eltwise_square, memory::format::nchw,
507             memory::format::nchw,  EXPAND_SIZES_2D( 2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 ),
508             true, mkldnn_invalid_arguments}
509             ));
510
511 INSTANTIATE_TEST_CASE_P(
512         TestPooling_nChw16c_with_padded, pooling_test_float, ::testing::Values(
513             pool_test_params{ prop_kind::forward_training,
514             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
515             memory::format::nChw16c, EXPAND_SIZES_2D(4, 17,  6,  6,  7,  7, 2, 2, 1, 1, 1, 1) },
516             pool_test_params{ prop_kind::forward_training,
517             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
518             memory::format::nChw16c, EXPAND_SIZES_2D(4, 23, 60, 60, 31, 31, 3, 4, 1, 1, 2, 2) },
519             pool_test_params{ prop_kind::forward_training,
520             engine::kind::cpu, algorithm::pooling_avg_exclude_padding, memory::format::nChw16c,
521             memory::format::nChw16c, EXPAND_SIZES_2D(4, 14, 60, 60, 31, 31, 3, 2, 1, 1, 2, 2) },
522             pool_test_params{ prop_kind::forward_training,
523             engine::kind::cpu, algorithm::pooling_avg_include_padding, memory::format::nChw16c,
524             memory::format::nChw16c, EXPAND_SIZES_2D(4, 17, 60, 60, 31, 31, 4, 3, 1, 1, 2, 2) },
525             pool_test_params{ prop_kind::forward_inference,
526             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
527             memory::format::nChw16c, EXPAND_SIZES_2D(4, 14, 60, 60, 31, 31, 2, 3, 1, 1, 2, 2) },
528             pool_test_params{ prop_kind::forward_inference,
529             engine::kind::cpu, algorithm::pooling_avg_exclude_padding, memory::format::nChw16c,
530             memory::format::nChw16c, EXPAND_SIZES_2D(4, 25, 60, 60, 31, 31, 2, 4, 1, 1, 2, 2) },
531             pool_test_params{ prop_kind::forward_inference,
532             engine::kind::cpu, algorithm::pooling_avg_include_padding, memory::format::nChw16c,
533             memory::format::nChw16c, EXPAND_SIZES_2D(4, 28, 60, 60, 31, 31, 4, 2, 1, 1, 2, 2) }
534             ));
535
536 INSTANTIATE_TEST_CASE_P(
537         TestPooling_nChw8c_with_padded, pooling_test_float, ::testing::Values(
538             pool_test_params{ prop_kind::forward_training,
539             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
540             memory::format::nChw8c, EXPAND_SIZES_2D(4, 5,  6,  6,  7,  7, 2, 2, 1, 1, 1, 1) },
541             pool_test_params{ prop_kind::forward_training,
542             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
543             memory::format::nChw8c, EXPAND_SIZES_2D(4, 9, 60, 60, 31, 31, 3, 4, 1, 1, 2, 2) },
544             pool_test_params{ prop_kind::forward_training,
545             engine::kind::cpu, algorithm::pooling_avg_exclude_padding, memory::format::nChw8c,
546             memory::format::nChw8c, EXPAND_SIZES_2D(4, 14, 60, 60, 31, 31, 3, 2, 1, 1, 2, 2) },
547             pool_test_params{ prop_kind::forward_training,
548             engine::kind::cpu, algorithm::pooling_avg_include_padding, memory::format::nChw8c,
549             memory::format::nChw8c, EXPAND_SIZES_2D(4, 17, 60, 60, 31, 31, 4, 3, 1, 1, 2, 2) },
550             pool_test_params{ prop_kind::forward_inference,
551             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
552             memory::format::nChw8c, EXPAND_SIZES_2D(4, 14, 60, 60, 31, 31, 2, 3, 1, 1, 2, 2) },
553             pool_test_params{ prop_kind::forward_inference,
554             engine::kind::cpu, algorithm::pooling_avg_exclude_padding, memory::format::nChw8c,
555             memory::format::nChw8c, EXPAND_SIZES_2D(4, 25, 60, 60, 31, 31, 2, 4, 1, 1, 2, 2) },
556             pool_test_params{ prop_kind::forward_inference,
557             engine::kind::cpu, algorithm::pooling_avg_include_padding, memory::format::nChw8c,
558             memory::format::nChw8c, EXPAND_SIZES_2D(4, 28, 60, 60, 31, 31, 4, 2, 1, 1, 2, 2) }
559             ));
560
561 INSTANTIATE_TEST_CASE_P(
562         TestPoolingForwardMaxKernelSlipsToPadding, pooling_test_float, ::testing::Values(
563             pool_test_params{ prop_kind::forward_training, engine::kind::cpu,
564             algorithm::pooling_max, memory::format::nchw,
565             memory::format::nchw, EXPAND_SIZES_2D( 1, 16, 10, 10, 6, 6, 5, 5, 10, 10, 5, 5 ) },
566             pool_test_params{ prop_kind::forward_training, engine::kind::cpu,
567             algorithm::pooling_max, memory::format::nchw,
568             memory::format::nhwc, EXPAND_SIZES_2D( 1, 16, 10, 10, 6, 6, 5, 5, 10, 10, 5, 5 ) },
569             pool_test_params{ prop_kind::forward_training, engine::kind::cpu,
570             algorithm::pooling_max, memory::format::nchw,
571             memory::format::nChw8c, EXPAND_SIZES_2D( 1, 16, 10, 10, 6, 6, 5, 5, 10, 10, 5, 5 ) },
572             pool_test_params{ prop_kind::forward_training, engine::kind::cpu,
573             algorithm::pooling_max, memory::format::nchw,
574             memory::format::nChw16c, EXPAND_SIZES_2D( 1, 16, 10, 10, 6, 6, 5, 5, 10, 10, 5, 5 ) }
575             ));
576
577 INSTANTIATE_TEST_CASE_P(
578         TestPooling3D_nCdhw16c, pooling_test_float, ::testing::Values(
579             pool_test_params{ prop_kind::forward_training,
580             engine::kind::cpu, algorithm::pooling_max, memory::format::nCdhw16c,
581             memory::format::nCdhw16c, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 3, 4, 1, 1, 1, 2, 2, 2) },
582             pool_test_params{ prop_kind::forward_training,
583             engine::kind::cpu, algorithm::pooling_avg_exclude_padding, memory::format::nCdhw16c,
584             memory::format::nCdhw16c, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 3, 2, 1, 1, 1, 2, 2, 2) },
585             pool_test_params{ prop_kind::forward_training,
586             engine::kind::cpu, algorithm::pooling_avg_include_padding, memory::format::nCdhw16c,
587             memory::format::nCdhw16c, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 4, 3, 1, 1, 1, 2, 2, 2) },
588             pool_test_params{ prop_kind::forward_inference,
589             engine::kind::cpu, algorithm::pooling_max, memory::format::nCdhw16c,
590             memory::format::nCdhw16c, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 2, 3, 1, 1, 1, 2, 2, 2) },
591             pool_test_params{ prop_kind::forward_inference,
592             engine::kind::cpu, algorithm::pooling_avg_exclude_padding, memory::format::nCdhw16c,
593             memory::format::nCdhw16c, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 2, 4, 1, 1, 1, 2, 2, 2) },
594             pool_test_params{ prop_kind::forward_inference,
595             engine::kind::cpu, algorithm::pooling_avg_include_padding, memory::format::nCdhw16c,
596             memory::format::nCdhw16c, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 4, 2, 1, 1, 1, 2, 2, 2) }
597             ));
598
599 INSTANTIATE_TEST_CASE_P(
600         TestPooling3D_nCdhw8c, pooling_test_float, ::testing::Values(
601             pool_test_params{ prop_kind::forward_training,
602             engine::kind::cpu, algorithm::pooling_max, memory::format::nCdhw8c,
603             memory::format::nCdhw8c, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 3, 4, 1, 1, 1, 2, 2, 2) },
604             pool_test_params{ prop_kind::forward_training,
605             engine::kind::cpu, algorithm::pooling_avg_exclude_padding, memory::format::nCdhw8c,
606             memory::format::nCdhw8c, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 3, 2, 1, 1, 1, 2, 2, 2) },
607             pool_test_params{ prop_kind::forward_training,
608             engine::kind::cpu, algorithm::pooling_avg_include_padding, memory::format::nCdhw8c,
609             memory::format::nCdhw8c, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 4, 3, 1, 1, 1, 2, 2, 2) },
610             pool_test_params{ prop_kind::forward_inference,
611             engine::kind::cpu, algorithm::pooling_max, memory::format::nCdhw8c,
612             memory::format::nCdhw8c, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 2, 3, 1, 1, 1, 2, 2, 2) },
613             pool_test_params{ prop_kind::forward_inference,
614             engine::kind::cpu, algorithm::pooling_avg_exclude_padding, memory::format::nCdhw8c,
615             memory::format::nCdhw8c, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 2, 4, 1, 1, 1, 2, 2, 2) },
616             pool_test_params{ prop_kind::forward_inference,
617             engine::kind::cpu, algorithm::pooling_avg_include_padding, memory::format::nCdhw8c,
618             memory::format::nCdhw8c, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 4, 2, 1, 1, 1, 2, 2, 2) }
619             ));
620
621 INSTANTIATE_TEST_CASE_P(
622         TestPooling3D_ndhwc, pooling_test_float, ::testing::Values(
623             pool_test_params{ prop_kind::forward_training,
624             engine::kind::cpu, algorithm::pooling_max, memory::format::ndhwc,
625             memory::format::ndhwc, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 3, 4, 1, 1, 1, 2, 2, 2) },
626             pool_test_params{ prop_kind::forward_training,
627             engine::kind::cpu, algorithm::pooling_avg_exclude_padding, memory::format::ndhwc,
628             memory::format::ndhwc, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 3, 2, 1, 1, 1, 2, 2, 2) },
629             pool_test_params{ prop_kind::forward_training,
630             engine::kind::cpu, algorithm::pooling_avg_include_padding, memory::format::ndhwc,
631             memory::format::ndhwc, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 4, 3, 1, 1, 1, 2, 2, 2) },
632             pool_test_params{ prop_kind::forward_inference,
633             engine::kind::cpu, algorithm::pooling_max, memory::format::ndhwc,
634             memory::format::ndhwc, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 2, 3, 1, 1, 1, 2, 2, 2) },
635             pool_test_params{ prop_kind::forward_inference,
636             engine::kind::cpu, algorithm::pooling_avg_exclude_padding, memory::format::ndhwc,
637             memory::format::ndhwc, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 2, 4, 1, 1, 1, 2, 2, 2) },
638             pool_test_params{ prop_kind::forward_inference,
639             engine::kind::cpu, algorithm::pooling_avg_include_padding, memory::format::ndhwc,
640             memory::format::ndhwc, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 4, 2, 1, 1, 1, 2, 2, 2) }
641             ));
642
643 INSTANTIATE_TEST_CASE_P(
644         TestPooling3D_ncdhw, pooling_test_float, ::testing::Values(
645             pool_test_params{ prop_kind::forward_training,
646             engine::kind::cpu, algorithm::pooling_max, memory::format::ncdhw,
647             memory::format::ncdhw, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 3, 4, 1, 1, 1, 2, 2, 2) },
648             pool_test_params{ prop_kind::forward_training,
649             engine::kind::cpu, algorithm::pooling_avg_exclude_padding, memory::format::ncdhw,
650             memory::format::ncdhw, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 3, 2, 1, 1, 1, 2, 2, 2) },
651             pool_test_params{ prop_kind::forward_training,
652             engine::kind::cpu, algorithm::pooling_avg_include_padding, memory::format::ncdhw,
653             memory::format::ncdhw, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 2, 4, 3, 1, 1, 1, 2, 2, 2) },
654             pool_test_params{ prop_kind::forward_inference,
655             engine::kind::cpu, algorithm::pooling_max, memory::format::ncdhw,
656             memory::format::ncdhw, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 4, 2, 3, 1, 1, 1, 2, 2, 2) },
657             pool_test_params{ prop_kind::forward_inference,
658             engine::kind::cpu, algorithm::pooling_avg_exclude_padding, memory::format::ncdhw,
659             memory::format::ncdhw, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 2, 4, 1, 1, 1, 2, 2, 2) },
660             pool_test_params{ prop_kind::forward_inference,
661             engine::kind::cpu, algorithm::pooling_avg_include_padding, memory::format::ncdhw,
662             memory::format::ncdhw, EXPAND_SIZES_3D(2, 32, 60, 60, 60, 31, 31, 31, 3, 4, 2, 1, 1, 1, 2, 2, 2) }
663             ));
664
665 INSTANTIATE_TEST_CASE_P(
666         TestPooling3Dunet_ncdhw, pooling_test_float, ::testing::Values(
667             pool_test_params{ prop_kind::forward_inference,
668             engine::kind::cpu, algorithm::pooling_max, memory::format::ncdhw,
669             memory::format::ncdhw, EXPAND_SIZES_3D(1, 64, 64, 64, 64, 64, 64, 64, 2, 2, 2, 0, 0, 0, 1, 1, 1) },
670             pool_test_params{ prop_kind::forward_inference,
671             engine::kind::cpu, algorithm::pooling_max, memory::format::ncdhw,
672             memory::format::ncdhw, EXPAND_SIZES_3D(1, 128, 28, 28, 28, 28, 28, 28, 2, 2, 2, 0, 0, 0, 1, 1, 1) },
673             pool_test_params{ prop_kind::forward_inference,
674             engine::kind::cpu, algorithm::pooling_max, memory::format::ncdhw,
675             memory::format::ncdhw, EXPAND_SIZES_3D(1, 256, 12, 12, 12, 12, 12, 12, 2, 2, 2, 0, 0, 0, 1, 1, 1) }
676             ));
677
678 INSTANTIATE_TEST_CASE_P(
679         TestPooling3Dunet_ndhwc, pooling_test_float, ::testing::Values(
680             pool_test_params{ prop_kind::forward_inference,
681             engine::kind::cpu, algorithm::pooling_max, memory::format::ndhwc,
682             memory::format::ndhwc, EXPAND_SIZES_3D(1, 64, 64, 64, 64, 64, 64, 64, 2, 2, 2, 0, 0, 0, 1, 1, 1) },
683             pool_test_params{ prop_kind::forward_inference,
684             engine::kind::cpu, algorithm::pooling_max, memory::format::ndhwc,
685             memory::format::ndhwc, EXPAND_SIZES_3D(1, 128, 28, 28, 28, 28, 28, 28, 2, 2, 2, 0, 0, 0, 1, 1, 1) },
686             pool_test_params{ prop_kind::forward_inference,
687             engine::kind::cpu, algorithm::pooling_max, memory::format::ndhwc,
688             memory::format::ndhwc, EXPAND_SIZES_3D(1, 256, 12, 12, 12, 12, 12, 12, 2, 2, 2, 0, 0, 0, 1, 1, 1) }
689             ));
690
691 INSTANTIATE_TEST_CASE_P(
692         TestPooling3Dunet_blocked, pooling_test_float, ::testing::Values(
693             pool_test_params{ prop_kind::forward_inference,
694             engine::kind::cpu, algorithm::pooling_max, memory::format::nCdhw16c,
695             memory::format::nCdhw16c, EXPAND_SIZES_3D(1, 64, 64, 64, 64, 64, 64, 64, 2, 2, 2, 0, 0, 0, 1, 1, 1) },
696             pool_test_params{ prop_kind::forward_inference,
697             engine::kind::cpu, algorithm::pooling_max, memory::format::nCdhw16c,
698             memory::format::nCdhw16c, EXPAND_SIZES_3D(1, 128, 28, 28, 28, 28, 28, 28, 2, 2, 2, 0, 0, 0, 1, 1, 1) },
699             pool_test_params{ prop_kind::forward_inference,
700             engine::kind::cpu, algorithm::pooling_max, memory::format::nCdhw16c,
701             memory::format::nCdhw16c, EXPAND_SIZES_3D(1, 256, 12, 12, 12, 12, 12, 12, 2, 2, 2, 0, 0, 0, 1, 1, 1) }
702             ));
703
704 INSTANTIATE_TEST_CASE_P(
705         TestPoolingForwardMax, pooling_test_float, ::testing::Values(
706             pool_test_params_float{ prop_kind::forward_training,
707             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
708             memory::format::nchw,  EXPAND_SIZES_2D( 2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 ) },
709             pool_test_params_float{ prop_kind::forward_inference,
710             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
711             memory::format::nchw,  EXPAND_SIZES_2D( 2, 4, 4, 4, 4, 4, 3, 3, 1, 1, 1, 1 ) },
712             pool_test_params_float{ prop_kind::forward_training,
713             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
714             memory::format::nchw,  EXPAND_SIZES_2D( 2, 4, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
715             pool_test_params_float{ prop_kind::forward_inference,
716             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
717             memory::format::nchw,  EXPAND_SIZES_2D( 2, 4, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) }
718             ));
719
720
721 INSTANTIATE_TEST_CASE_P(
722         TestPoolingForwardMaxNHWC, pooling_test_float, ::testing::Values(
723             pool_test_params_float{ prop_kind::forward_training,
724             engine::kind::cpu, algorithm::pooling_max, memory::format::nhwc,
725             memory::format::nhwc,  EXPAND_SIZES_2D( 2, 4, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) }
726             ));
727
728 INSTANTIATE_TEST_CASE_P(
729         TestPoolingForwardMaxBlocked, pooling_test_float, ::testing::Values(
730             pool_test_params_float{ prop_kind::forward_training,
731             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
732             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 32, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
733             pool_test_params_float{ prop_kind::forward_training,
734             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
735             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 32, 13, 13, 12, 12, 3, 3, 0, 0, 1, 1 ) },
736             pool_test_params_float{ prop_kind::forward_training,
737             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
738             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 32, 4, 4, 4, 4, 3, 3, 0, 0, 1, 1 ) },
739             pool_test_params_float{ prop_kind::forward_training,
740             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
741             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 32, 3, 3, 4, 4, 3, 3, 1, 1, 1, 1 ) },
742             pool_test_params_float{ prop_kind::forward_training,
743             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
744             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 32, 3, 3, 2, 2, 3, 3, 0, 0, 1, 1 ) },
745             pool_test_params_float{ prop_kind::forward_training,
746             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
747             memory::format::nChw8c,  EXPAND_SIZES_2D( 122, 32, 32, 2, 32, 2, 3, 3, 1, 1, 1, 1 ) }
748
749             ));
750
751 INSTANTIATE_TEST_CASE_P(
752         TestPoolingForwardMaxBlockedPerf, pooling_test_float, ::testing::Values(
753             pool_test_params_float{ prop_kind::forward_training, engine::kind::cpu,
754             algorithm::pooling_max, memory::format::nChw8c,
755             memory::format::nChw8c,  EXPAND_SIZES_2D( 16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
756             , pool_test_params_float{ prop_kind::forward_training, engine::kind::cpu,
757             algorithm::pooling_max, memory::format::nChw8c,
758             memory::format::nChw8c,  EXPAND_SIZES_2D( 16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
759             ));
760
761 INSTANTIATE_TEST_CASE_P(
762         TestPoolingForwardAvgBlockedPerf, pooling_test_float, ::testing::Values(
763             pool_test_params_float{ prop_kind::forward_training, engine::kind::cpu,
764             algorithm::pooling_avg_exclude_padding, memory::format::nChw8c,
765             memory::format::nChw8c,  EXPAND_SIZES_2D( 1, 8, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1 ) }
766             , pool_test_params_float{ prop_kind::forward_training, engine::kind::cpu,
767             algorithm::pooling_avg_include_padding, memory::format::nChw8c,
768             memory::format::nChw8c,  EXPAND_SIZES_2D( 16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
769             , pool_test_params_float{ prop_kind::forward_training, engine::kind::cpu,
770             algorithm::pooling_avg_exclude_padding, memory::format::nChw8c,
771             memory::format::nChw8c,  EXPAND_SIZES_2D( 16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
772             , pool_test_params_float{ prop_kind::forward_training, engine::kind::cpu,
773             algorithm::pooling_avg_include_padding, memory::format::nChw8c,
774             memory::format::nChw8c,  EXPAND_SIZES_2D( 16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
775             , pool_test_params_float{ prop_kind::forward_training, engine::kind::cpu,
776             algorithm::pooling_avg_exclude_padding, memory::format::nChw8c,
777             memory::format::nChw8c,  EXPAND_SIZES_2D( 16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
778             ));
779
780 INSTANTIATE_TEST_CASE_P(
781         TestPoolingForwardMaxBlocked16, pooling_test_float, ::testing::Values(
782             pool_test_params_float{ prop_kind::forward_training,
783             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
784             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 32, 4, 4, 2, 2, 3, 3, 0, 0, 1, 1 ) },
785             pool_test_params_float{ prop_kind::forward_training,
786             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
787             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 32, 13, 13, 12, 12, 3, 3, 0, 0, 1, 1 ) },
788             pool_test_params_float{ prop_kind::forward_training,
789             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
790             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 32, 4, 4, 4, 4, 3, 3, 0, 0, 1, 1 ) },
791             pool_test_params_float{ prop_kind::forward_training,
792             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
793             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 32, 3, 3, 4, 4, 3, 3, 1, 1, 1, 1 ) },
794             pool_test_params_float{ prop_kind::forward_training,
795             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
796             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 32, 3, 3, 2, 2, 3, 3, 0, 0, 1, 1 ) },
797             pool_test_params_float{ prop_kind::forward_training,
798             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
799             memory::format::nChw16c,  EXPAND_SIZES_2D( 122, 32, 32, 2, 32, 2, 3, 3, 1, 1, 1, 1 ) }
800
801             ));
802
803 INSTANTIATE_TEST_CASE_P(
804         TestPoolingForwardMaxBlocked16Perf, pooling_test_float, ::testing::Values(
805             pool_test_params_float{ prop_kind::forward_training, engine::kind::cpu,
806             algorithm::pooling_max, memory::format::nChw16c,
807             memory::format::nChw16c,  EXPAND_SIZES_2D( 16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
808             , pool_test_params_float{ prop_kind::forward_training, engine::kind::cpu,
809             algorithm::pooling_max, memory::format::nChw16c,
810             memory::format::nChw16c,  EXPAND_SIZES_2D( 16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
811             ));
812
813 INSTANTIATE_TEST_CASE_P(
814         TestPoolingForwardAvgBlocked16Perf, pooling_test_float, ::testing::Values(
815             pool_test_params_float{ prop_kind::forward_training, engine::kind::cpu,
816             algorithm::pooling_avg_include_padding, memory::format::nChw16c,
817             memory::format::nChw16c,  EXPAND_SIZES_2D( 16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
818             , pool_test_params_float{ prop_kind::forward_training, engine::kind::cpu,
819             algorithm::pooling_avg_exclude_padding, memory::format::nChw16c,
820             memory::format::nChw16c,  EXPAND_SIZES_2D( 16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
821             , pool_test_params_float{ prop_kind::forward_training, engine::kind::cpu,
822             algorithm::pooling_avg_include_padding, memory::format::nChw16c,
823             memory::format::nChw16c,  EXPAND_SIZES_2D( 16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
824             , pool_test_params_float{ prop_kind::forward_training, engine::kind::cpu,
825             algorithm::pooling_avg_exclude_padding, memory::format::nChw16c,
826             memory::format::nChw16c,  EXPAND_SIZES_2D( 16, 64, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
827             ));
828
829
830 INSTANTIATE_TEST_CASE_P(
831         TestPoolingAlexnetForwardMaxNCHW, pooling_test_float, ::testing::Values(
832             pool_test_params_float{ prop_kind::forward_training,
833             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
834             memory::format::nchw,  EXPAND_SIZES_2D( 2, 16, 55, 55, 27, 27, 3, 3, 0, 0, 2, 2 ) },
835             pool_test_params_float{ prop_kind::forward_inference,
836             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
837             memory::format::nchw,  EXPAND_SIZES_2D( 2, 16, 55, 55, 27, 27, 3, 3, 0, 0, 2, 2 ) },
838             pool_test_params_float{ prop_kind::forward_training,
839             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
840             memory::format::nchw,  EXPAND_SIZES_2D( 2, 16, 27, 27, 13, 13, 3, 3, 0, 0, 2, 2 ) },
841             pool_test_params_float{ prop_kind::forward_inference,
842             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
843             memory::format::nchw,  EXPAND_SIZES_2D( 2, 16, 27, 27, 13, 13, 3, 3, 0, 0, 2, 2 ) },
844             pool_test_params_float{ prop_kind::forward_training,
845             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
846             memory::format::nchw,  EXPAND_SIZES_2D( 2, 16, 13, 13, 6, 6, 3, 3, 0, 0, 2, 2 ) },
847             pool_test_params_float{ prop_kind::forward_inference,
848             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
849             memory::format::nchw,  EXPAND_SIZES_2D( 2, 16, 13, 13, 6, 6, 3, 3, 0, 0, 2, 2 ) }
850             ));
851
852 INSTANTIATE_TEST_CASE_P(
853         TestPoolingAlexnetForwardMaxBlocked, pooling_test_float, ::testing::Values(
854             pool_test_params_float{ prop_kind::forward_training,
855             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
856             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 16, 55, 55, 27, 27, 3, 3, 0, 0, 2, 2 ) },
857             pool_test_params_float{ prop_kind::forward_inference,
858             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
859             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 16, 55, 55, 27, 27, 3, 3, 0, 0, 2, 2 ) },
860             pool_test_params_float{ prop_kind::forward_training,
861             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
862             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 16, 27, 27, 13, 13, 3, 3, 0, 0, 2, 2 ) },
863             pool_test_params_float{ prop_kind::forward_inference,
864             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
865             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 16, 27, 27, 13, 13, 3, 3, 0, 0, 2, 2 ) },
866             pool_test_params_float{ prop_kind::forward_training,
867             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
868             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 16, 13, 13, 6, 6, 3, 3, 0, 0, 2, 2 ) },
869             pool_test_params_float{ prop_kind::forward_inference,
870             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
871             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 16, 13, 13, 6, 6, 3, 3, 0, 0, 2, 2 ) }
872             ));
873
874 INSTANTIATE_TEST_CASE_P(
875         TestPoolingAlexnetForwardMaxBlocked16, pooling_test_float, ::testing::Values(
876             pool_test_params_float{ prop_kind::forward_training,
877             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
878             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 16, 55, 55, 27, 27, 3, 3, 0, 0, 2, 2 ) },
879             pool_test_params_float{ prop_kind::forward_inference,
880             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
881             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 16, 55, 55, 27, 27, 3, 3, 0, 0, 2, 2 ) },
882             pool_test_params_float{ prop_kind::forward_training,
883             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
884             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 16, 27, 27, 13, 13, 3, 3, 0, 0, 2, 2 ) },
885             pool_test_params_float{ prop_kind::forward_inference,
886             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
887             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 16, 27, 27, 13, 13, 3, 3, 0, 0, 2, 2 ) },
888             pool_test_params_float{ prop_kind::forward_training,
889             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
890             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 16, 13, 13, 6, 6, 3, 3, 0, 0, 2, 2 ) },
891             pool_test_params_float{ prop_kind::forward_inference,
892             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
893             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 16, 13, 13, 6, 6, 3, 3, 0, 0, 2, 2 ) }
894             ));
895
896 INSTANTIATE_TEST_CASE_P(
897         TestPoolingMaxBlockedStride1, pooling_test_float, ::testing::Values(
898             pool_test_params_float{ prop_kind::forward_training,
899             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
900             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 16, 55, 55, 53, 53, 3, 3, 0, 0, 1, 1 ) },
901             pool_test_params_float{ prop_kind::forward_inference,
902             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
903             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 16, 55, 55, 53, 53, 3, 3, 0, 0, 1, 1 ) },
904             pool_test_params_float{ prop_kind::forward_training,
905             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
906             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 16, 27, 27, 25, 25, 3, 3, 0, 0, 1, 1 ) },
907             pool_test_params_float{ prop_kind::forward_inference,
908             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
909             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 16, 27, 27, 25, 25, 3, 3, 0, 0, 1, 1 ) },
910             pool_test_params_float{ prop_kind::forward_training,
911             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
912             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 16, 13, 13, 11, 11, 3, 3, 0, 0, 1, 1 ) },
913             pool_test_params_float{ prop_kind::forward_inference,
914             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
915             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 16, 13, 13, 11, 11, 3, 3, 0, 0, 1, 1 ) }
916             ));
917
918 INSTANTIATE_TEST_CASE_P(
919         TestPoolingMaxCIFAR10NCHW, pooling_test_float, ::testing::Values(
920             pool_test_params_float{ prop_kind::forward_training,
921             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
922             memory::format::nchw,  EXPAND_SIZES_2D( 2, 32, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) },
923             pool_test_params_float{ prop_kind::forward_inference,
924             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
925             memory::format::nchw,  EXPAND_SIZES_2D( 2, 32, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
926             ));
927
928 INSTANTIATE_TEST_CASE_P(
929         TestPoolingAvgCIFAR10NCHW, pooling_test_float, ::testing::Values(
930             pool_test_params_float{ prop_kind::forward_training,
931             engine::kind::cpu, algorithm::pooling_avg_include_padding,
932             memory::format::nchw, memory::format::nchw,
933              EXPAND_SIZES_2D( 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 2, 2 ) },
934             pool_test_params_float{ prop_kind::forward_training,
935             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
936             memory::format::nchw, memory::format::nchw,
937              EXPAND_SIZES_2D( 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 2, 2 ) },
938             pool_test_params_float{ prop_kind::forward_inference,
939             engine::kind::cpu, algorithm::pooling_avg_include_padding,
940             memory::format::nchw, memory::format::nchw,
941              EXPAND_SIZES_2D( 2, 32, 16, 15, 8, 8, 3, 3, 0, 0, 2, 2 ) },
942             pool_test_params_float{ prop_kind::forward_inference,
943             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
944             memory::format::nchw, memory::format::nchw,
945              EXPAND_SIZES_2D( 2, 32, 16, 15, 8, 8, 3, 3, 0, 0, 2, 2 ) },
946             pool_test_params_float{ prop_kind::forward_training,
947             engine::kind::cpu, algorithm::pooling_avg_include_padding,
948             memory::format::nchw, memory::format::nchw,
949              EXPAND_SIZES_2D( 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 2, 2 ) },
950             pool_test_params_float{ prop_kind::forward_training,
951             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
952             memory::format::nchw, memory::format::nchw,
953              EXPAND_SIZES_2D( 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 2, 2 ) },
954             pool_test_params_float{ prop_kind::forward_inference,
955             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
956             memory::format::nchw, memory::format::nchw,
957              EXPAND_SIZES_2D( 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 2, 2 ) },
958             pool_test_params_float{ prop_kind::forward_inference,
959             engine::kind::cpu, algorithm::pooling_avg_include_padding,
960             memory::format::nchw, memory::format::nchw,
961              EXPAND_SIZES_2D( 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 2, 2 ) }
962             ));
963
964 INSTANTIATE_TEST_CASE_P(
965         TestPoolingMaxCIFAR10Blocked, pooling_test_float, ::testing::Values(
966             pool_test_params_float{ prop_kind::forward_training,
967             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
968             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 32, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) },
969             pool_test_params_float{ prop_kind::forward_inference,
970             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
971             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 32, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
972             ));
973
974 INSTANTIATE_TEST_CASE_P(
975         TestPoolingAvgCIFAR10Blocked, pooling_test_float, ::testing::Values(
976             pool_test_params_float{ prop_kind::forward_training,
977             engine::kind::cpu, algorithm::pooling_avg_include_padding,
978             memory::format::nChw8c, memory::format::nChw8c,
979              EXPAND_SIZES_2D( 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 2, 2 ) },
980             pool_test_params_float{ prop_kind::forward_training,
981             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
982             memory::format::nChw8c, memory::format::nChw8c,
983              EXPAND_SIZES_2D( 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 2, 2 ) },
984             pool_test_params_float{ prop_kind::forward_inference,
985             engine::kind::cpu, algorithm::pooling_avg_include_padding,
986             memory::format::nChw8c, memory::format::nChw8c,
987              EXPAND_SIZES_2D( 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 2, 2 ) },
988             pool_test_params_float{ prop_kind::forward_inference,
989             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
990             memory::format::nChw8c, memory::format::nChw8c,
991              EXPAND_SIZES_2D( 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 2, 2 ) },
992             pool_test_params_float{ prop_kind::forward_training,
993             engine::kind::cpu, algorithm::pooling_avg_include_padding,
994             memory::format::nChw8c, memory::format::nChw8c,
995              EXPAND_SIZES_2D( 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 2, 2 ) },
996             pool_test_params_float{ prop_kind::forward_training,
997             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
998             memory::format::nChw8c, memory::format::nChw8c,
999              EXPAND_SIZES_2D( 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 2, 2 ) },
1000             pool_test_params_float{ prop_kind::forward_inference,
1001             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1002             memory::format::nChw8c, memory::format::nChw8c,
1003              EXPAND_SIZES_2D( 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 2, 2 ) },
1004             pool_test_params_float{ prop_kind::forward_inference,
1005             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1006             memory::format::nChw8c, memory::format::nChw8c,
1007              EXPAND_SIZES_2D( 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 2, 2 ) }
1008             ));
1009
1010 INSTANTIATE_TEST_CASE_P(
1011         TestPoolingMaxCIFAR10Blocked16, pooling_test_float, ::testing::Values(
1012             pool_test_params_float{ prop_kind::forward_training,
1013             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
1014             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 32, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) },
1015             pool_test_params_float{ prop_kind::forward_inference,
1016             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
1017             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 32, 32, 32, 16, 16, 3, 3, 0, 0, 2, 2 ) }
1018             ));
1019
1020 INSTANTIATE_TEST_CASE_P(
1021         TestPoolingAvgCIFAR10Blocked16, pooling_test_float, ::testing::Values(
1022             pool_test_params_float{ prop_kind::forward_training,
1023             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1024             memory::format::nChw16c, memory::format::nChw16c,
1025              EXPAND_SIZES_2D( 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 2, 2 ) },
1026             pool_test_params_float{ prop_kind::forward_training,
1027             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1028             memory::format::nChw16c, memory::format::nChw16c,
1029              EXPAND_SIZES_2D( 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 2, 2 ) },
1030             pool_test_params_float{ prop_kind::forward_inference,
1031             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1032             memory::format::nChw16c, memory::format::nChw16c,
1033              EXPAND_SIZES_2D( 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 2, 2 ) },
1034             pool_test_params_float{ prop_kind::forward_inference,
1035             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1036             memory::format::nChw16c, memory::format::nChw16c,
1037              EXPAND_SIZES_2D( 2, 32, 16, 16, 8, 8, 3, 3, 0, 0, 2, 2 ) },
1038             pool_test_params_float{ prop_kind::forward_training,
1039             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1040             memory::format::nChw16c, memory::format::nChw16c,
1041              EXPAND_SIZES_2D( 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 2, 2 ) },
1042             pool_test_params_float{ prop_kind::forward_training,
1043             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1044             memory::format::nChw16c, memory::format::nChw16c,
1045              EXPAND_SIZES_2D( 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 2, 2 ) },
1046             pool_test_params_float{ prop_kind::forward_inference,
1047             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1048             memory::format::nChw16c, memory::format::nChw16c,
1049              EXPAND_SIZES_2D( 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 2, 2 ) },
1050             pool_test_params_float{ prop_kind::forward_inference,
1051             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1052             memory::format::nChw16c, memory::format::nChw16c,
1053              EXPAND_SIZES_2D( 2, 64, 8, 8, 4, 4, 3, 3, 0, 0, 2, 2 ) }
1054             ));
1055
1056 INSTANTIATE_TEST_CASE_P(
1057         TestPoolingMaxGoogleNetV1NCHW, pooling_test_float, ::testing::Values(
1058             pool_test_params_float{ prop_kind::forward_training,
1059             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
1060             memory::format::nchw,  EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1061             pool_test_params_float{ prop_kind::forward_inference,
1062             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
1063             memory::format::nchw,  EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1064             pool_test_params_float{ prop_kind::forward_training,
1065             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
1066             memory::format::nchw,  EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1067             pool_test_params_float{ prop_kind::forward_inference,
1068             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
1069             memory::format::nchw,  EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1070             pool_test_params_float{ prop_kind::forward_training,
1071             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
1072             memory::format::nchw,  EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1073             pool_test_params_float{ prop_kind::forward_inference,
1074             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
1075             memory::format::nchw,  EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) }
1076             ));
1077
1078 INSTANTIATE_TEST_CASE_P(
1079         TestPoolingMaxGoogleNetV1Blocked, pooling_test_float, ::testing::Values(
1080             pool_test_params_float{ prop_kind::forward_training,
1081             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
1082             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1083             pool_test_params_float{ prop_kind::forward_inference,
1084             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
1085             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1086             pool_test_params_float{ prop_kind::forward_training,
1087             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
1088             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1089             pool_test_params_float{ prop_kind::forward_inference,
1090             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
1091             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1092             pool_test_params_float{ prop_kind::forward_training,
1093             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
1094             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1095             pool_test_params_float{ prop_kind::forward_inference,
1096             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
1097             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) }
1098             ));
1099
1100 INSTANTIATE_TEST_CASE_P(
1101         TestPoolingMaxGoogleNetV1Blocked16, pooling_test_float, ::testing::Values(
1102             pool_test_params_float{ prop_kind::forward_training,
1103             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
1104             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1105             pool_test_params_float{ prop_kind::forward_inference,
1106             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
1107             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1108             pool_test_params_float{ prop_kind::forward_training,
1109             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
1110             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1111             pool_test_params_float{ prop_kind::forward_inference,
1112             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
1113             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1114             pool_test_params_float{ prop_kind::forward_training,
1115             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
1116             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1117             pool_test_params_float{ prop_kind::forward_inference,
1118             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
1119             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) }
1120             ));
1121
1122 INSTANTIATE_TEST_CASE_P(
1123         TestPoolingMaxResnet50NCHW, pooling_test_float, ::testing::Values(
1124             pool_test_params_float{ prop_kind::forward_training,
1125             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
1126             memory::format::nchw,  EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1127             pool_test_params_float{ prop_kind::forward_inference,
1128             engine::kind::cpu, algorithm::pooling_max, memory::format::nchw,
1129             memory::format::nchw,  EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) }
1130             ));
1131
1132 INSTANTIATE_TEST_CASE_P(
1133         TestPoolingMaxResnet50Blocked, pooling_test_float, ::testing::Values(
1134             pool_test_params_float{ prop_kind::forward_training,
1135             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
1136             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1137             pool_test_params_float{ prop_kind::forward_inference,
1138             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
1139             memory::format::nChw8c,  EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) }
1140             ));
1141
1142 INSTANTIATE_TEST_CASE_P(
1143         TestPoolingMaxResnet50Blocked16, pooling_test_float, ::testing::Values(
1144             pool_test_params_float{ prop_kind::forward_training,
1145             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
1146             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1147             pool_test_params_float{ prop_kind::forward_inference,
1148             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw16c,
1149             memory::format::nChw16c,  EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) }
1150             ));
1151
1152 INSTANTIATE_TEST_CASE_P(
1153         TestPoolingAvgGoogleNetV1NCHW, pooling_test_float, ::testing::Values(
1154             pool_test_params_float{ prop_kind::forward_training,
1155             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1156             memory::format::nchw, memory::format::nchw,
1157              EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1158             pool_test_params_float{ prop_kind::forward_training,
1159             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1160             memory::format::nchw, memory::format::nchw,
1161              EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1162             pool_test_params_float{ prop_kind::forward_inference,
1163             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1164             memory::format::nchw, memory::format::nchw,
1165              EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1166             pool_test_params_float{ prop_kind::forward_inference,
1167             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1168             memory::format::nchw, memory::format::nchw,
1169              EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1170             pool_test_params_float{ prop_kind::forward_training,
1171             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1172             memory::format::nchw, memory::format::nchw,
1173              EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1174             pool_test_params_float{ prop_kind::forward_training,
1175             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1176             memory::format::nchw, memory::format::nchw,
1177              EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1178             pool_test_params_float{ prop_kind::forward_inference,
1179             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1180             memory::format::nchw, memory::format::nchw,
1181              EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1182             pool_test_params_float{ prop_kind::forward_inference,
1183             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1184             memory::format::nchw, memory::format::nchw,
1185              EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1186             pool_test_params_float{ prop_kind::forward_training,
1187             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1188             memory::format::nchw, memory::format::nchw,
1189              EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1190             pool_test_params_float{ prop_kind::forward_training,
1191             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1192             memory::format::nchw, memory::format::nchw,
1193              EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1194             pool_test_params_float{ prop_kind::forward_inference,
1195             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1196             memory::format::nchw, memory::format::nchw,
1197              EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1198             pool_test_params_float{ prop_kind::forward_inference,
1199             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1200             memory::format::nchw, memory::format::nchw,
1201              EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) }
1202             ));
1203
1204 INSTANTIATE_TEST_CASE_P(
1205         TestPoolingAvgGoogleNetV1Blocked, pooling_test_float, ::testing::Values(
1206             pool_test_params_float{ prop_kind::forward_training,
1207             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1208             memory::format::nChw8c, memory::format::nChw8c,
1209              EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1210             pool_test_params_float{ prop_kind::forward_training,
1211             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1212             memory::format::nChw8c, memory::format::nChw8c,
1213              EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1214             pool_test_params_float{ prop_kind::forward_inference,
1215             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1216             memory::format::nChw8c, memory::format::nChw8c,
1217              EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1218             pool_test_params_float{ prop_kind::forward_inference,
1219             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1220             memory::format::nChw8c, memory::format::nChw8c,
1221              EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1222             pool_test_params_float{ prop_kind::forward_training,
1223             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1224             memory::format::nChw8c, memory::format::nChw8c,
1225              EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1226             pool_test_params_float{ prop_kind::forward_training,
1227             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1228             memory::format::nChw8c, memory::format::nChw8c,
1229              EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1230             pool_test_params_float{ prop_kind::forward_inference,
1231             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1232             memory::format::nChw8c, memory::format::nChw8c,
1233              EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1234             pool_test_params_float{ prop_kind::forward_inference,
1235             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1236             memory::format::nChw8c, memory::format::nChw8c,
1237              EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1238             pool_test_params_float{ prop_kind::forward_training,
1239             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1240             memory::format::nChw8c, memory::format::nChw8c,
1241              EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1242             pool_test_params_float{ prop_kind::forward_training,
1243             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1244             memory::format::nChw8c, memory::format::nChw8c,
1245              EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1246             pool_test_params_float{ prop_kind::forward_inference,
1247             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1248             memory::format::nChw8c, memory::format::nChw8c,
1249              EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1250             pool_test_params_float{ prop_kind::forward_inference,
1251             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1252             memory::format::nChw8c, memory::format::nChw8c,
1253              EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) }
1254             ));
1255
1256 INSTANTIATE_TEST_CASE_P(
1257         TestPoolingAvgGoogleNetV1Blocked16, pooling_test_float, ::testing::Values(
1258             pool_test_params_float{ prop_kind::forward_training,
1259             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1260             memory::format::nChw16c, memory::format::nChw16c,
1261              EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1262             pool_test_params_float{ prop_kind::forward_training,
1263             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1264             memory::format::nChw16c, memory::format::nChw16c,
1265              EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1266             pool_test_params_float{ prop_kind::forward_inference,
1267             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1268             memory::format::nChw16c, memory::format::nChw16c,
1269              EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1270             pool_test_params_float{ prop_kind::forward_inference,
1271             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1272             memory::format::nChw16c, memory::format::nChw16c,
1273              EXPAND_SIZES_2D( 2, 512, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1274             pool_test_params_float{ prop_kind::forward_training,
1275             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1276             memory::format::nChw16c, memory::format::nChw16c,
1277              EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1278             pool_test_params_float{ prop_kind::forward_training,
1279             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1280             memory::format::nChw16c, memory::format::nChw16c,
1281              EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1282             pool_test_params_float{ prop_kind::forward_inference,
1283             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1284             memory::format::nChw16c, memory::format::nChw16c,
1285              EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1286             pool_test_params_float{ prop_kind::forward_inference,
1287             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1288             memory::format::nChw16c, memory::format::nChw16c,
1289              EXPAND_SIZES_2D( 2, 528, 14, 14, 4, 4, 5, 5, 0, 0, 3, 3 ) },
1290             pool_test_params_float{ prop_kind::forward_training,
1291             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1292             memory::format::nChw16c, memory::format::nChw16c,
1293              EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1294             pool_test_params_float{ prop_kind::forward_training,
1295             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1296             memory::format::nChw16c, memory::format::nChw16c,
1297              EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1298             pool_test_params_float{ prop_kind::forward_inference,
1299             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1300             memory::format::nChw16c, memory::format::nChw16c,
1301              EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1302             pool_test_params_float{ prop_kind::forward_inference,
1303             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1304             memory::format::nChw16c, memory::format::nChw16c,
1305              EXPAND_SIZES_2D( 2, 1024, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) }
1306             ));
1307
1308 INSTANTIATE_TEST_CASE_P(
1309         TestPoolingAvgResnet50NCHW, pooling_test_float, ::testing::Values(
1310             pool_test_params_float{ prop_kind::forward_training,
1311             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1312             memory::format::nchw, memory::format::nchw,
1313              EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1314             pool_test_params_float{ prop_kind::forward_training,
1315             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1316             memory::format::nchw, memory::format::nchw,
1317              EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1318             pool_test_params_float{ prop_kind::forward_inference,
1319             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1320             memory::format::nchw, memory::format::nchw,
1321              EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1322             pool_test_params_float{ prop_kind::forward_inference,
1323             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1324             memory::format::nchw, memory::format::nchw,
1325              EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) }
1326             ));
1327
1328 INSTANTIATE_TEST_CASE_P(
1329         TestPoolingAvgResnet50Blocked, pooling_test_float, ::testing::Values(
1330             pool_test_params_float{ prop_kind::forward_training,
1331             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1332             memory::format::nChw8c, memory::format::nChw8c,
1333              EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1334             pool_test_params_float{ prop_kind::forward_training,
1335             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1336             memory::format::nChw8c, memory::format::nChw8c,
1337              EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1338             pool_test_params_float{ prop_kind::forward_inference,
1339             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1340             memory::format::nChw8c, memory::format::nChw8c,
1341              EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1342             pool_test_params_float{ prop_kind::forward_inference,
1343             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1344             memory::format::nChw8c, memory::format::nChw8c,
1345              EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) }
1346             ));
1347
1348 INSTANTIATE_TEST_CASE_P(
1349         TestPoolingAvgResnet50Blocked16, pooling_test_float, ::testing::Values(
1350             pool_test_params_float{ prop_kind::forward_training,
1351             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1352             memory::format::nChw16c, memory::format::nChw16c,
1353              EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1354             pool_test_params_float{ prop_kind::forward_training,
1355             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1356             memory::format::nChw16c, memory::format::nChw16c,
1357              EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1358             pool_test_params_float{ prop_kind::forward_inference,
1359             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1360             memory::format::nChw16c, memory::format::nChw16c,
1361              EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) },
1362             pool_test_params_float{ prop_kind::forward_inference,
1363             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1364             memory::format::nChw16c, memory::format::nChw16c,
1365              EXPAND_SIZES_2D( 2, 512, 7, 7, 1, 1, 7, 7, 0, 0, 1, 1 ) }
1366             ));
1367
1368 INSTANTIATE_TEST_CASE_P(
1369         TestPoolingAsymmPadding, pooling_test_float, ::testing::Values(
1370             pool_test_params_float{ prop_kind::forward_inference,
1371             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
1372             memory::format::nChw8c,  EXPAND_SIZES_2D(1, 8, 3, 4, 1, 5, 3, 3, 0, 1, 1, 1) }
1373             ,pool_test_params_float{ prop_kind::forward_inference,
1374             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1375             memory::format::nChw8c, memory::format::nChw8c,
1376              EXPAND_SIZES_2D(1, 8, 3, 4, 1, 5, 3, 3, 0, 1, 1, 1) }
1377             ,pool_test_params_float{ prop_kind::forward_inference,
1378             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1379             memory::format::nChw8c, memory::format::nChw8c,
1380              EXPAND_SIZES_2D(1, 8, 3, 4, 1, 5, 3, 3, 0, 1, 1, 1) }
1381
1382             ,pool_test_params_float{ prop_kind::forward_inference,
1383             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
1384             memory::format::nChw8c,  EXPAND_SIZES_2D(1, 8, 3, 14, 1, 8, 3, 3, 0, 1, 1, 2) }
1385             ,pool_test_params_float{ prop_kind::forward_inference,
1386             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1387             memory::format::nChw8c, memory::format::nChw8c,
1388              EXPAND_SIZES_2D(1, 8, 3, 14, 1, 8, 3, 3, 0, 1, 1, 2) }
1389             ,pool_test_params_float{ prop_kind::forward_inference,
1390             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1391             memory::format::nChw8c, memory::format::nChw8c,
1392              EXPAND_SIZES_2D(1, 8, 3, 14, 1, 8, 3, 3, 0, 1, 1, 2) }
1393
1394             ,pool_test_params_float{ prop_kind::forward_inference,
1395             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
1396             memory::format::nChw8c,  EXPAND_SIZES_2D(1, 96, 3, 100, 1, 51, 3, 3, 0, 1, 1, 2) }
1397             ,pool_test_params_float{ prop_kind::forward_inference,
1398             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1399             memory::format::nChw8c, memory::format::nChw8c,
1400              EXPAND_SIZES_2D(1, 96, 3, 100, 1, 51, 3, 3, 0, 1, 1, 2) }
1401             ,pool_test_params_float{ prop_kind::forward_inference,
1402             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1403             memory::format::nChw8c, memory::format::nChw8c,
1404              EXPAND_SIZES_2D(1, 96, 3, 100, 1, 51, 3, 3, 0, 1, 1, 2) }
1405
1406             ,pool_test_params_float{ prop_kind::forward_inference,
1407             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
1408             memory::format::nChw8c,  EXPAND_SIZES_2D(1, 96, 3, 102, 1, 52, 3, 3, 0, 1, 1, 2) }
1409             ,pool_test_params_float{ prop_kind::forward_inference,
1410             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1411             memory::format::nChw8c, memory::format::nChw8c,
1412              EXPAND_SIZES_2D(1, 96, 3, 102, 1, 52, 3, 3, 0, 1, 1, 2) }
1413             ,pool_test_params_float{ prop_kind::forward_inference,
1414             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1415             memory::format::nChw8c, memory::format::nChw8c,
1416              EXPAND_SIZES_2D(1, 96, 3, 102, 1, 52, 3, 3, 0, 1, 1, 2) }
1417
1418             ,pool_test_params_float{ prop_kind::forward_inference,
1419             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
1420             memory::format::nChw8c,  EXPAND_SIZES_2D(1, 96, 9, 103, 7, 52, 3, 3, 0, 1, 1, 2) }
1421             ,pool_test_params_float{ prop_kind::forward_inference,
1422             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1423             memory::format::nChw8c, memory::format::nChw8c,
1424              EXPAND_SIZES_2D(1, 96, 9, 103, 7, 52, 3, 3, 0, 1, 1, 2) }
1425             ,pool_test_params_float{ prop_kind::forward_inference,
1426             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1427             memory::format::nChw8c, memory::format::nChw8c,
1428              EXPAND_SIZES_2D(1, 96, 9, 103, 7, 52, 3, 3, 0, 1, 1, 2) }
1429
1430             ,pool_test_params_float{ prop_kind::forward_inference,
1431             engine::kind::cpu, algorithm::pooling_max, memory::format::nChw8c,
1432             memory::format::nChw8c,  EXPAND_SIZES_2D(1, 96, 300, 500, 151, 251, 3, 3, 1, 1, 2, 2) }
1433             ,pool_test_params_float{ prop_kind::forward_inference,
1434             engine::kind::cpu, algorithm::pooling_avg_include_padding,
1435             memory::format::nChw8c, memory::format::nChw8c,
1436              EXPAND_SIZES_2D(1, 96, 300, 500, 151, 251, 3, 3, 1, 1, 2, 2) }
1437             ,pool_test_params_float{ prop_kind::forward_inference,
1438             engine::kind::cpu, algorithm::pooling_avg_exclude_padding,
1439             memory::format::nChw8c, memory::format::nChw8c,
1440              EXPAND_SIZES_2D(1, 96, 300, 500, 151, 251, 3, 3, 1, 1, 2, 2) }
1441
1442             ));
1443 }