Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Disable MKL_USE_STATIC_LIBS by default #17794

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,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
Expand Down
6 changes: 5 additions & 1 deletion python/mxnet/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,11 @@ def _load_lib():
# pylint: disable=E1123
lib = ctypes.CDLL(lib_path[0], winmode=0x00000008)
else:
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
# We use RTLD_GLOBAL as, when dynamically linking with MKL,
# libmkl_core.so may load libmkl_avx512.so via dlopen. When opening
# libmxnet and it's dependencies (libmkl_core.so) via RTLD_LOCAL, MKL's
# dlopen calls will fail with undefined symbol errors.
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL)
# DMatrix functions
lib.MXGetLastError.restype = ctypes.c_char_p
return lib
Expand Down