Skip to content

Commit

Permalink
fix jetson arch when compiling with single arch (PaddlePaddle#33269)
Browse files Browse the repository at this point in the history
  • Loading branch information
cryoco committed Jun 7, 2021
1 parent ac0289d commit 759b42c
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions cmake/cuda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,23 @@ function(select_nvcc_arch_flags out_variable)
if(${CUDA_ARCH_NAME} STREQUAL "Kepler")
set(cuda_arch_bin "30 35")
elseif(${CUDA_ARCH_NAME} STREQUAL "Maxwell")
set(cuda_arch_bin "50")
if (WITH_NV_JETSON)
set(cuda_arch_bin "53")
else()
set(cuda_arch_bin "50")
endif()
elseif(${CUDA_ARCH_NAME} STREQUAL "Pascal")
set(cuda_arch_bin "60 61")
if (WITH_NV_JETSON)
set(cuda_arch_bin "62")
else()
set(cuda_arch_bin "60 61")
endif()
elseif(${CUDA_ARCH_NAME} STREQUAL "Volta")
set(cuda_arch_bin "70")
if (WITH_NV_JETSON)
set(cuda_arch_bin "72")
else()
set(cuda_arch_bin "70")
endif()
elseif(${CUDA_ARCH_NAME} STREQUAL "Turing")
set(cuda_arch_bin "75")
elseif(${CUDA_ARCH_NAME} STREQUAL "Ampere")
Expand Down

0 comments on commit 759b42c

Please sign in to comment.