larroy commented on a change in pull request #15694: Improve openblas CMake 
logic, add generic blas option.
URL: https://github.com/apache/incubator-mxnet/pull/15694#discussion_r311305668
 
 

 ##########
 File path: 3rdparty/mshadow/cmake/mshadow.cmake
 ##########
 @@ -1,34 +1,40 @@
 set(mshadow_LINKER_LIBS "")
 
-set(BLAS "Open" CACHE STRING "Selected BLAS library")
-set_property(CACHE BLAS PROPERTY STRINGS "Atlas;Open;MKL")
+set(BLAS "openblas" CACHE STRING "Selected BLAS library")
+set_property(CACHE BLAS PROPERTY STRINGS "atlas;openblas;mkl;blas")
 
-if(DEFINED USE_BLAS)
-  set(BLAS "${USE_BLAS}") 
-else()
-  if(USE_MKL_IF_AVAILABLE)
-    if(NOT MKL_FOUND)
-      find_package(MKL)
-    endif()
-    if(MKL_FOUND)
-      set(BLAS "MKL")
+if(USE_MKL_IF_AVAILABLE)
+  if(NOT MKL_FOUND)
+    find_package(MKL)
+  endif()
+  if(MKL_FOUND)
+    if(USE_MKLML_MKL)
+      set(BLAS "mkl")
+    else()
+      set(BLAS "openblas")
     endif()
   endif()
 endif()
 
-if(BLAS STREQUAL "Atlas" OR BLAS STREQUAL "atlas")
+if(BLAS STREQUAL "atlas")
   find_package(Atlas REQUIRED)
   include_directories(SYSTEM ${Atlas_INCLUDE_DIR})
   list(APPEND mshadow_LINKER_LIBS ${Atlas_LIBRARIES})
   add_definitions(-DMSHADOW_USE_CBLAS=1)
   add_definitions(-DMSHADOW_USE_MKL=0)
-elseif(BLAS STREQUAL "Open" OR BLAS STREQUAL "open")
+elseif(BLAS STREQUAL "openblas")
   find_package(OpenBLAS REQUIRED)
   include_directories(SYSTEM ${OpenBLAS_INCLUDE_DIR})
   list(APPEND mshadow_LINKER_LIBS ${OpenBLAS_LIB})
   add_definitions(-DMSHADOW_USE_CBLAS=1)
   add_definitions(-DMSHADOW_USE_MKL=0)
-elseif(BLAS STREQUAL "MKL" OR BLAS STREQUAL "mkl")
+elseif(BLAS STREQUAL "blas")
+  set(BLA_VENDOR "Generic")
 
 Review comment:
   Can't do anything about it It's used by the CMake provided find_package.
   
   https://cmake.org/cmake/help/v3.12/module/FindBLAS.html

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to