diff --git a/cmake/flags.cmake b/cmake/flags.cmake index e05cd52f473388d972cb4d88aa35b5270e4c3f52..5c386d442e6fd82fedd2bd0c2df3b8a8b91c97e9 100644 --- a/cmake/flags.cmake +++ b/cmake/flags.cmake @@ -76,7 +76,7 @@ endforeach() function(specify_cuda_arch cuda_version cuda_arch) if(${cuda_version} VERSION_GREATER "8.0") - foreach(capability 60 61 62) + foreach(capability 61 62) if(${cuda_arch} STREQUAL ${capability}) list(APPEND __arch_flags " -gencode arch=compute_${cuda_arch},code=sm_${cuda_arch}") endif() @@ -90,12 +90,17 @@ function(specify_cuda_arch cuda_version cuda_arch) endif() endfunction() -# Common cuda architectures +# Common gpu architectures: Kepler, Maxwell foreach(capability 30 35 50) list(APPEND __arch_flags " -gencode arch=compute_${capability},code=sm_${capability}") endforeach() -# Custom cuda architecture +# Modern gpu architectures: Pascal +if (CUDA_VERSION VERSION_GREATER "8.0") + list(APPEND __arch_flags " -gencode arch=compute_60,code=sm_60") +endif() + +# Custom gpu architecture set(CUDA_ARCH) if(CUDA_ARCH)