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

Commit

Permalink
Fixed mshadow MKL/MKLML finding
Browse files Browse the repository at this point in the history
  • Loading branch information
lebeg committed Aug 8, 2018
1 parent d84854c commit 394baac
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
6 changes: 3 additions & 3 deletions cmake/ChooseBLAS.cmake
Expand Up @@ -123,10 +123,10 @@ function(try_mklml)

include(${CMAKE_CURRENT_LIST_DIR}/DownloadMKLML.cmake)
find_package(MKLML REQUIRED)
include_directories(SYSTEM ${MKLML_INCLUDE_DIRS})
set(mxnet_LINKER_LIBS ${mxnet_LINKER_LIBS} ${MKLML_LIBRARIES} PARENT_SCOPE)
include_directories(SYSTEM ${MKL_INCLUDE_DIRS})
set(mxnet_LINKER_LIBS ${mxnet_LINKER_LIBS} ${MKL_LIBRARIES} PARENT_SCOPE)

set(MKL_FOUND ${MKLML_FOUND} PARENT_SCOPE)
set(MKL_FOUND ${MKL_FOUND} PARENT_SCOPE)
set(MKLROOT ${MKLROOT} PARENT_SCOPE)

set(BLAS MKL PARENT_SCOPE)
Expand Down
4 changes: 4 additions & 0 deletions cmake/Modules/FindMKL.cmake
Expand Up @@ -32,6 +32,10 @@
# MKL_LIBRARIES : the libraries to link against.
#

if(MKL_FOUND)
return()
endif()

if($ENV{MKLROOT})
file(TO_CMAKE_PATH "$ENV{MKLROOT}" MKLROOT)
message(STATUS "MKLROOT=${MKLROOT}")
Expand Down
13 changes: 9 additions & 4 deletions cmake/Modules/FindMKLML.cmake
Expand Up @@ -23,9 +23,13 @@
#
# The following are set after configuration is done:
#
# MKLML_FOUND
# MKLML_INCLUDE_DIRS
# MKLML_LIBRARIES
# MKL_FOUND
# MKL_INCLUDE_DIRS
# MKL_LIBRARIES

if(MKL_FOUND)
return()
endif()

if($ENV{MKLROOT})
file(TO_CMAKE_PATH "$ENV{MKLROOT}" MKLROOT)
Expand Down Expand Up @@ -96,7 +100,8 @@ include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MKLML DEFAULT_MSG ${LOOKED_FOR})

if(MKLML_FOUND)
set(MKLML_INCLUDE_DIRS "${MKLML_INCLUDE_DIR}")
set(MKL_FOUND ${MKLML_FOUND})
set(MKL_INCLUDE_DIRS "${MKLML_INCLUDE_DIR}")

mark_as_advanced(${LOOKED_FOR})

Expand Down

0 comments on commit 394baac

Please sign in to comment.