mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
Merge pull request #6896 from jet47:cuda-arch-update
This commit is contained in:
commit
e871045b46
@ -43,7 +43,7 @@ if(CUDA_FOUND)
|
|||||||
|
|
||||||
message(STATUS "CUDA detected: " ${CUDA_VERSION})
|
message(STATUS "CUDA detected: " ${CUDA_VERSION})
|
||||||
|
|
||||||
set(_generations "Fermi" "Kepler")
|
set(_generations "Fermi" "Kepler" "Maxwell" "Pascal")
|
||||||
if(NOT CMAKE_CROSSCOMPILING)
|
if(NOT CMAKE_CROSSCOMPILING)
|
||||||
list(APPEND _generations "Auto")
|
list(APPEND _generations "Auto")
|
||||||
endif()
|
endif()
|
||||||
@ -63,13 +63,13 @@ if(CUDA_FOUND)
|
|||||||
|
|
||||||
set(__cuda_arch_ptx "")
|
set(__cuda_arch_ptx "")
|
||||||
if(CUDA_GENERATION STREQUAL "Fermi")
|
if(CUDA_GENERATION STREQUAL "Fermi")
|
||||||
set(__cuda_arch_bin "2.0 2.1(2.0)")
|
set(__cuda_arch_bin "2.0")
|
||||||
elseif(CUDA_GENERATION STREQUAL "Kepler")
|
elseif(CUDA_GENERATION STREQUAL "Kepler")
|
||||||
if(${CUDA_VERSION} VERSION_LESS "5.0")
|
set(__cuda_arch_bin "3.0 3.5")
|
||||||
set(__cuda_arch_bin "3.0")
|
elseif(CUDA_GENERATION STREQUAL "Maxwell")
|
||||||
else()
|
set(__cuda_arch_bin "5.0")
|
||||||
set(__cuda_arch_bin "3.0 3.5")
|
elseif(CUDA_GENERATION STREQUAL "Pascal")
|
||||||
endif()
|
set(__cuda_arch_bin "6.0")
|
||||||
elseif(CUDA_GENERATION STREQUAL "Auto")
|
elseif(CUDA_GENERATION STREQUAL "Auto")
|
||||||
execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
|
execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
|
||||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
|
||||||
@ -91,14 +91,12 @@ if(CUDA_FOUND)
|
|||||||
set(__cuda_arch_bin "5.3")
|
set(__cuda_arch_bin "5.3")
|
||||||
set(__cuda_arch_ptx "")
|
set(__cuda_arch_ptx "")
|
||||||
else()
|
else()
|
||||||
if(${CUDA_VERSION} VERSION_LESS "5.0")
|
if(${CUDA_VERSION} VERSION_LESS "8.0")
|
||||||
set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0")
|
set(__cuda_arch_bin "2.0 3.0 3.5 5.0")
|
||||||
elseif(${CUDA_VERSION} VERSION_GREATER "6.5")
|
|
||||||
set(__cuda_arch_bin "2.0 2.1(2.0) 3.0 3.5")
|
|
||||||
else()
|
else()
|
||||||
set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5")
|
set(__cuda_arch_bin "2.0 3.0 3.5 5.0 6.0")
|
||||||
endif()
|
endif()
|
||||||
set(__cuda_arch_ptx "3.0")
|
set(__cuda_arch_ptx "")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
set(MIN_VER_CMAKE 2.8.7)
|
set(MIN_VER_CMAKE 2.8.7)
|
||||||
set(MIN_VER_CUDA 4.2)
|
set(MIN_VER_CUDA 6.5)
|
||||||
set(MIN_VER_PYTHON2 2.6)
|
set(MIN_VER_PYTHON2 2.6)
|
||||||
set(MIN_VER_PYTHON3 3.2)
|
set(MIN_VER_PYTHON3 3.2)
|
||||||
set(MIN_VER_ZLIB 1.2.3)
|
set(MIN_VER_ZLIB 1.2.3)
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
# define NPP_VERSION (NPP_VERSION_MAJOR * 1000 + NPP_VERSION_MINOR * 100 + NPP_VERSION_BUILD)
|
# define NPP_VERSION (NPP_VERSION_MAJOR * 1000 + NPP_VERSION_MINOR * 100 + NPP_VERSION_BUILD)
|
||||||
|
|
||||||
# define CUDART_MINIMUM_REQUIRED_VERSION 4020
|
# define CUDART_MINIMUM_REQUIRED_VERSION 6050
|
||||||
|
|
||||||
# if (CUDART_VERSION < CUDART_MINIMUM_REQUIRED_VERSION)
|
# if (CUDART_VERSION < CUDART_MINIMUM_REQUIRED_VERSION)
|
||||||
# error "Insufficient Cuda Runtime library version, please update it."
|
# error "Insufficient Cuda Runtime library version, please update it."
|
||||||
|
Loading…
Reference in New Issue
Block a user