From 540157d383b276b3eec81e0427a94fba11a28af1 Mon Sep 17 00:00:00 2001 From: Leonard Lausen Date: Wed, 2 Dec 2020 18:48:39 +0000 Subject: [PATCH] Keep MKL_USE_STATIC_LIBS=OFF by default, but fix it and enable on CI --- ci/docker/runtime_functions.sh | 1 + cmake/Modules/FindMKL.cmake | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index 88e77a77a73e..a31dd8404ae1 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -541,6 +541,7 @@ build_ubuntu_cpu_mkldnn_mkl() { -DUSE_CUDA=OFF \ -DUSE_TVM_OP=ON \ -DUSE_MKL_IF_AVAILABLE=ON \ + -DMKL_USE_STATIC_LIBS=OFF \ -DUSE_BLAS=MKL \ -DBUILD_EXTENSION_PATH=/work/mxnet/example/extensions/lib_external_ops \ -GNinja /work/mxnet diff --git a/cmake/Modules/FindMKL.cmake b/cmake/Modules/FindMKL.cmake index 0b9d69fc90a9..b4c9daaefca1 100644 --- a/cmake/Modules/FindMKL.cmake +++ b/cmake/Modules/FindMKL.cmake @@ -49,7 +49,7 @@ set(INTEL_OPT_ROOT "/opt/intel" CACHE PATH "Folder contains root-installed intel else() option(MKL_USE_SINGLE_DYNAMIC_LIBRARY "Use single dynamic library interface" ON) endif() - cmake_dependent_option(MKL_USE_STATIC_LIBS "Use static libraries" OFF "NOT MKL_USE_SINGLE_DYNAMIC_LIBRARY" OFF) + cmake_dependent_option(MKL_USE_STATIC_LIBS "Use static libraries" ON "NOT MKL_USE_SINGLE_DYNAMIC_LIBRARY" OFF) cmake_dependent_option(MKL_MULTI_THREADED "Use multi-threading" ON "NOT MKL_USE_SINGLE_DYNAMIC_LIBRARY" OFF) option(MKL_USE_ILP64 "Use ilp64 data model" OFF) cmake_dependent_option(MKL_USE_CLUSTER "Use cluster functions" OFF "CMAKE_SIZEOF_VOID_P EQUAL 4" OFF)