From c3b0b68005ddec4f6c8ea0cb3deff6732bd34f1a Mon Sep 17 00:00:00 2001 From: JingZhuangzhuang <75348594+JZZ-NOTE@users.noreply.github.com> Date: Thu, 21 Apr 2022 13:35:35 +0800 Subject: [PATCH] update ampere sm (#42023) * update ampere sm * update ampere sm * update ampere sm --- cmake/cuda.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/cuda.cmake b/cmake/cuda.cmake index 75f4f192444..4894d615c2a 100644 --- a/cmake/cuda.cmake +++ b/cmake/cuda.cmake @@ -132,7 +132,11 @@ function(select_nvcc_arch_flags out_variable) elseif(${CUDA_ARCH_NAME} STREQUAL "Turing") set(cuda_arch_bin "75") elseif(${CUDA_ARCH_NAME} STREQUAL "Ampere") - set(cuda_arch_bin "80") + if (${CMAKE_CUDA_COMPILER_VERSION} LESS 11.1) # CUDA 11.0 + set(cuda_arch_bin "80") + elseif (${CMAKE_CUDA_COMPILER_VERSION} LESS 12.0) # CUDA 11.1+ + set(cuda_arch_bin "80 86") + endif() elseif(${CUDA_ARCH_NAME} STREQUAL "All") set(cuda_arch_bin ${paddle_known_gpu_archs}) elseif(${CUDA_ARCH_NAME} STREQUAL "Auto") -- GitLab