From 19dc5672bf8b5d1857723e826366d036b6c68f6a Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Thu, 10 Mar 2016 16:28:54 -0500 Subject: [PATCH] Correct CUDA fallback to "fermi" when trying to do auto detection. The logic would properly fall to fermi, but not set the proper NVCC flags to actually compile targeting the fermi compute architecture. --- CMake/UseVTKmCUDA.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMake/UseVTKmCUDA.cmake b/CMake/UseVTKmCUDA.cmake index bdac2d0ea..d3efefdaa 100644 --- a/CMake/UseVTKmCUDA.cmake +++ b/CMake/UseVTKmCUDA.cmake @@ -107,8 +107,11 @@ if (VTKm_Base_FOUND) "Falling back to fermi, please manually specify if you want something else.") set(VTKm_CUDA_Architecture "fermi") endif() + endif() - elseif(VTKm_CUDA_Architecture STREQUAL "fermi") + #since when we are native we can fail, and fall back to "fermi" these have + #to happen after, and separately of the native check + if(VTKm_CUDA_Architecture STREQUAL "fermi") set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} --generate-code arch=compute_20,code=compute_20") elseif(VTKm_CUDA_Architecture STREQUAL "kepler") set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} --generate-code arch=compute_30,code=compute_30")