Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / tests / unit / engines / mkldnn / graph / layers / internal / graph_depthwise_test.cpp
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #include <gtest/gtest.h>
6 #include <gmock/gmock-spec-builders.h>
7 #include "mkldnn_plugin/mkldnn_graph.h"
8 #include "test_graph.hpp"
9 #include "single_layer_common.hpp"
10 #include <mkldnn_plugin/mkldnn_extension_utils.h>
11 #include <inference_engine/cnn_network_impl.hpp>
12 #include "tests_common.hpp"
13
14 using namespace ::testing;
15 using namespace std;
16 using namespace mkldnn;
17
18 struct depthwise_test_params {
19     mkldnn::algorithm alg;
20
21     // Formats: NCHW, NCDHW
22     vector<size_t> dims;
23
24     bool isBroadcast;
25
26     size_t num_prim_desc;
27
28     MKLDNNPlugin::impl_desc_type selectedType;
29     std::vector<MKLDNNPlugin::impl_desc_type> preferTypes;
30
31     std::vector<std::function<void(MKLDNNPlugin::PrimitiveDescInfo)>> comp;
32 };
33
34 template <typename data_t>
35 void ref_depthwise(const InferenceEngine::TBlob<data_t> &src, const data_t *weights, const size_t weightsSize,
36                    InferenceEngine::TBlob<data_t> &dst, depthwise_test_params prm) {
37     auto dims_size = src.dims().size();
38
39     size_t IW = src.dims()[dims_size - 1];
40     size_t IH = src.dims()[dims_size - 2];
41     size_t ID = dims_size == 5 ? src.dims()[2] : 1u;
42     size_t IC = src.dims()[1];
43     size_t MB = src.dims()[0];
44
45     const data_t *src_data = src.readOnly();
46     const data_t *weights_data = weights;
47     size_t bias_offset = prm.isBroadcast ? 1 : IC;
48     const data_t *bias_data = weights_data + bias_offset;
49     data_t *dst_data = dst.data();
50
51     size_t c1 = IH * IW;
52     size_t c2 = IC * c1;
53     size_t c3 = ID * c2;
54     for (int mb = 0; mb < MB; mb++) {
55         size_t m1 = mb * c3;
56         for (int c = 0; c < IC; c++) {
57             size_t m2 = m1 + c * c1;
58             for (int d = 0; d < ID; d++) {
59                 size_t m3 = m2 + d * c2;
60                 for (int h = 0; h < IH; h++) {
61                     size_t m4 = m3 + h * IW;
62                     for (int w = 0; w < IW; w++) {
63                         int idx = m4 + w;
64
65                         int widx = prm.isBroadcast ? 0 : c;
66                         int bidx = prm.isBroadcast ? 0 : c;
67
68                         if (prm.alg == depthwise_scale_shift)
69                             dst_data[idx] = src_data[idx] * weights_data[widx] + bias_data[bidx];
70                         else if (prm.alg == depthwise_prelu)
71                             dst_data[idx] = src_data[idx] > 0 ? src_data[idx] : src_data[idx]*weights_data[widx];
72                     }
73                 }
74             }
75         }
76     }
77 }
78
79 class MKLDNNGraphDepthwiseTests: public TestsCommon,
80                                      public WithParamInterface<depthwise_test_params> {
81     std::string model_t_4D = R"V0G0N(
82 <Net Name="Lrn_Only" version="2" precision="FP32" batch="1">
83     <layers>
84         <layer name="in1" type="Input" precision="FP32" id="0">
85             <output>
86                 <port id="0">
87                     <dim>_IN_</dim>
88                     <dim>_IC_</dim>
89                     <dim>_IH_</dim>
90                     <dim>_IW_</dim>
91                 </port>
92             </output>
93         </layer>
94         <layer name="depthwise" id="1" type="_LT_" precision="FP32">
95             <data _P_NAME_="_P_VAL_"  PrimitivesPriority="_IMPLS_"/>
96             <weights offset="0" size="_S1_" />
97             <biases offset="_S1_" size="_S2_" />
98
99             <input>
100                 <port id="1">
101                     <dim>_IN_</dim>
102                     <dim>_IC_</dim>
103                     <dim>_IH_</dim>
104                     <dim>_IW_</dim>
105                 </port>
106             </input>
107             <output>
108                 <port id="2">
109                     <dim>_IN_</dim>
110                     <dim>_IC_</dim>
111                     <dim>_IH_</dim>
112                     <dim>_IW_</dim>
113                 </port>
114             </output>
115         </layer>
116     </layers>
117     <edges>
118         <edge from-layer="0" from-port="0" to-layer="1" to-port="1"/>
119     </edges>
120 </Net>
121 )V0G0N";
122
123
124     std::string model_t_5D = R"V0G0N(
125 <Net Name="Lrn_Only" version="2" precision="FP32" batch="1">
126     <layers>
127         <layer name="in1" type="Input" precision="FP32" id="0">
128             <output>
129                 <port id="0">
130                     <dim>_IN_</dim>
131                     <dim>_IC_</dim>
132                     <dim>_ID_</dim>
133                     <dim>_IH_</dim>
134                     <dim>_IW_</dim>
135                 </port>
136             </output>
137         </layer>
138         <layer name="depthwise" id="1" type="_LT_" precision="FP32">
139             <data _P_NAME_="_P_VAL_"  PrimitivesPriority="_IMPLS_"/>
140             <weights offset="0" size="_S1_" />
141             <biases offset="_S1_" size="_S2_" />
142
143             <input>
144                 <port id="1">
145                     <dim>_IN_</dim>
146                     <dim>_IC_</dim>
147                     <dim>_ID_</dim>
148                     <dim>_IH_</dim>
149                     <dim>_IW_</dim>
150                 </port>
151             </input>
152             <output>
153                 <port id="2">
154                     <dim>_IN_</dim>
155                     <dim>_IC_</dim>
156                     <dim>_ID_</dim>
157                     <dim>_IH_</dim>
158                     <dim>_IW_</dim>
159                 </port>
160             </output>
161         </layer>
162     </layers>
163     <edges>
164         <edge from-layer="0" from-port="0" to-layer="1" to-port="1"/>
165     </edges>
166 </Net>
167 )V0G0N";
168
169 protected:
170     std::string getModel(depthwise_test_params p) {
171         std::string model;
172         auto dims_size = p.dims.size();
173         if (dims_size == 4) {
174             model = model_t_4D;
175         } else if (dims_size == 5) {
176             model = model_t_5D;
177         }
178
179         REPLACE_WITH_NUM(model, "_IW_", p.dims[dims_size - 1]);
180         REPLACE_WITH_NUM(model, "_IC_", p.dims[1]);
181         REPLACE_WITH_NUM(model, "_IN_", p.dims[0]);
182
183         switch (dims_size) {
184             case 5:
185                 REPLACE_WITH_NUM(model, "_ID_", p.dims[dims_size - 3]);
186             case 4:
187                 REPLACE_WITH_NUM(model, "_IH_", p.dims[dims_size - 2]);
188         }
189
190         if (p.alg == depthwise_scale_shift) {
191             REPLACE_WITH_STR(model, "_LT_", "ScaleShift");
192             REPLACE_WITH_STR(model, "_P_NAME_", "broadcast");
193             REPLACE_WITH_NUM(model, "_P_VAL_", p.isBroadcast ? 1 : 0);
194         }
195         else if (p.alg == depthwise_prelu) {
196             REPLACE_WITH_STR(model, "_LT_", "PReLU");
197             REPLACE_WITH_STR(model, "_P_NAME_", "channel_shared");
198             REPLACE_WITH_NUM(model, "_P_VAL_", p.isBroadcast ? 1 : 0);
199         }
200
201         size_t array_size =  p.isBroadcast ? 1 : p.dims[1];
202         size_t w_data_size = array_size * sizeof(float);
203         size_t b_data_size = array_size * sizeof(float);
204         REPLACE_WITH_NUM(model, "_S1_", w_data_size);
205         REPLACE_WITH_NUM(model, "_S2_", b_data_size);
206
207         std::string impls;
208         for (const auto& preferType : p.preferTypes) {
209             if (!impls.empty())
210                 impls += ",";
211             impls += "cpu:" + MKLDNNGraphTestClass::getStrPrimitiveDescriptorType(preferType);
212         }
213         REPLACE_WITH_STR(model, "_IMPLS_", impls);
214
215         return model;
216     }
217
218     virtual void SetUp() {
219         try {
220             TestsCommon::SetUp();
221             depthwise_test_params p = ::testing::WithParamInterface<depthwise_test_params>::GetParam();
222             std::string model = getModel(p);
223
224             InferenceEngine::CNNNetReader net_reader;
225             ASSERT_NO_THROW(net_reader.ReadNetwork(model.data(), model.length()));
226
227             size_t weightSize = 2 * p.dims[1] * sizeof(float);
228             InferenceEngine::TBlob<uint8_t> *weights = new InferenceEngine::TBlob<uint8_t>(InferenceEngine::Precision::U8, InferenceEngine::C, {weightSize});
229             weights->allocate();
230             fill_data( weights->data().as<float*>(), weights->size() / sizeof(float));
231
232             InferenceEngine::TBlob<uint8_t>::Ptr weights_ptr = InferenceEngine::TBlob<uint8_t>::Ptr(weights);
233
234             net_reader.SetWeights(weights_ptr);
235
236             MKLDNNGraphTestClass graph;
237             graph.CreateGraph(net_reader.getNetwork());
238             auto& nodes = graph.getNodes();
239             for (int i = 0; i < nodes.size(); i++) {
240                 if (nodes[i]->getType() == MKLDNNPlugin::Depthwise) {
241                     ASSERT_LE(p.num_prim_desc, nodes[i]->getSupportedPrimitiveDescriptors().size());
242                     for (size_t j = 0; j < p.num_prim_desc && j < p.comp.size(); j++) {
243                         p.comp.at(j)(nodes[i]->getSupportedPrimitiveDescriptors().at(j));
244                     }
245                     ASSERT_NE(nullptr, nodes[i]->getSelectedPrimitiveDescriptor());
246                     ASSERT_EQ(p.selectedType,
247                               nodes[i]->getSelectedPrimitiveDescriptor()->getImplementationType() & p.selectedType);
248                 }
249             }
250
251             InferenceEngine::SizeVector dims_src = p.dims;
252             InferenceEngine::Layout layout = InferenceEngine::ANY;
253             switch (p.dims.size()) {
254                 case 4:
255                     layout = InferenceEngine::NCHW;
256                     break;
257                 case 5:
258                     layout = InferenceEngine::NCDHW;
259                     break;
260             }
261
262             InferenceEngine::Blob::Ptr src = InferenceEngine::make_shared_blob<float, const InferenceEngine::SizeVector>(InferenceEngine::Precision::FP32, layout, dims_src);
263             src->allocate();
264             fill_data(src->buffer(), src->size());
265
266             InferenceEngine::TBlob<float>* srcPtr = dynamic_cast<InferenceEngine::TBlob<float>*>(src.get());
267
268             if (srcPtr == nullptr)
269                 FAIL() << "Cannot cast blob to TBlob<float>.";
270
271             InferenceEngine::BlobMap srcs;
272             srcs.insert(std::pair<std::string, InferenceEngine::Blob::Ptr>("in1", src));
273
274             InferenceEngine::OutputsDataMap out;
275             out = net_reader.getNetwork().getOutputsInfo();
276             InferenceEngine::BlobMap outputBlobs;
277
278             std::pair<std::string, InferenceEngine::DataPtr> item = *out.begin();
279
280             InferenceEngine::TBlob<float>::Ptr output;
281             output = InferenceEngine::make_shared_blob<float>(item.second->getTensorDesc());
282             output->allocate();
283             outputBlobs[item.first] = output;
284
285             graph.Infer(srcs, outputBlobs);
286
287             InferenceEngine::TBlob<float> dst_ref(item.second->getTensorDesc());
288             dst_ref.allocate();
289
290             ref_depthwise(*srcPtr, weights->readOnly().as<const float*>(), weights->size() / sizeof(float), dst_ref, p);
291
292             compare(*output, dst_ref);
293         } catch (const InferenceEngine::details::InferenceEngineException &e) {
294             FAIL() << e.what();
295         }
296     }
297 };
298
299 TEST_P(MKLDNNGraphDepthwiseTests, TestsDepthwise) {}
300
301 INSTANTIATE_TEST_CASE_P(
302         TestsDepthwise, MKLDNNGraphDepthwiseTests,
303         ::testing::Values(
304                 depthwise_test_params{depthwise_scale_shift, {1, 32, 128, 256}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
305                 depthwise_test_params{depthwise_scale_shift, {4, 3, 228, 228}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
306                 depthwise_test_params{depthwise_scale_shift, {1, 1, 1, 1}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
307                 depthwise_test_params{depthwise_scale_shift, {1, 4, 5, 5}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
308                 depthwise_test_params{depthwise_scale_shift, {4, 4, 10, 10}, true, 3, MKLDNNPlugin::impl_desc_type::jit},
309                 depthwise_test_params{depthwise_scale_shift, {1, 32, 128, 256}, true, 3, MKLDNNPlugin::impl_desc_type::jit},
310                 depthwise_test_params{depthwise_prelu, {1, 32, 128, 256}, false,3, MKLDNNPlugin::impl_desc_type::jit},
311                 depthwise_test_params{depthwise_prelu, {4, 3, 228, 228}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
312                 depthwise_test_params{depthwise_prelu, {1, 1, 1, 1}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
313                 depthwise_test_params{depthwise_prelu, {1, 4, 5, 5}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
314                 depthwise_test_params{depthwise_prelu, {4, 4, 10, 10}, true, 3, MKLDNNPlugin::impl_desc_type::jit},
315                 depthwise_test_params{depthwise_prelu, {1, 32, 128, 256}, true, 3, MKLDNNPlugin::impl_desc_type::jit},
316                 depthwise_test_params{depthwise_scale_shift, {1, 32, 128, 256}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
317                 depthwise_test_params{depthwise_scale_shift, {4, 3, 228, 228}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
318                 depthwise_test_params{depthwise_scale_shift, {1, 1, 1, 1}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
319                 depthwise_test_params{depthwise_scale_shift, {1, 4, 5, 5}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
320                 depthwise_test_params{depthwise_scale_shift, {4, 4, 10, 10}, true, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
321                 depthwise_test_params{depthwise_scale_shift, {1, 32, 128, 256}, true, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
322                 depthwise_test_params{depthwise_prelu, {1, 32, 128, 256}, false,3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
323                 depthwise_test_params{depthwise_prelu, {4, 3, 228, 228}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
324                 depthwise_test_params{depthwise_prelu, {1, 1, 1, 1}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
325                 depthwise_test_params{depthwise_prelu, {1, 4, 5, 5}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
326                 depthwise_test_params{depthwise_prelu, {4, 4, 10, 10}, true, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
327                 depthwise_test_params{depthwise_prelu, {1, 32, 128, 256}, true, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
328                 // 5D
329                 // mkl-dnn does not support 5D depthwise on jit yet
330 //                depthwise_test_params{depthwise_scale_shift, {1, 32, 16, 128, 256}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
331 //                depthwise_test_params{depthwise_scale_shift, {4, 3, 16, 228, 228}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
332 //                depthwise_test_params{depthwise_scale_shift, {1, 1, 1, 1, 1}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
333 //                depthwise_test_params{depthwise_scale_shift, {4, 4, 4, 10, 10}, true, 3, MKLDNNPlugin::impl_desc_type::jit},
334 //                depthwise_test_params{depthwise_scale_shift, {1, 32, 16, 128, 256}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
335 //                depthwise_test_params{depthwise_scale_shift, {4, 3, 16, 228, 228}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
336                 depthwise_test_params{depthwise_scale_shift, {1, 1, 1, 1, 1}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
337                 depthwise_test_params{depthwise_scale_shift, {4, 4, 4, 10, 10}, true, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}}
338         ));
339
340 class MKLDNNGraphDynBatchDepthwiseTests: public MKLDNNGraphDepthwiseTests {
341 protected:
342
343     virtual void SetUp() {
344         try {
345             TestsCommon::SetUp();
346             depthwise_test_params p = ::testing::WithParamInterface<depthwise_test_params>::GetParam();
347             std::string model = getModel(p);
348             size_t MB = p.dims[0];
349             if (MB < 2)
350                 MB = 2;
351
352             InferenceEngine::CNNNetReader net_reader;
353             ASSERT_NO_THROW(net_reader.ReadNetwork(model.data(), model.length()));
354
355             InferenceEngine::TBlob<uint8_t> *weights = new InferenceEngine::TBlob<uint8_t>(InferenceEngine::Precision::U8, InferenceEngine::C, {p.dims[1] * 4 * sizeof(float)});
356             weights->allocate();
357             fill_data( weights->data().as<float*>(), weights->size() / sizeof(float));
358             float * data = weights->buffer();
359             for (size_t i = 0; i < weights->size() / sizeof(float); i++) {
360                 if (data[i] < 0) {
361                     data[i] *= -1;
362                 }
363             }
364             InferenceEngine::TBlob<uint8_t>::Ptr weights_ptr = InferenceEngine::TBlob<uint8_t>::Ptr(weights);
365             net_reader.SetWeights(weights_ptr);
366             InferenceEngine::CNNNetwork network = net_reader.getNetwork();
367             auto implNet = dynamic_cast<InferenceEngine::details::CNNNetworkImpl *>(&((InferenceEngine::ICNNNetwork&)network));
368             ASSERT_NE(nullptr, implNet) << "Failed to cast ICNNNetwork to CNNNetworkImpl";
369             InferenceEngine::ResponseDesc resp;
370             InferenceEngine::StatusCode sts  = implNet->setBatchSizeReshape(MB, &resp);
371             ASSERT_EQ((int)InferenceEngine::StatusCode::OK, sts) << resp.msg;
372
373
374             MKLDNNGraphTestClass graph;
375             graph.setProperty({{InferenceEngine::PluginConfigParams::KEY_DYN_BATCH_ENABLED, InferenceEngine::PluginConfigParams::YES}});
376             graph.CreateGraph(net_reader.getNetwork());
377
378             InferenceEngine::SizeVector dims_src = p.dims;
379             InferenceEngine::Layout layout = InferenceEngine::ANY;
380             switch (p.dims.size()) {
381                 case 4:
382                     layout = InferenceEngine::NCHW;
383                     break;
384                 case 5:
385                     layout = InferenceEngine::NCDHW;
386                     break;
387             }
388             InferenceEngine::Blob::Ptr src = InferenceEngine::make_shared_blob<float, const InferenceEngine::SizeVector>(InferenceEngine::Precision::FP32, layout, dims_src);
389             InferenceEngine::TBlob<float>* srcPtr = dynamic_cast<InferenceEngine::TBlob<float>*>(src.get());
390             if (srcPtr == nullptr)
391                 FAIL() << "Cannot cast blob to TBlob<float>.";
392
393             src->allocate();
394             fill_data(src->buffer(), src->size());
395
396             InferenceEngine::BlobMap srcs;
397             srcs.insert(std::pair<std::string, InferenceEngine::Blob::Ptr>("in1", src));
398
399             InferenceEngine::OutputsDataMap out;
400             out = net_reader.getNetwork().getOutputsInfo();
401             InferenceEngine::BlobMap outputBlobs;
402
403             std::pair<std::string, InferenceEngine::DataPtr> item = *out.begin();
404
405             InferenceEngine::TBlob<float>::Ptr output;
406             output = InferenceEngine::make_shared_blob<float>(item.second->getTensorDesc());
407             output->allocate();
408             outputBlobs[item.first] = output;
409
410             auto checkDepthwise = [](const MKLDNNPlugin::MKLDNNNodePtr& node) {
411                 return node->getType() == MKLDNNPlugin::Depthwise;
412             };
413
414             graph.checkDynBatch(srcs, outputBlobs, MB, MB, checkDepthwise);
415             graph.checkDynBatch(srcs, outputBlobs, 1, MB, checkDepthwise);
416         } catch (const InferenceEngine::details::InferenceEngineException &e) {
417             FAIL() << e.what();
418         }
419     }
420 };
421
422 TEST_P(MKLDNNGraphDynBatchDepthwiseTests, TestsDynBatchDepthwise) {}
423
424 INSTANTIATE_TEST_CASE_P(
425         TestsDynBatchDepthwise, MKLDNNGraphDynBatchDepthwiseTests,
426         ::testing::Values(
427                 depthwise_test_params{depthwise_scale_shift, {1, 32, 128, 256}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
428                 depthwise_test_params{depthwise_scale_shift, {4, 3, 228, 228}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
429                 depthwise_test_params{depthwise_scale_shift, {1, 1, 1, 1}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
430                 depthwise_test_params{depthwise_scale_shift, {1, 4, 5, 5}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
431                 depthwise_test_params{depthwise_scale_shift, {4, 4, 10, 10}, true, 3, MKLDNNPlugin::impl_desc_type::jit},
432                 depthwise_test_params{depthwise_scale_shift, {1, 32, 128, 256}, true, 3, MKLDNNPlugin::impl_desc_type::jit},
433                 depthwise_test_params{depthwise_prelu, {1, 32, 128, 256}, false,3, MKLDNNPlugin::impl_desc_type::jit},
434                 depthwise_test_params{depthwise_prelu, {4, 3, 228, 228}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
435                 depthwise_test_params{depthwise_prelu, {1, 1, 1, 1}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
436                 depthwise_test_params{depthwise_prelu, {1, 4, 5, 5}, false, 3, MKLDNNPlugin::impl_desc_type::jit},
437                 depthwise_test_params{depthwise_prelu, {4, 4, 10, 10}, true, 3, MKLDNNPlugin::impl_desc_type::jit},
438                 depthwise_test_params{depthwise_prelu, {1, 32, 128, 256}, true, 3, MKLDNNPlugin::impl_desc_type::jit},
439                 depthwise_test_params{depthwise_scale_shift, {1, 32, 128, 256}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
440                 depthwise_test_params{depthwise_scale_shift, {4, 3, 228, 228}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
441                 depthwise_test_params{depthwise_scale_shift, {1, 1, 1, 1}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
442                 depthwise_test_params{depthwise_scale_shift, {1, 4, 5, 5}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
443                 depthwise_test_params{depthwise_scale_shift, {4, 4, 10, 10}, true, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
444                 depthwise_test_params{depthwise_scale_shift, {1, 32, 128, 256}, true, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
445                 depthwise_test_params{depthwise_prelu, {1, 32, 128, 256}, false,3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
446                 depthwise_test_params{depthwise_prelu, {4, 3, 228, 228}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
447                 depthwise_test_params{depthwise_prelu, {1, 1, 1, 1}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
448                 depthwise_test_params{depthwise_prelu, {1, 4, 5, 5}, false, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
449                 depthwise_test_params{depthwise_prelu, {4, 4, 10, 10}, true, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}},
450                 depthwise_test_params{depthwise_prelu, {1, 32, 128, 256}, true, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref_any}}
451         ));