Skip to content
Snippets Groups Projects
Commit 79f2e82a authored by Markus Rampp's avatar Markus Rampp
Browse files

modify CMakeLists.txt to support new CUDA sdk versions and compute capabilities

* add compilation support for P100 and GTX1080 GPUs (cuda/8.0, compute_6x)
* introduce conditional for handling list of CUDA compute architectures depending on CUDA sdk version
parent ef9dbe44
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -71,12 +71,20 @@ if (CUDA_FOUND)
endif()
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};--use_fast_math;-ftz=true;-O4;-Xptxas -O4")
# list(APPEND CUDA_NVCC_FLAGS "-gencode=arch=compute_13,code=sm_13")
list(APPEND CUDA_NVCC_FLAGS "-gencode=arch=compute_20,code=sm_20")
list(APPEND CUDA_NVCC_FLAGS "-gencode=arch=compute_20,code=sm_21")
if (${CUDA_VERSION} LESS 7.0)
list(APPEND CUDA_NVCC_FLAGS "-gencode=arch=compute_13,code=sm_13")
endif()
if (${CUDA_VERSION} LESS 8.5)
list(APPEND CUDA_NVCC_FLAGS "-gencode=arch=compute_20,code=[sm_20,sm_21]")
endif()
list(APPEND CUDA_NVCC_FLAGS "-gencode=arch=compute_30,code=sm_30")
list(APPEND CUDA_NVCC_FLAGS "-gencode=arch=compute_35,code=sm_35")
list(APPEND CUDA_NVCC_FLAGS "-gencode=arch=compute_52,code=sm_52")
if (NOT (${CUDA_VERSION} LESS 7.5))
list(APPEND CUDA_NVCC_FLAGS "-gencode=arch=compute_52,code=sm_52")
endif()
if (NOT (${CUDA_VERSION} LESS 8.0))
list(APPEND CUDA_NVCC_FLAGS "-gencode=arch=compute_60,code=[sm_60,sm_61]")
endif()
add_definitions(-DWITH_CUDA)
set (BIOEM_CUDA_STATUS "Found")
endif()
......@@ -160,6 +168,7 @@ message(STATUS "CUDA: ${BIOEM_CUDA_STATUS}")
message(STATUS "OpenMP: ${BIOEM_OPENMP_STATUS}")
message(STATUS "MPI: ${BIOEM_MPI_STATUS}")
if (PRINT_CMAKE_VARIABLES)
get_cmake_property(_variableNames VARIABLES)
foreach (_variableName ${_variableNames})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment