Fixed Cmake for CUDA CC 7.0, 7.2, 7.5

This commit is contained in:
AlexeyAB 2020-04-30 02:20:42 +03:00
parent 36c73c5b9e
commit f14054ec2b
1 changed files with 2 additions and 2 deletions

View File

@ -65,9 +65,9 @@ else()
else()
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)
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)
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.5)")
message(STATUS "Your setup does not supports half precision (it requires CC >= 7.0)")
endif()
endif()
else()