mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Conditionally add mkldnn test
This commit is contained in:
parent
71cd3fbd6a
commit
22ed98a331
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user