Skip to content

Commit 209444a

Browse files
authored
Merge pull request #4317 from larshg/UpdateRquiredCuda
2 parents 3e3671e + 7eb8b54 commit 209444a

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

cmake/pcl_find_cuda.cmake

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if(MSVC)
66
endif()
77

88
set(CUDA_FIND_QUIETLY TRUE)
9-
find_package(CUDA 7.5)
9+
find_package(CUDA 9.0)
1010

1111
if(CUDA_FOUND)
1212
message(STATUS "Found CUDA Toolkit v${CUDA_VERSION_STRING}")
@@ -23,17 +23,19 @@ if(CUDA_FOUND)
2323
# To add support of older GPU for kinfu, I would embed PTX 11 and 12 into so-file. GPU with sm_13 will run PTX 12 code (no difference for kinfu)
2424

2525
# Find a complete list for CUDA compute capabilities at http://developer.nvidia.com/cuda-gpus
26-
27-
if(NOT ${CUDA_VERSION_STRING} VERSION_LESS "10.0")
26+
27+
# For a list showing CUDA toolkit version support for compute capabilities see: https://en.wikipedia.org/wiki/CUDA
28+
# or the nvidia release notes ie:
29+
# https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#cuda-general-new-features
30+
# or
31+
# https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#deprecated-features
32+
33+
if(NOT ${CUDA_VERSION_STRING} VERSION_LESS "11.0")
34+
set(__cuda_arch_bin "5.2 5.3 6.0 6.1 7.0 7.2 7.5")
35+
elseif(NOT ${CUDA_VERSION_STRING} VERSION_LESS "10.0")
2836
set(__cuda_arch_bin "3.0 3.5 5.0 5.2 5.3 6.0 6.1 7.0 7.2 7.5")
29-
elseif(NOT ${CUDA_VERSION_STRING} VERSION_LESS "9.1")
30-
set(__cuda_arch_bin "3.0 3.5 5.0 5.2 5.3 6.0 6.1 7.0 7.2")
3137
elseif(NOT ${CUDA_VERSION_STRING} VERSION_LESS "9.0")
32-
set(__cuda_arch_bin "3.0 3.5 5.0 5.2 5.3 6.0 6.1 7.0")
33-
elseif(NOT ${CUDA_VERSION_STRING} VERSION_LESS "8.0")
34-
set(__cuda_arch_bin "2.0 2.1(2.0) 3.0 3.5 5.0 5.2 5.3 6.0 6.1")
35-
else()
36-
set(__cuda_arch_bin "2.0 2.1(2.0) 3.0 3.5 5.0 5.2")
38+
set(__cuda_arch_bin "3.0 3.5 5.0 5.2 5.3 6.0 6.1 7.0 7.2")
3739
endif()
3840

3941
set(CUDA_ARCH_BIN ${__cuda_arch_bin} CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported")

0 commit comments

Comments
 (0)