Commit 7a15aedf by Haichen Shen Committed by Yizhi Liu

[Fix] Fix blas cmake for mac os (#3898)

* fix cmake for mac os

* rename
parent 8c50469c
...@@ -28,17 +28,17 @@ elseif(USE_BLAS STREQUAL "mkl") ...@@ -28,17 +28,17 @@ elseif(USE_BLAS STREQUAL "mkl")
set(USE_MKL_PATH /opt/intel/mkl) set(USE_MKL_PATH /opt/intel/mkl)
endif() endif()
if(APPLE) if(APPLE)
find_library(BLAS_LIBRARY NAMES mklml mkl_rt HINTS ${USE_MKL_PATH}/lib/ ${USE_MKL_PATH}/lib/intel64) find_library(BLAS_LIBRARY_MKL NAMES mklml mkl_rt HINTS ${USE_MKL_PATH}/lib/ ${USE_MKL_PATH}/lib/intel64)
elseif(UNIX) elseif(UNIX)
find_library(BLAS_LIBRARY NAMES mkl_rt mklml_gnu HINTS ${USE_MKL_PATH}/lib/ ${USE_MKL_PATH}/lib/intel64) find_library(BLAS_LIBRARY_MKL NAMES mkl_rt mklml_gnu HINTS ${USE_MKL_PATH}/lib/ ${USE_MKL_PATH}/lib/intel64)
elseif(MSVC) elseif(MSVC)
find_library(BLAS_LIBRARY NAMES mkl_rt HINTS ${USE_MKL_PATH}/lib/ ${USE_MKL_PATH}/lib/intel64_win) find_library(BLAS_LIBRARY_MKL NAMES mkl_rt HINTS ${USE_MKL_PATH}/lib/ ${USE_MKL_PATH}/lib/intel64_win)
endif() endif()
include_directories(${USE_MKL_PATH}/include) include_directories(${USE_MKL_PATH}/include)
list(APPEND TVM_RUNTIME_LINKER_LIBS ${BLAS_LIBRARY}) list(APPEND TVM_RUNTIME_LINKER_LIBS ${BLAS_LIBRARY_MKL})
list(APPEND RUNTIME_SRCS ${CBLAS_CONTRIB_SRC}) list(APPEND RUNTIME_SRCS ${CBLAS_CONTRIB_SRC})
add_definitions(-DUSE_MKL_BLAS=1) add_definitions(-DUSE_MKL_BLAS=1)
message(STATUS "Use BLAS library " ${BLAS_LIBRARY}) message(STATUS "Use BLAS library " ${BLAS_LIBRARY_MKL})
elseif(USE_BLAS STREQUAL "atlas" OR USE_BLAS STREQUAL "blas") elseif(USE_BLAS STREQUAL "atlas" OR USE_BLAS STREQUAL "blas")
find_library(BLAS_LIBRARY cblas) find_library(BLAS_LIBRARY cblas)
list(APPEND TVM_RUNTIME_LINKER_LIBS ${BLAS_LIBRARY}) list(APPEND TVM_RUNTIME_LINKER_LIBS ${BLAS_LIBRARY})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment