summaryrefslogtreecommitdiffstats
path: root/Tests/Cuda
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2020-09-23 18:29:21 (GMT)
committerRaul Tambre <raul@tambre.ee>2020-09-23 18:29:21 (GMT)
commit1cd4a37c12a96c9d46f1211684d39f9455346817 (patch)
treea44ae3d240d8a01b3c3ec7889632a9fd1e6ba9c2 /Tests/Cuda
parentd827fdb6f99e58e4dfc6fdda3816ed2862e00a95 (diff)
downloadCMake-1cd4a37c12a96c9d46f1211684d39f9455346817.zip
CMake-1cd4a37c12a96c9d46f1211684d39f9455346817.tar.gz
CMake-1cd4a37c12a96c9d46f1211684d39f9455346817.tar.bz2
Tests: Use sm_35 in Cuda.ProperDeviceLibraries for CUDA <10.0
Using the cublas device libraries seems to require at least sm_35. Set the architecture explicitly to sm_35 for old CUDA versions, which still have the cublas device library.
Diffstat (limited to 'Tests/Cuda')
-rw-r--r--Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt b/Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt
index 43068d9..1ef77f4 100644
--- a/Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt
+++ b/Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt
@@ -6,6 +6,11 @@ set(CMAKE_CUDA_STANDARD 11)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads)
+if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 10.0.0)
+ # cublas_device requires at least sm_35.
+ set(CMAKE_CUDA_ARCHITECTURES 35)
+endif()
+
add_executable(ProperDeviceLibraries main.cu)
set_target_properties(ProperDeviceLibraries
PROPERTIES CUDA_SEPARABLE_COMPILATION ON)