Skip to content

Commit 5284461

Browse files
committed
add Ampere CC
* Ampere has CC 8.0 * Arm64 server support has been added in CUDA 11 (only V100 for now)
1 parent cb54f4c commit 5284461

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cmake/OpenCVDetectCUDA.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@ if(CUDA_FOUND)
7272

7373
message(STATUS "CUDA detected: " ${CUDA_VERSION})
7474

75-
set(_generations "Fermi" "Kepler" "Maxwell" "Pascal" "Volta" "Turing")
75+
set(_generations "Fermi" "Kepler" "Maxwell" "Pascal" "Volta" "Turing" "Ampere")
7676
set(_arch_fermi "2.0")
7777
set(_arch_kepler "3.0;3.5;3.7")
7878
set(_arch_maxwell "5.0;5.2")
7979
set(_arch_pascal "6.0;6.1")
8080
set(_arch_volta "7.0")
8181
set(_arch_turing "7.5")
82+
set(_arch_ampere "8.0")
8283
if(NOT CMAKE_CROSSCOMPILING)
8384
list(APPEND _generations "Auto")
8485
endif()
@@ -141,6 +142,8 @@ if(CUDA_FOUND)
141142
set(__cuda_arch_bin ${_arch_volta})
142143
elseif(CUDA_GENERATION STREQUAL "Turing")
143144
set(__cuda_arch_bin ${_arch_turing})
145+
elseif(CUDA_GENERATION STREQUAL "Ampere")
146+
set(__cuda_arch_bin ${_arch_ampere})
144147
elseif(CUDA_GENERATION STREQUAL "Auto")
145148
ocv_detect_native_cuda_arch(_nvcc_res _nvcc_out)
146149
if(NOT _nvcc_res EQUAL 0)
@@ -158,7 +161,8 @@ if(CUDA_FOUND)
158161
ocv_detect_native_cuda_arch(_nvcc_res _nvcc_out)
159162
if(NOT _nvcc_res EQUAL 0)
160163
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")
162166
else()
163167
set(__cuda_arch_bin "${_nvcc_out}")
164168
endif()
@@ -171,6 +175,7 @@ if(CUDA_FOUND)
171175
${_arch_pascal}
172176
${_arch_volta}
173177
${_arch_turing}
178+
${_arch_ampere}
174179
)
175180
endif()
176181
endif()

0 commit comments

Comments
 (0)