Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/cunn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Riccardi <riccardi@systran.fr>2017-04-07 19:23:22 +0300
committerThomas Riccardi <riccardi@systran.fr>2017-04-07 19:23:22 +0300
commit29161b3fdeac72ebaebee1901b23712cbecf20e7 (patch)
tree0b540c03b31318456c0396929e8a3e506ebd86d3
parentf225bb44c2cbccf90a48ffc4f25ee9056958ac63 (diff)
Support TORCH_NVCC_FLAGS environment variable
This is already supported in cutorch since august 2016, and is used in pytorch integration (to reduce the binary size).
-rw-r--r--lib/THCUNN/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/THCUNN/CMakeLists.txt b/lib/THCUNN/CMakeLists.txt
index 433d99d..d4777bf 100644
--- a/lib/THCUNN/CMakeLists.txt
+++ b/lib/THCUNN/CMakeLists.txt
@@ -33,6 +33,7 @@ ENDIF()
IF(NOT COMMAND CUDA_SELECT_NVCC_ARCH_FLAGS OR MSVC)
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/select_compute_arch.cmake)
ENDIF()
+LIST(APPEND CUDA_NVCC_FLAGS $ENV{TORCH_NVCC_FLAGS})
CUDA_SELECT_NVCC_ARCH_FLAGS(NVCC_FLAGS_EXTRA $ENV{TORCH_CUDA_ARCH_LIST})
LIST(APPEND CUDA_NVCC_FLAGS ${NVCC_FLAGS_EXTRA})