leezu commented on a change in pull request #19174:
URL: https://github.com/apache/incubator-mxnet/pull/19174#discussion_r527363911
##########
File path: CMakeLists.txt
##########
@@ -60,6 +60,10 @@ cmake_dependent_option(USE_SSE "Build with x86 SSE
instruction support" ON
"CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL
amd64" OFF)
option(USE_F16C "Build with x86 F16C instruction support" ON) # autodetects
support if ON
option(USE_LAPACK "Build with lapack support" ON)
+option(USE_ILP64_LAPACKE "Use ILP64 LAPACKE interface" OFF)
+option(USE_LAPACKE_INTERFACE "Use LAPACKE interface for lapack support" OFF)
+option(LINK_GFORTRAN "Link to gfortran" OFF)
+option(LINK_LAPACK "Link to lapack. Use this option if lapack is not provided
with the BLAS lib" OFF)
Review comment:
We should be able to use
https://cmake.org/cmake/help/latest/module/CheckSymbolExists.html or
https://cmake.org/cmake/help/latest/module/CheckCSourceCompiles.html#module:CheckCSourceCompiles
to detect this
##########
File path: CMakeLists.txt
##########
@@ -60,6 +60,10 @@ cmake_dependent_option(USE_SSE "Build with x86 SSE
instruction support" ON
"CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL
amd64" OFF)
option(USE_F16C "Build with x86 F16C instruction support" ON) # autodetects
support if ON
option(USE_LAPACK "Build with lapack support" ON)
+option(USE_ILP64_LAPACKE "Use ILP64 LAPACKE interface" OFF)
Review comment:
We should be able to use
https://cmake.org/cmake/help/latest/module/CheckSymbolExists.html or
https://cmake.org/cmake/help/latest/module/CheckCSourceCompiles.html#module:CheckCSourceCompiles
to detect this
##########
File path: CMakeLists.txt
##########
@@ -445,18 +449,44 @@ elseif(UNIX)
list(APPEND mxnet_LINKER_LIBS Threads::Threads)
endif()
+if(USE_ILP64_LAPACKE)
+ message("USE_ILP64_LAPACKE is ON")
+ if(NOT USE_INT64_TENSOR_SIZE)
+ message(FATAL_ERROR "USE_INT64_TENSOR_SIZE must be set to ON when
USE_ILP64_LAPACKE=ON")
+ endif()
+ if(NOT USE_LAPACKE_INTERFACE)
+ message("Automatically set USE_LAPACKE_INTERFACE=ON")
+ set(USE_LAPACKE_INTERFACE ON)
+ endif()
+ add_definitions(-DMXNET_USE_ILP64_LAPACKE=1)
+endif()
+
+if(USE_LAPACKE_INTERFACE)
+ message("USE_LAPACKE_INTERFACE is ON")
+ if(NOT USE_LAPACK)
+ message("Automatically set USE_LAPACK=ON")
+ set(USE_LAPACK ON)
+ endif()
+ add_definitions(-DMXNET_USE_LAPACKE_INTERFACE=1)
+endif()
Review comment:
Why do we need to support LAPACKE=0 following this PR?
##########
File path: CMakeLists.txt
##########
@@ -60,6 +60,10 @@ cmake_dependent_option(USE_SSE "Build with x86 SSE
instruction support" ON
"CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL
amd64" OFF)
option(USE_F16C "Build with x86 F16C instruction support" ON) # autodetects
support if ON
option(USE_LAPACK "Build with lapack support" ON)
+option(USE_ILP64_LAPACKE "Use ILP64 LAPACKE interface" OFF)
+option(USE_LAPACKE_INTERFACE "Use LAPACKE interface for lapack support" OFF)
+option(LINK_GFORTRAN "Link to gfortran" OFF)
Review comment:
We should be able to use
https://cmake.org/cmake/help/latest/module/CheckSymbolExists.html or
https://cmake.org/cmake/help/latest/module/CheckCSourceCompiles.html#module:CheckCSourceCompiles
to detect this
----------------------------------------------------------------
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]