Skip to content

Commit

Permalink
update jetson ampere sm (#49364)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanlehome authored Dec 27, 2022
1 parent 39eb77a commit b5fdd17
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions cmake/cuda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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})
Expand Down

0 comments on commit b5fdd17

Please sign in to comment.