You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/11/10 21:59:30 UTC
[GitHub] [incubator-mxnet] leezu commented on a change in pull request #18625: Enable Large Tensor Support: Stage 1
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:
users@infra.apache.org