summaryrefslogtreecommitdiff
path: root/Tests/Cuda
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2020-09-20 17:11:33 +0300
committerRaul Tambre <raul@tambre.ee>2020-09-21 20:37:07 +0300
commit4fe9f534f522505f2609bac019ffcb8c6826a7b7 (patch)
treeb9f1a62b557240cce26ff57ce2b1067ebb6833ac /Tests/Cuda
parent39a5c0c82c2041a622bcdf19fa3f22abc34b9ae8 (diff)
downloadcmake-4fe9f534f522505f2609bac019ffcb8c6826a7b7.tar.gz
Tests: Don't unnecessarily set CUDA_ARCHITECTURES
Architecture 30 was removed with CUDA 11, so most of the CUDA tests fail with it. Remove setting the architecture and bump the minimum version to 3.18, so CMP0104 takes effect and we can rely on the default architecture, which is guaranteed to be compilable. Use of __ldg() in ProperLinkFlags was removed as it only affects performance and is available only on sm_35 and above. Testing the functionality of CUDA_ARCHITECTURES is already covered by CudaOnly.Architecture and CudaOnly.CompileFlags.
Diffstat (limited to 'Tests/Cuda')
-rw-r--r--Tests/Cuda/CXXStandardSetTwice/CMakeLists.txt3
-rw-r--r--Tests/Cuda/Complex/CMakeLists.txt7
-rw-r--r--Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt5
-rw-r--r--Tests/Cuda/MixedStandardLevels1/CMakeLists.txt3
-rw-r--r--Tests/Cuda/MixedStandardLevels2/CMakeLists.txt3
-rw-r--r--Tests/Cuda/MixedStandardLevels3/CMakeLists.txt4
-rw-r--r--Tests/Cuda/MixedStandardLevels4/CMakeLists.txt3
-rw-r--r--Tests/Cuda/MixedStandardLevels5/CMakeLists.txt3
-rw-r--r--Tests/Cuda/ObjectLibrary/CMakeLists.txt2
-rw-r--r--Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt3
-rw-r--r--Tests/Cuda/ProperLinkFlags/CMakeLists.txt6
-rw-r--r--Tests/Cuda/ProperLinkFlags/file1.cu1
-rw-r--r--Tests/Cuda/SharedRuntimePlusToolkit/CMakeLists.txt2
-rw-r--r--Tests/Cuda/WithC/CMakeLists.txt4
14 files changed, 16 insertions, 33 deletions
diff --git a/Tests/Cuda/CXXStandardSetTwice/CMakeLists.txt b/Tests/Cuda/CXXStandardSetTwice/CMakeLists.txt
index f4ad83a302..50338cfcd4 100644
--- a/Tests/Cuda/CXXStandardSetTwice/CMakeLists.txt
+++ b/Tests/Cuda/CXXStandardSetTwice/CMakeLists.txt
@@ -1,8 +1,7 @@
-cmake_minimum_required(VERSION 3.7)
+cmake_minimum_required(VERSION 3.18)
project(CXXStandardSetTwice CXX CUDA)
set(CMAKE_CXX_STANDARD 11)
-set(CMAKE_CUDA_ARCHITECTURES 30)
add_executable(CXXStandardSetTwice main.cu)
target_compile_features(CXXStandardSetTwice PUBLIC cxx_std_11)
diff --git a/Tests/Cuda/Complex/CMakeLists.txt b/Tests/Cuda/Complex/CMakeLists.txt
index 265bd85c1b..63defdf72b 100644
--- a/Tests/Cuda/Complex/CMakeLists.txt
+++ b/Tests/Cuda/Complex/CMakeLists.txt
@@ -1,6 +1,5 @@
-
-cmake_minimum_required(VERSION 3.7)
-project (Complex CXX CUDA)
+cmake_minimum_required(VERSION 3.18)
+project(Complex CXX CUDA)
#Goal for this example:
#build a cpp dynamic library base
@@ -14,8 +13,6 @@ project (Complex CXX CUDA)
#this tests that we can properly handle linking cuda and cpp together
#and also building cpp targets that need cuda implicit libraries
-#verify that we can pass explicit cuda arch flags
-set(CMAKE_CUDA_ARCHITECTURES 30)
set(CMAKE_CUDA_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CUDA_STANDARD_REQUIRED TRUE)
diff --git a/Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt b/Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt
index 7098a7df53..b01b9d7f0b 100644
--- a/Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt
+++ b/Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt
@@ -1,6 +1,5 @@
-
-cmake_minimum_required(VERSION 3.7)
-project (ConsumeCompileFeatures CXX CUDA)
+cmake_minimum_required(VERSION 3.18)
+project(ConsumeCompileFeatures CXX CUDA)
#Goal for this example:
#build a c++11 library that express a c++11 public compile feature
diff --git a/Tests/Cuda/MixedStandardLevels1/CMakeLists.txt b/Tests/Cuda/MixedStandardLevels1/CMakeLists.txt
index e40ffa6daa..ac2b2f5123 100644
--- a/Tests/Cuda/MixedStandardLevels1/CMakeLists.txt
+++ b/Tests/Cuda/MixedStandardLevels1/CMakeLists.txt
@@ -1,9 +1,8 @@
-cmake_minimum_required(VERSION 3.7)
+cmake_minimum_required(VERSION 3.18)
project(MixedStandardLevels1 CXX CUDA)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CUDA_STANDARD 11)
-set(CMAKE_CUDA_ARCHITECTURES 30)
add_executable(MixedStandardLevels1 main.cu lib.cpp)
diff --git a/Tests/Cuda/MixedStandardLevels2/CMakeLists.txt b/Tests/Cuda/MixedStandardLevels2/CMakeLists.txt
index 7af8081fa9..9ef734b5c3 100644
--- a/Tests/Cuda/MixedStandardLevels2/CMakeLists.txt
+++ b/Tests/Cuda/MixedStandardLevels2/CMakeLists.txt
@@ -1,8 +1,7 @@
-cmake_minimum_required(VERSION 3.7)
+cmake_minimum_required(VERSION 3.18)
project(MixedStandardLevels2 CXX CUDA)
set(CMAKE_CXX_STANDARD 17) #this can decay
-set(CMAKE_CUDA_ARCHITECTURES 30)
add_executable(MixedStandardLevels2 main.cu lib.cpp)
target_compile_features(MixedStandardLevels2 PUBLIC cuda_std_11)
diff --git a/Tests/Cuda/MixedStandardLevels3/CMakeLists.txt b/Tests/Cuda/MixedStandardLevels3/CMakeLists.txt
index 2c420030aa..629d99cf83 100644
--- a/Tests/Cuda/MixedStandardLevels3/CMakeLists.txt
+++ b/Tests/Cuda/MixedStandardLevels3/CMakeLists.txt
@@ -1,8 +1,6 @@
-cmake_minimum_required(VERSION 3.7)
+cmake_minimum_required(VERSION 3.18)
project(MixedStandardLevels3 CXX CUDA)
-set(CMAKE_CUDA_ARCHITECTURES 30)
-
add_executable(MixedStandardLevels3 main.cu lib.cpp)
target_compile_features(MixedStandardLevels3 PUBLIC cuda_std_03 cxx_std_14)
diff --git a/Tests/Cuda/MixedStandardLevels4/CMakeLists.txt b/Tests/Cuda/MixedStandardLevels4/CMakeLists.txt
index 230230d0dc..8ce57ca219 100644
--- a/Tests/Cuda/MixedStandardLevels4/CMakeLists.txt
+++ b/Tests/Cuda/MixedStandardLevels4/CMakeLists.txt
@@ -1,8 +1,7 @@
-cmake_minimum_required(VERSION 3.7)
+cmake_minimum_required(VERSION 3.18)
project(MixedStandardLevels4 CXX CUDA)
set(CMAKE_CUDA_STANDARD 03)
-set(CMAKE_CUDA_ARCHITECTURES 30)
add_executable(MixedStandardLevels4 main.cu lib.cpp)
target_compile_features(MixedStandardLevels4 PUBLIC cxx_std_14)
diff --git a/Tests/Cuda/MixedStandardLevels5/CMakeLists.txt b/Tests/Cuda/MixedStandardLevels5/CMakeLists.txt
index 5f5ee0637e..a3c355761a 100644
--- a/Tests/Cuda/MixedStandardLevels5/CMakeLists.txt
+++ b/Tests/Cuda/MixedStandardLevels5/CMakeLists.txt
@@ -1,8 +1,7 @@
-cmake_minimum_required(VERSION 3.7)
+cmake_minimum_required(VERSION 3.18)
project(MixedStandardLevels5 CXX CUDA)
set(CMAKE_CXX_STANDARD 98)
-set(CMAKE_CUDA_ARCHITECTURES 30)
add_executable(MixedStandardLevels5 main.cu lib.cpp)
diff --git a/Tests/Cuda/ObjectLibrary/CMakeLists.txt b/Tests/Cuda/ObjectLibrary/CMakeLists.txt
index 395bd3881f..d308514cba 100644
--- a/Tests/Cuda/ObjectLibrary/CMakeLists.txt
+++ b/Tests/Cuda/ObjectLibrary/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.7)
+cmake_minimum_required(VERSION 3.18)
project (ObjectLibrary CUDA CXX)
#Goal for this example:
#
diff --git a/Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt b/Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt
index fe28c3edc4..43068d9804 100644
--- a/Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt
+++ b/Tests/Cuda/ProperDeviceLibraries/CMakeLists.txt
@@ -1,8 +1,7 @@
-cmake_minimum_required(VERSION 3.13)
+cmake_minimum_required(VERSION 3.18)
project(ProperDeviceLibraries CXX CUDA)
set(CMAKE_CUDA_STANDARD 11)
-set(CMAKE_CUDA_ARCHITECTURES 35)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads)
diff --git a/Tests/Cuda/ProperLinkFlags/CMakeLists.txt b/Tests/Cuda/ProperLinkFlags/CMakeLists.txt
index d38da6d14a..862b03bf28 100644
--- a/Tests/Cuda/ProperLinkFlags/CMakeLists.txt
+++ b/Tests/Cuda/ProperLinkFlags/CMakeLists.txt
@@ -1,6 +1,5 @@
-
-cmake_minimum_required(VERSION 3.7)
-project (ProperLinkFlags CUDA CXX)
+cmake_minimum_required(VERSION 3.18)
+project(ProperLinkFlags CUDA CXX)
#Goal for this example:
#Verify that when we have CXX and CUDA enabled and we link an executable that
@@ -19,7 +18,6 @@ set(CMAKE_CXX_FLAGS "-Wall")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CUDA_STANDARD 11)
-set(CMAKE_CUDA_ARCHITECTURES 35)
add_executable(ProperLinkFlags file1.cu main.cxx)
set_target_properties( ProperLinkFlags
diff --git a/Tests/Cuda/ProperLinkFlags/file1.cu b/Tests/Cuda/ProperLinkFlags/file1.cu
index 9a105f04f2..1ce63bf98d 100644
--- a/Tests/Cuda/ProperLinkFlags/file1.cu
+++ b/Tests/Cuda/ProperLinkFlags/file1.cu
@@ -3,7 +3,6 @@
result_type __device__ file1_func(int x)
{
- __ldg(&x);
result_type r;
r.input = x;
r.sum = x * x;
diff --git a/Tests/Cuda/SharedRuntimePlusToolkit/CMakeLists.txt b/Tests/Cuda/SharedRuntimePlusToolkit/CMakeLists.txt
index 48df558565..61a3190bea 100644
--- a/Tests/Cuda/SharedRuntimePlusToolkit/CMakeLists.txt
+++ b/Tests/Cuda/SharedRuntimePlusToolkit/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.15)
+cmake_minimum_required(VERSION 3.18)
project(SharedRuntimePlusToolkit CXX)
#Goal for this example:
diff --git a/Tests/Cuda/WithC/CMakeLists.txt b/Tests/Cuda/WithC/CMakeLists.txt
index 049cbce1f9..cc5fa0c2da 100644
--- a/Tests/Cuda/WithC/CMakeLists.txt
+++ b/Tests/Cuda/WithC/CMakeLists.txt
@@ -1,8 +1,6 @@
-cmake_minimum_required(VERSION 3.7)
+cmake_minimum_required(VERSION 3.18)
project(WithC CUDA C)
-set(CMAKE_CUDA_ARCHITECTURES 30)
-
add_executable(CudaWithC main.c cuda.cu)
if(APPLE)