1 #===============================================================================
2 # Copyright 2016-2018 Intel Corporation
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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 #===============================================================================
17 add_subdirectory (gtest)
20 set(MAIN_SRC_GTEST main.cpp)
22 include_directories(${CMAKE_CURRENT_SOURCE_DIR}
23 ${CMAKE_CURRENT_SOURCE_DIR}/gtest
24 ${CMAKE_CURRENT_SOURCE_DIR}/in
25 ${CMAKE_CURRENT_SOURCE_DIR}/../../src/common
26 ${CMAKE_CURRENT_SOURCE_DIR}/../../src/cpu
29 # Correct 'jnl' macro/jit issue
30 if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
31 append(CMAKE_CXX_FLAGS "/Qlong-double")
36 file(GLOB PRIM_TEST_CASES_SRC
37 test_iface_pd_iter.cpp
39 test_mkldnn_threading.cpp
44 test_softmax_forward.cpp
45 test_softmax_backward.cpp
50 test_pooling_forward.cpp
51 test_pooling_backward.cpp
52 test_batch_normalization.cpp
53 test_inner_product_forward.cpp
54 test_inner_product_backward_data.cpp
55 test_inner_product_backward_weights.cpp
57 test_convolution_format_any.cpp
58 test_convolution_forward_f32.cpp
59 test_convolution_forward_f32_3d.cpp
60 test_convolution_forward_s16s16s32.cpp
61 test_convolution_forward_u8s8s32.cpp
62 test_convolution_forward_u8s8fp.cpp
63 test_convolution_eltwise_forward_f32.cpp
64 test_convolution_eltwise_forward_x8s8f32s32.cpp
65 test_convolution_backward_data_f32.cpp
66 test_convolution_backward_data_s16s16s32.cpp
67 test_convolution_backward_weights_f32.cpp
68 test_convolution_backward_weights_s16s16s32.cpp
69 test_deconvolution.cpp
74 test_roi_pooling_forward.cpp
75 test_convolution_depthwise_forward_f32.cpp
76 test_convolution_depthwise_forward_x8s8f32s32.cpp
77 test_convolution_dw_conv_f32.cpp
78 test_convolution_dw_conv_u8s8s32.cpp
79 test_binary_convolution_forward.cpp
80 test_binary_convolution_eltwise_forward.cpp
81 test_binary_convolution_depthwise_forward.cpp
82 test_binary_convolution_sum_forward.cpp
83 test_binary_convolution_binarization_forward.cpp
85 test_binary_convolution_dw_conv_forward.cpp
86 test_binary_convolution_dw_conv_eltwise_forward.cpp
87 test_binary_convolution_dw_conv_depthwise_forward.cpp
88 test_binary_convolution_dw_conv_sum_forward.cpp
89 test_binary_convolution_dw_conv_binarization_forward.cpp
92 foreach(TEST_FILE ${PRIM_TEST_CASES_SRC})
93 get_filename_component(TEST_FILE_WE ${TEST_FILE} NAME_WE)
94 set(CURR_APP_NAME ${TEST_FILE_WE})
95 register_exe(${CURR_APP_NAME} "${MAIN_SRC_GTEST};${TEST_FILE}" "test" "mkldnn_gtest")