Restore --arch line removed during debugging

This commit is contained in:
Richard Berger 2020-04-10 14:25:46 -04:00
parent 195e453d17
commit 4f8a1583b9
1 changed files with 3 additions and 2 deletions

View File

@ -214,8 +214,9 @@ elseif(GPU_API STREQUAL "HIP")
find_package(CUDA REQUIRED)
set(HIP_ARCH "sm_30" CACHE STRING "HIP primary CUDA architecture (e.g. sm_60)")
# build gencode commands for nvcc based on CUDA toolkit version and use choice
set(HIP_CUDA_GENCODE "")
# build arch/gencode commands for nvcc based on CUDA toolkit version and use choice
# --arch translates directly instead of JIT, so this should be for the preferred or most common architecture
set(HIP_CUDA_GENCODE "-arch=${HIP_ARCH} ")
# Fermi (GPU Arch 2.x) is supported by CUDA 3.2 to CUDA 8.0
if((CUDA_VERSION VERSION_GREATER "3.1") AND (CUDA_VERSION VERSION_LESS "9.0"))
string(APPEND HIP_CUDA_GENCODE "-gencode arch=compute_20,code=[sm_20,compute_20] ")