mirror of
https://github.com/opencv/opencv.git
synced 2025-06-28 07:23:30 +08:00
cuda: add ada lovelace and hopper cuda arch
This commit is contained in:
parent
fdf2151d9f
commit
927aa1e617
@ -101,7 +101,7 @@ if(CUDA_FOUND)
|
|||||||
message(STATUS "CUDA detected: " ${CUDA_VERSION})
|
message(STATUS "CUDA detected: " ${CUDA_VERSION})
|
||||||
|
|
||||||
OCV_OPTION(CUDA_ENABLE_DEPRECATED_GENERATION "Enable deprecated generations in the list" OFF)
|
OCV_OPTION(CUDA_ENABLE_DEPRECATED_GENERATION "Enable deprecated generations in the list" OFF)
|
||||||
set(_generations "Maxwell" "Pascal" "Volta" "Turing" "Ampere")
|
set(_generations "Maxwell" "Pascal" "Volta" "Turing" "Ampere" "Lovelace" "Hopper")
|
||||||
if(CUDA_ENABLE_DEPRECATED_GENERATION)
|
if(CUDA_ENABLE_DEPRECATED_GENERATION)
|
||||||
set(_generations "Fermi" "${_generations}")
|
set(_generations "Fermi" "${_generations}")
|
||||||
set(_generations "Kepler" "${_generations}")
|
set(_generations "Kepler" "${_generations}")
|
||||||
@ -113,6 +113,8 @@ if(CUDA_FOUND)
|
|||||||
set(_arch_volta "7.0")
|
set(_arch_volta "7.0")
|
||||||
set(_arch_turing "7.5")
|
set(_arch_turing "7.5")
|
||||||
set(_arch_ampere "8.0;8.6")
|
set(_arch_ampere "8.0;8.6")
|
||||||
|
set(_arch_lovelace "8.9")
|
||||||
|
set(_arch_hopper "9.0")
|
||||||
if(NOT CMAKE_CROSSCOMPILING)
|
if(NOT CMAKE_CROSSCOMPILING)
|
||||||
list(APPEND _generations "Auto")
|
list(APPEND _generations "Auto")
|
||||||
endif()
|
endif()
|
||||||
@ -241,6 +243,10 @@ if(CUDA_FOUND)
|
|||||||
set(__cuda_arch_bin ${_arch_turing})
|
set(__cuda_arch_bin ${_arch_turing})
|
||||||
elseif(CUDA_GENERATION STREQUAL "Ampere")
|
elseif(CUDA_GENERATION STREQUAL "Ampere")
|
||||||
set(__cuda_arch_bin ${_arch_ampere})
|
set(__cuda_arch_bin ${_arch_ampere})
|
||||||
|
elseif(CUDA_GENERATION STREQUAL "Lovelace")
|
||||||
|
set(__cuda_arch_bin ${_arch_lovelace})
|
||||||
|
elseif(CUDA_GENERATION STREQUAL "Hopper")
|
||||||
|
set(__cuda_arch_bin ${_arch_hopper})
|
||||||
elseif(CUDA_GENERATION STREQUAL "Auto")
|
elseif(CUDA_GENERATION STREQUAL "Auto")
|
||||||
ocv_detect_native_cuda_arch(_nvcc_res _nvcc_out)
|
ocv_detect_native_cuda_arch(_nvcc_res _nvcc_out)
|
||||||
if(NOT _nvcc_res EQUAL 0)
|
if(NOT _nvcc_res EQUAL 0)
|
||||||
@ -286,6 +292,8 @@ if(CUDA_FOUND)
|
|||||||
${_arch_volta}
|
${_arch_volta}
|
||||||
${_arch_turing}
|
${_arch_turing}
|
||||||
${_arch_ampere}
|
${_arch_ampere}
|
||||||
|
${_arch_lovelace}
|
||||||
|
${_arch_hopper}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user