From d95d74fd732c12a03ebc0d219eb5823abd824291 Mon Sep 17 00:00:00 2001 From: Tao Lv Date: Mon, 20 Jan 2020 04:07:33 +0800 Subject: [PATCH] cmake: check USE_OPENMP and pass proper MKL-DNN build flags (#17356) --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a510c843181f..ba2940e1cfa0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -301,6 +301,10 @@ if(USE_MKLDNN) set(MKLDNN_ENABLE_JIT_PROFILING OFF CACHE INTERNAL "" FORCE) set(MKLDNN_LIBRARY_TYPE STATIC CACHE INTERNAL "" FORCE) + if(NOT USE_OPENMP) + set(MKLDNN_CPU_RUNTIME SEQ CACHE INTERNAL "" FORCE) + endif() + add_subdirectory(3rdparty/mkldnn) include_directories(3rdparty/mkldnn/include)