Skip to content

Commit

Permalink
Fixed Makefile and CMakeLists.txt for RTX 3090
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyAB committed Dec 1, 2020
1 parent 80e1da2 commit e87042a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ include(CheckLanguage)
check_language(CUDA)
if(CMAKE_CUDA_COMPILER AND ENABLE_CUDA)
set(CUDA_ARCHITECTURES "Auto" CACHE STRING "\"Auto\" detects local machine GPU compute arch at runtime, \"Common\" and \"All\" cover common and entire subsets of architectures, \"Names\" is a list of architectures to enable by name, \"Numbers\" is a list of compute capabilities (version number) to enable")
set_property(CACHE CUDA_ARCHITECTURES PROPERTY STRINGS "Auto" "Common" "All" "Kepler Maxwell Kepler+Tegra Maxwell+Tegra Pascal" "5.0 7.5")
set_property(CACHE CUDA_ARCHITECTURES PROPERTY STRINGS "Auto" "Common" "All" "Kepler Maxwell Kepler+Tegra Maxwell+Tegra Pascal" "5.0 7.5 8.6")
enable_language(CUDA)
if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS "9.0")
message(STATUS "Unsupported CUDA version, please upgrade to CUDA 9+. Disabling CUDA support")
Expand All @@ -71,7 +71,7 @@ if(CMAKE_CUDA_COMPILER AND ENABLE_CUDA)
find_package(CUDA REQUIRED)
cuda_select_nvcc_arch_flags(CUDA_ARCH_FLAGS ${CUDA_ARCHITECTURES})
message(STATUS "Building with CUDA flags: " "${CUDA_ARCH_FLAGS}")
if (NOT "arch=compute_70,code=sm_70" IN_LIST CUDA_ARCH_FLAGS AND NOT "arch=compute_72,code=sm_72" IN_LIST CUDA_ARCH_FLAGS AND NOT "arch=compute_75,code=sm_75" IN_LIST CUDA_ARCH_FLAGS AND NOT "arch=compute_80,code=sm_80" IN_LIST CUDA_ARCH_FLAGS)
if (NOT "arch=compute_70,code=sm_70" IN_LIST CUDA_ARCH_FLAGS AND NOT "arch=compute_72,code=sm_72" IN_LIST CUDA_ARCH_FLAGS AND NOT "arch=compute_75,code=sm_75" IN_LIST CUDA_ARCH_FLAGS AND NOT "arch=compute_80,code=sm_80" IN_LIST CUDA_ARCH_FLAGS AND NOT "arch=compute_86,code=sm_86" IN_LIST CUDA_ARCH_FLAGS)
set(ENABLE_CUDNN_HALF "FALSE" CACHE BOOL "Enable CUDNN Half precision" FORCE)
message(STATUS "Your setup does not supports half precision (it requires CC >= 7.0)")
else()
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ ZED_CAMERA_v2_8=0
USE_CPP=0
DEBUG=0

ARCH= -gencode arch=compute_30,code=sm_30 \
-gencode arch=compute_35,code=sm_35 \
ARCH= -gencode arch=compute_35,code=sm_35 \
-gencode arch=compute_50,code=[sm_50,compute_50] \
-gencode arch=compute_52,code=[sm_52,compute_52] \
-gencode arch=compute_61,code=[sm_61,compute_61]
-gencode arch=compute_61,code=[sm_61,compute_61] \
-gencode arch=compute_86,code=[sm_86,compute_86]

OS := $(shell uname)

# Kepler GeForce GTX 770, GTX 760, GT 740
# ARCH= -gencode arch=compute_30,code=sm_30

# Tesla A100 (GA100), DGX-A100, RTX 3080
# ARCH= -gencode arch=compute_80,code=[sm_80,compute_80]

Expand Down

0 comments on commit e87042a

Please sign in to comment.