aaronmarkham commented on a change in pull request #11148: [MXNET-679] Refactor handling BLAS libraries with cmake URL: https://github.com/apache/incubator-mxnet/pull/11148#discussion_r202841167
########## File path: cmake/Modules/FindAccelerate.cmake ########## @@ -19,20 +19,44 @@ # # The following are set after configuration is done: # Accelerate_FOUND -# Accelerate_INCLUDE_DIRS +# Accelerate_LAPACK_FOUND +# Accelerate_INCLUDE_DIR # Accelerate_LIBRARIES file(TO_CMAKE_PATH "$ENV{Accelerate_HOME}" Accelerate_HOME) + set(Accelerate_INCLUDE_SEARCH_PATHS - /System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Versions/Current - ${Accelerate_HOME} -) + /System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Versions/Current + ${Accelerate_HOME} + ) -find_path(Accelerate_CBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Accelerate_INCLUDE_SEARCH_PATHS} PATH_SUFFIXES Headers) +find_path(Accelerate_CBLAS_INCLUDE_DIR + NAMES cblas.h + PATHS ${Accelerate_INCLUDE_SEARCH_PATHS} + PATH_SUFFIXES Headers) set(LOOKED_FOR Accelerate_CBLAS_INCLUDE_DIR -) + ) + +if(Accelerate_NEED_LAPACK) + message(STATUS "Looking for lapack support...") + + # Apples vecLib should contain lapack functionalities included in the Accelerate framework, but we will double check + # https://developer.apple.com/documentation/accelerate/veclib?changes=_2 + include(CheckFunctionExists) + set(CMAKE_REQUIRED_LIBRARIES "-framework Accelerate") + check_function_exists("cgees_" LAPACK_FOUND) + + if(LAPACK_FOUND) + set(Accelerate_LAPACK_FOUND True) + message(STATUS "Lapack found") Review comment: LAPACK ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services