leezu commented on a change in pull request #18625:
URL: https://github.com/apache/incubator-mxnet/pull/18625#discussion_r520899865



##########
File path: CMakeLists.txt
##########
@@ -305,6 +304,14 @@ endif()
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
 
+if(DEFINED USE_INT64_TENSOR_SIZE AND NOT USE_INT64_TENSOR_SIZE OR 
CMAKE_SIZEOF_VOID_P EQUAL 4)
+  message(STATUS "Large Tensor disabled")
+  set(USE_INT64_TENSOR_SIZE OFF CACHE BOOL "Use int64_t to represent the total 
number of elements in a tensor")
+else()
+  message(STATUS "Large Tensor enabled")
+  set(USE_INT64_TENSOR_SIZE ON CACHE BOOL "Use int64_t to represent the total 
number of elements in a tensor")
+endif()

Review comment:
       ```suggestion
    cmake_dependent_option(USE_INT64_TENSOR_SIZE "Use int64_t to represent the 
total number of elements in a tensor" ON "CMAKE_SIZEOF_VOID_P EQUAL 8" OFF)
   ```
   
   This may keep the code concise?




----------------------------------------------------------------
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]


Reply via email to