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

Commit

Permalink
Fix MKL_USE_STATIC_LIBS=0 and test on one CI pipeline
Browse files Browse the repository at this point in the history
Co-authored-by: Anna Karbownik <anna.karbownik@intel.com>,
  • Loading branch information
leezu committed Dec 4, 2020
1 parent afc76b0 commit f9a6369
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit f9a6369

Please sign in to comment.