diff --git a/cmake/FindCUDNN.cmake b/cmake/FindCUDNN.cmake index 37388d30..96a9a7e6 100644 --- a/cmake/FindCUDNN.cmake +++ b/cmake/FindCUDNN.cmake @@ -115,13 +115,10 @@ get_filename_component(__libpath_cudart "${CUDA_CUDART_LIBRARY}" PATH) # More strict enforcement of minor/patch version is done if/when the header file is examined. if(CUDNN_FIND_VERSION_EXACT) SET(__cudnn_ver_suffix ".${CUDNN_FIND_VERSION_MAJOR}") - SET(__cudnn_lib_win_name cudnn64_${CUDNN_FIND_VERSION_MAJOR}) -else() - SET(__cudnn_lib_win_name cudnn64) endif() find_library(CUDNN_LIBRARY - NAMES libcudnn.so${__cudnn_ver_suffix} libcudnn${__cudnn_ver_suffix}.dylib ${__cudnn_lib_win_name} + NAMES libcudnn.so${__cudnn_ver_suffix} libcudnn${__cudnn_ver_suffix}.dylib cudnn PATHS $ENV{LD_LIBRARY_PATH} ${__libpath_cudart} ${CUDNN_ROOT_DIR} ${PC_CUDNN_LIBRARY_DIRS} ${CMAKE_INSTALL_PREFIX} PATH_SUFFIXES lib lib64 bin DOC "CUDNN library." ) diff --git a/cmake/FindMKL.cmake b/cmake/FindMKL.cmake index 44720e98..028161e3 100644 --- a/cmake/FindMKL.cmake +++ b/cmake/FindMKL.cmake @@ -53,7 +53,13 @@ else() set(COR_LIB "mkl_core") endif() -set(INTEL_ROOT "/opt/intel" CACHE PATH "Folder contains intel libs") +if(MSVC) + set(ProgramFilesx86 "ProgramFiles(x86)") + set(INTEL_ROOT_DEFAULT $ENV{${ProgramFilesx86}}/IntelSWTools/compilers_and_libraries/windows) +else() + set(INTEL_ROOT_DEFAULT "/opt/intel") +endif() +set(INTEL_ROOT ${INTEL_ROOT_DEFAULT} CACHE PATH "Folder contains intel libs") find_path(MKL_ROOT include/mkl.h PATHS $ENV{MKLROOT} ${INTEL_ROOT}/mkl DOC "Folder contains MKL")