Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / mkl-dnn / tests / gtests / test_binary_convolution_dw_conv_eltwise_forward.cpp
1 /*******************************************************************************
2 * Copyright 2019 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 #include "test_binary_convolution_dw_conv_forward_common.hpp"
22
23 namespace mkldnn {
24
25 using binary_convolution_test = binary_convolution_forward_test;
26
27 TEST_P(binary_convolution_test, TestBinaryConvolutionDwConvEltwise)
28 {
29 }
30
31 #define BIN
32 #define WITH_DW_CONV
33 #define WITH_ELTWISE
34 #define DIRECTION_FORWARD
35 #include "convolution_common.h"
36
37 #define PARAMS_WITH_ELTIWSE(...) \
38     EXPAND_ARGS(PARAMS(eltwise_relu, __VA_ARGS__)), \
39     EXPAND_ARGS(PARAMS(eltwise_elu, __VA_ARGS__)), \
40     EXPAND_ARGS(PARAMS(eltwise_tanh, __VA_ARGS__)), \
41     EXPAND_ARGS(PARAMS(eltwise_square, __VA_ARGS__)), \
42     EXPAND_ARGS(PARAMS(eltwise_abs, __VA_ARGS__)), \
43     EXPAND_ARGS(PARAMS(eltwise_sqrt, __VA_ARGS__)), \
44     EXPAND_ARGS(PARAMS(eltwise_linear, __VA_ARGS__)), \
45     EXPAND_ARGS(PARAMS(eltwise_bounded_relu, __VA_ARGS__)), \
46     EXPAND_ARGS(PARAMS(eltwise_soft_relu, __VA_ARGS__)), \
47     EXPAND_ARGS(PARAMS(eltwise_logistic, __VA_ARGS__)), \
48     EXPAND_ARGS(PARAMS(eltwise_clamp, __VA_ARGS__))
49
50 INST_TEST_CASE(Mobilenet_Blocked,
51     PARAMS_WITH_ELTIWSE(FMT_DATA_BLOCKED, FMT_WEIGHTS_BLOCKED, FMT_BIAS, FMT_WEIGHTS_DW_BLOCKED, FMT_BIAS, FMT_DATA_BLOCKED,
52            1, 7, 10, 10,  37, 1, 1, 0, 0, 1, 1,  37, 3, 3, 1, 1, 2, 2)
53 );
54
55 }