Switch cuda target architecture from sm_30 to sm_50. I.e. Maxwell instead of Kepler.

This commit is contained in:
Davis King 2020-07-11 21:07:36 -04:00
parent a2498dc47c
commit 23b9abd07a
3 changed files with 3 additions and 3 deletions

View File

@ -645,7 +645,7 @@ if (NOT TARGET dlib)
# Note that we add __STRICT_ANSI__ to avoid freaking out nvcc with gcc specific
# magic in the standard C++ header files (since nvcc uses gcc headers on
# linux).
list(APPEND CUDA_NVCC_FLAGS "-arch=sm_30;-D__STRICT_ANSI__;-D_MWAITXINTRIN_H_INCLUDED;-D_FORCE_INLINES;${FLAGS_FOR_NVCC}")
list(APPEND CUDA_NVCC_FLAGS "-arch=sm_50;-D__STRICT_ANSI__;-D_MWAITXINTRIN_H_INCLUDED;-D_FORCE_INLINES;${FLAGS_FOR_NVCC}")
list(APPEND CUDA_NVCC_FLAGS ${active_preprocessor_switches})
if (NOT DLIB_IN_PROJECT_BUILD)
LIST(APPEND CUDA_NVCC_FLAGS -DDLIB__CMAKE_GENERATED_A_CONFIG_H_FILE)

View File

@ -9,6 +9,6 @@ add_definitions(-DDLIB_USE_CUDA)
option(CUDA_PROPAGATE_HOST_FLAGS "Propage C/CXX_FLAGS and friends to the host compiler via -Xcompile" OFF)
find_package(CUDA 7.5 REQUIRED)
set(CUDA_HOST_COMPILATION_CPP ON)
list(APPEND CUDA_NVCC_FLAGS "-arch=sm_30;-std=c++11;-D__STRICT_ANSI__;-D_MWAITXINTRIN_H_INCLUDED;-D_FORCE_INLINES")
list(APPEND CUDA_NVCC_FLAGS "-arch=sm_50;-std=c++11;-D__STRICT_ANSI__;-D_MWAITXINTRIN_H_INCLUDED;-D_FORCE_INLINES")
cuda_add_library(cuda_test STATIC cuda_test.cu )

View File

@ -7,7 +7,7 @@ include(../use_cpp_11.cmake)
option(CUDA_PROPAGATE_HOST_FLAGS "Propage C/CXX_FLAGS and friends to the host compiler via -Xcompile" OFF)
find_package(CUDA 7.5 REQUIRED)
set(CUDA_HOST_COMPILATION_CPP ON)
list(APPEND CUDA_NVCC_FLAGS "-arch=sm_30;-std=c++11;-D__STRICT_ANSI__")
list(APPEND CUDA_NVCC_FLAGS "-arch=sm_50;-std=c++11;-D__STRICT_ANSI__")
add_definitions(-DDLIB_USE_CUDA)
include(find_cudnn.txt)