From b5fdd1752b17d0177a57a7f552f26b3dacb4e344 Mon Sep 17 00:00:00 2001 From: Yuanle Liu Date: Tue, 27 Dec 2022 21:25:27 +0800 Subject: [PATCH] update jetson ampere sm (#49364) --- cmake/cuda.cmake | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cmake/cuda.cmake b/cmake/cuda.cmake index 63dbd0e9db4..ab48a16529e 100644 --- a/cmake/cuda.cmake +++ b/cmake/cuda.cmake @@ -6,7 +6,7 @@ if(WITH_NV_JETSON) add_definitions(-DWITH_NV_JETSON) set(paddle_known_gpu_archs "53 62 72") set(paddle_known_gpu_archs10 "53 62 72") - set(paddle_known_gpu_archs11 "53 62 72") + set(paddle_known_gpu_archs11 "53 62 72 87") elseif(NEW_RELEASE_ALL) message("Using New Release Strategy - All Arches Packge") add_definitions(-DNEW_RELEASE_ALL) @@ -166,10 +166,14 @@ function(select_nvcc_arch_flags out_variable) elseif(${CUDA_ARCH_NAME} STREQUAL "Turing") set(cuda_arch_bin "75") elseif(${CUDA_ARCH_NAME} STREQUAL "Ampere") - 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") + if(WITH_NV_JETSON) + set(cuda_arch_bin "87") + else() + 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() endif() elseif(${CUDA_ARCH_NAME} STREQUAL "All") set(cuda_arch_bin ${paddle_known_gpu_archs}) -- GitLab