diff options
author | Eugene Zhulenev <ezhulenev@google.com> | 2018-09-26 17:57:37 -0700 |
---|---|---|
committer | Eugene Zhulenev <ezhulenev@google.com> | 2018-09-26 17:57:37 -0700 |
commit | 22ed98a331d059dfc437f11158693ec759423e9c (patch) | |
tree | 672ac6d34aef1943b863d9a7cc73d2222893c29e /unsupported | |
parent | 71cd3fbd6a03991977fd3faf82109bf27b701d2d (diff) |
Conditionally add mkldnn test
Diffstat (limited to 'unsupported')
-rw-r--r-- | unsupported/test/CMakeLists.txt | 5 | ||||
-rw-r--r-- | unsupported/test/cxx11_tensor_contraction_mkldnn.cpp | 10 |
2 files changed, 4 insertions, 11 deletions
diff --git a/unsupported/test/CMakeLists.txt b/unsupported/test/CMakeLists.txt index 25ae1a8d2..2fd4e1b97 100644 --- a/unsupported/test/CMakeLists.txt +++ b/unsupported/test/CMakeLists.txt @@ -191,6 +191,10 @@ if(EIGEN_TEST_CXX11) ei_add_test_sycl(cxx11_tensor_custom_op_sycl ${STD_CXX_FLAG}) endif(EIGEN_TEST_SYCL) + if (MKLDNN_FOUND) + ei_add_test(cxx11_tensor_contraction_mkldnn) + endif (MKLDNN_FOUND) + ei_add_test(cxx11_eventcount "-pthread" "${CMAKE_THREAD_LIBS_INIT}") ei_add_test(cxx11_runqueue "-pthread" "${CMAKE_THREAD_LIBS_INIT}") ei_add_test(cxx11_non_blocking_thread_pool "-pthread" "${CMAKE_THREAD_LIBS_INIT}") @@ -201,7 +205,6 @@ if(EIGEN_TEST_CXX11) ei_add_test(cxx11_tensor_index_list) ei_add_test(cxx11_tensor_mixed_indices) ei_add_test(cxx11_tensor_contraction) - ei_add_test(cxx11_tensor_contraction_mkldnn) ei_add_test(cxx11_tensor_convolution) ei_add_test(cxx11_tensor_expr) ei_add_test(cxx11_tensor_fixed_size) diff --git a/unsupported/test/cxx11_tensor_contraction_mkldnn.cpp b/unsupported/test/cxx11_tensor_contraction_mkldnn.cpp index 5a905c0cf..f164d644d 100644 --- a/unsupported/test/cxx11_tensor_contraction_mkldnn.cpp +++ b/unsupported/test/cxx11_tensor_contraction_mkldnn.cpp @@ -9,15 +9,8 @@ #include "main.h" -// Nothing to test here if we do not have mkldnn enabled. -#if defined(EIGEN_USE_MKLDNN) - #include <Eigen/CXX11/Tensor> -using Eigen::array; -using Eigen::ColMajor; -using Eigen::Tensor; -using Eigen::Index; using Eigen::internal::blas_data_mapper; using Eigen::internal::mkldnn_gemm_kernel; using Eigen::internal::mkldnn_gemm_pack; @@ -136,6 +129,3 @@ EIGEN_DECLARE_TEST(cxx11_tensor_contraction_mkldnn) { CALL_SUBTEST(test_mkldnn_gemm_pack<float>()); CALL_SUBTEST(test_mkldnn_gemm_kernel<float>()); } -#else -EIGEN_DECLARE_TEST(cxx11_tensor_contraction_mkldnn) {} -#endif // EIGEN_USE_MKLDNN |