mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Switch cuda target architecture from sm_30 to sm_50. I.e. Maxwell instead of Kepler.
This commit is contained in:
parent
a2498dc47c
commit
23b9abd07a
@ -645,7 +645,7 @@ if (NOT TARGET dlib)
|
|||||||
# Note that we add __STRICT_ANSI__ to avoid freaking out nvcc with gcc specific
|
# 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
|
# magic in the standard C++ header files (since nvcc uses gcc headers on
|
||||||
# linux).
|
# 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})
|
list(APPEND CUDA_NVCC_FLAGS ${active_preprocessor_switches})
|
||||||
if (NOT DLIB_IN_PROJECT_BUILD)
|
if (NOT DLIB_IN_PROJECT_BUILD)
|
||||||
LIST(APPEND CUDA_NVCC_FLAGS -DDLIB__CMAKE_GENERATED_A_CONFIG_H_FILE)
|
LIST(APPEND CUDA_NVCC_FLAGS -DDLIB__CMAKE_GENERATED_A_CONFIG_H_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)
|
option(CUDA_PROPAGATE_HOST_FLAGS "Propage C/CXX_FLAGS and friends to the host compiler via -Xcompile" OFF)
|
||||||
find_package(CUDA 7.5 REQUIRED)
|
find_package(CUDA 7.5 REQUIRED)
|
||||||
set(CUDA_HOST_COMPILATION_CPP ON)
|
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 )
|
cuda_add_library(cuda_test STATIC cuda_test.cu )
|
||||||
|
@ -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)
|
option(CUDA_PROPAGATE_HOST_FLAGS "Propage C/CXX_FLAGS and friends to the host compiler via -Xcompile" OFF)
|
||||||
find_package(CUDA 7.5 REQUIRED)
|
find_package(CUDA 7.5 REQUIRED)
|
||||||
set(CUDA_HOST_COMPILATION_CPP ON)
|
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)
|
add_definitions(-DDLIB_USE_CUDA)
|
||||||
|
|
||||||
include(find_cudnn.txt)
|
include(find_cudnn.txt)
|
||||||
|
Loading…
Reference in New Issue
Block a user