@@ -43,7 +43,7 @@ if(CUDA_FOUND)
43
43
44
44
message (STATUS "CUDA detected: " ${CUDA_VERSION} )
45
45
46
- set (_generations "Fermi" "Kepler" "Maxwell" "Pascal" )
46
+ set (_generations "Fermi" "Kepler" "Maxwell" "Pascal" "Volta" )
47
47
if (NOT CMAKE_CROSSCOMPILING )
48
48
list (APPEND _generations "Auto" )
49
49
endif ()
@@ -70,6 +70,8 @@ if(CUDA_FOUND)
70
70
set (__cuda_arch_bin "5.0 5.2" )
71
71
elseif (CUDA_GENERATION STREQUAL "Pascal" )
72
72
set (__cuda_arch_bin "6.0 6.1" )
73
+ elseif (CUDA_GENERATION STREQUAL "Volta" )
74
+ set (__cuda_arch_bin "7.0" )
73
75
elseif (CUDA_GENERATION STREQUAL "Auto" )
74
76
execute_process ( COMMAND "${CUDA_NVCC_EXECUTABLE} " "${OpenCV_SOURCE_DIR} /cmake/checks/OpenCVDetectCudaArch.cu" "--run"
75
77
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY} /CMakeTmp/"
@@ -94,17 +96,17 @@ if(CUDA_FOUND)
94
96
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE )
95
97
if (NOT _nvcc_res EQUAL 0 )
96
98
message (STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures." )
97
- set (__cuda_arch_bin "5.3 6.2" )
99
+ set (__cuda_arch_bin "5.3 6.2 7.0 " )
98
100
else ()
99
101
set (__cuda_arch_bin "${_nvcc_out} " )
100
102
string (REPLACE "2.1" "2.1(2.0)" __cuda_arch_bin "${__cuda_arch_bin} " )
101
103
endif ()
102
104
set (__cuda_arch_ptx "" )
103
105
else ()
104
- if (${CUDA_VERSION} VERSION_LESS "8.0" )
105
- set (__cuda_arch_bin "2.0 3.0 3.5 3.7 5.0 5.2" )
106
- else ()
106
+ if (${CUDA_VERSION} VERSION_LESS "9.0" )
107
107
set (__cuda_arch_bin "2.0 3.0 3.5 3.7 5.0 5.2 6.0 6.1" )
108
+ else ()
109
+ set (__cuda_arch_bin "3.0 3.5 3.7 5.0 5.2 6.0 6.1 7.0" )
108
110
endif ()
109
111
endif ()
110
112
endif ()
0 commit comments