Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added explicit CUDA_ARCH_NAME variable for Caffe #2076

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ if (UNIX OR APPLE)
-DMKLDNN_INSTALL_DIR:PATH=<INSTALL_DIR>
-DUSE_MKL2017_AS_DEFAULT_ENGINE=${CAFFE_CPU_ONLY}
-DUSE_CUDNN=${USE_CUDNN}
-DCUDA_ARCH_NAME=${CUDA_ARCH}
-DCUDA_ARCH_NAME=${CUDA_ARCH_NAME}
-DCUDA_ARCH_BIN=${CUDA_ARCH_BIN}
-DCUDA_ARCH_PTX=${CUDA_ARCH_PTX}
-DCPU_ONLY=${CAFFE_CPU_ONLY}
Expand All @@ -809,7 +809,7 @@ if (UNIX OR APPLE)
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DUSE_CUDNN=${USE_CUDNN}
-DCUDA_ARCH_NAME=${CUDA_ARCH}
-DCUDA_ARCH_NAME=${CUDA_ARCH_NAME}
-DCUDA_ARCH_BIN=${CUDA_ARCH_BIN}
-DCUDA_ARCH_PTX=${CUDA_ARCH_PTX}
-DCPU_ONLY=${CAFFE_CPU_ONLY}
Expand Down
5 changes: 5 additions & 0 deletions cmake/Cuda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,11 @@ op_select_nvcc_arch_flags(NVCC_FLAGS_EXTRA)
list(APPEND CUDA_NVCC_FLAGS ${NVCC_FLAGS_EXTRA})
message(STATUS "Added CUDA NVCC flags for: ${NVCC_FLAGS_EXTRA_readable}")

if(NOT CUDA_ARCH_NAME)
# Create flag for Caffe, which is just the name without the parentheses
string(REGEX MATCH "([a-zA-Z]*)" CUDA_ARCH_NAME ${CUDA_ARCH})
endif()

# Boost 1.55 workaround, see https://svn.boost.org/trac/boost/ticket/9392 or
# https://github.com/ComputationalRadiationPhysics/picongpu/blob/master/src/picongpu/CMakeLists.txt
if (Boost_VERSION EQUAL 105500)
Expand Down