Add another MKL name alias for MKL (#3853)
authorJason Knight <binarybana@gmail.com>
Fri, 6 Sep 2019 13:30:13 +0000 (06:30 -0700)
committerTianqi Chen <tqchen@users.noreply.github.com>
Fri, 6 Sep 2019 13:30:13 +0000 (21:30 +0800)
Installed through pypi

cmake/config.cmake
cmake/modules/contrib/BLAS.cmake

index a8ed966..2a61099 100644 (file)
@@ -109,6 +109,7 @@ set(USE_BLAS none)
 # /path/to/mkl: mkl root path when use mkl blas library
 # set(USE_MKL_PATH /opt/intel/mkl) for UNIX
 # set(USE_MKL_PATH ../IntelSWTools/compilers_and_libraries_2018/windows/mkl) for WIN32
+# set(USE_MKL_PATH <path to venv or site-packages directory>) if using `pip install mkl`
 set(USE_MKL_PATH none)
 
 # Whether use contrib.random in runtime
index 44f3181..62fb1d8 100644 (file)
@@ -28,7 +28,7 @@ elseif(USE_BLAS STREQUAL "mkl")
     set(USE_MKL_PATH /opt/intel/mkl)
   endif()
   if(APPLE)
-    find_library(BLAS_LIBRARY NAMES mklml HINTS ${USE_MKL_PATH}/lib/ ${USE_MKL_PATH}/lib/intel64)
+    find_library(BLAS_LIBRARY NAMES mklml mkl_rt HINTS ${USE_MKL_PATH}/lib/ ${USE_MKL_PATH}/lib/intel64)
   elseif(UNIX)
     find_library(BLAS_LIBRARY NAMES mkl_rt mklml_gnu HINTS ${USE_MKL_PATH}/lib/ ${USE_MKL_PATH}/lib/intel64)
   elseif(MSVC)