@@ -72,13 +72,14 @@ if(CUDA_FOUND)
72
72
73
73
message (STATUS "CUDA detected: " ${CUDA_VERSION} )
74
74
75
- set (_generations "Fermi" "Kepler" "Maxwell" "Pascal" "Volta" "Turing" )
75
+ set (_generations "Fermi" "Kepler" "Maxwell" "Pascal" "Volta" "Turing" "Ampere" )
76
76
set (_arch_fermi "2.0" )
77
77
set (_arch_kepler "3.0;3.5;3.7" )
78
78
set (_arch_maxwell "5.0;5.2" )
79
79
set (_arch_pascal "6.0;6.1" )
80
80
set (_arch_volta "7.0" )
81
81
set (_arch_turing "7.5" )
82
+ set (_arch_ampere "8.0" )
82
83
if (NOT CMAKE_CROSSCOMPILING )
83
84
list (APPEND _generations "Auto" )
84
85
endif ()
@@ -141,6 +142,8 @@ if(CUDA_FOUND)
141
142
set (__cuda_arch_bin ${_arch_volta} )
142
143
elseif (CUDA_GENERATION STREQUAL "Turing" )
143
144
set (__cuda_arch_bin ${_arch_turing} )
145
+ elseif (CUDA_GENERATION STREQUAL "Ampere" )
146
+ set (__cuda_arch_bin ${_arch_ampere} )
144
147
elseif (CUDA_GENERATION STREQUAL "Auto" )
145
148
ocv_detect_native_cuda_arch (_nvcc_res _nvcc_out )
146
149
if (NOT _nvcc_res EQUAL 0 )
@@ -158,7 +161,8 @@ if(CUDA_FOUND)
158
161
ocv_detect_native_cuda_arch (_nvcc_res _nvcc_out )
159
162
if (NOT _nvcc_res EQUAL 0 )
160
163
message (STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures." )
161
- set (__cuda_arch_bin "5.3 6.2 7.2" )
164
+ # TX1 (5.3) TX2 (6.2) Xavier (7.2) V100 (7.0)
165
+ set (__cuda_arch_bin "5.3 6.2 7.2 7.0" )
162
166
else ()
163
167
set (__cuda_arch_bin "${_nvcc_out} " )
164
168
endif ()
@@ -171,6 +175,7 @@ if(CUDA_FOUND)
171
175
${_arch_pascal}
172
176
${_arch_volta}
173
177
${_arch_turing}
178
+ ${_arch_ampere}
174
179
)
175
180
endif ()
176
181
endif ()
0 commit comments