You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2020/09/12 06:39:21 UTC
[incubator-mxnet] branch master updated: Add cmake flag
USE_FATBIN_COMPRESSION, ON by default for CUDA >= 11 (#19123)
This is an automated email from the ASF dual-hosted git repository.
zhasheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 5c1aadc Add cmake flag USE_FATBIN_COMPRESSION, ON by default for CUDA >= 11 (#19123)
5c1aadc is described below
commit 5c1aadcd4b19e6a9f33f9fc1ffa0ebe3dd6862af
Author: Dick Carter <dc...@nvidia.com>
AuthorDate: Fri Sep 11 23:37:31 2020 -0700
Add cmake flag USE_FATBIN_COMPRESSION, ON by default for CUDA >= 11 (#19123)
* Add cmake flag USE_FATBIN_COMPRESSION, ON by default for CUDA >= 11
* cmake flag USE_FATBIN_COMPRESSION default is ON for all builds
---
CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7d0a90a..189afd2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,6 +51,7 @@ Format: Auto | Common | All | LIST(ARCH_AND_PTX ...)
option(USE_NCCL "Use NVidia NCCL with CUDA" OFF)
option(USE_OPENCV "Build with OpenCV support" ON)
option(USE_OPENMP "Build with Openmp support" ON)
+option(USE_FATBIN_COMPRESSION "Compress nvcc fatbin output" ON)
cmake_dependent_option(USE_NVML "Build with nvml support if found" ON "USE_CUDA" OFF)
cmake_dependent_option(USE_CUDNN "Build with cudnn support" ON "USE_CUDA" OFF) # one could set CUDNN_ROOT for search path
cmake_dependent_option(USE_NVTX "Build with nvtx support if found" ON "USE_CUDA" OFF)
@@ -632,6 +633,10 @@ endif()
# Add cmake targets
add_subdirectory("3rdparty/mshadow")
+if(USE_CUDA AND USE_FATBIN_COMPRESSION)
+ string(APPEND CMAKE_CUDA_FLAGS "--fatbin-options -compress-all ")
+ message("-- CUDA: Adding NVCC options: --fatbin-options -compress-all ")
+endif()
if(UNIX)
string(APPEND CMAKE_CUDA_FLAGS " ${CUDA_ARCH_FLAGS_SPACES}")
# Create dummy file since we want an empty shared library before linking