diff options
author | Raul Tambre <raul@tambre.ee> | 2020-09-20 14:11:33 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2020-09-21 17:37:07 (GMT) |
commit | 4fe9f534f522505f2609bac019ffcb8c6826a7b7 (patch) | |
tree | b9f1a62b557240cce26ff57ce2b1067ebb6833ac /Tests/CudaOnly | |
parent | 39a5c0c82c2041a622bcdf19fa3f22abc34b9ae8 (diff) | |
download | CMake-4fe9f534f522505f2609bac019ffcb8c6826a7b7.zip CMake-4fe9f534f522505f2609bac019ffcb8c6826a7b7.tar.gz CMake-4fe9f534f522505f2609bac019ffcb8c6826a7b7.tar.bz2 |
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/CudaOnly')
-rw-r--r-- | Tests/CudaOnly/CircularLinkLine/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Tests/CudaOnly/GPUDebugFlag/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/CudaOnly/RuntimeControls/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/CudaOnly/SeparateCompilation/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/CudaOnly/Standard98/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/CudaOnly/StaticRuntimePlusToolkit/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/CudaOnly/WithDefs/CMakeLists.txt | 7 |
9 files changed, 14 insertions, 28 deletions
diff --git a/Tests/CudaOnly/CircularLinkLine/CMakeLists.txt b/Tests/CudaOnly/CircularLinkLine/CMakeLists.txt index e10a348..caf9391 100644 --- a/Tests/CudaOnly/CircularLinkLine/CMakeLists.txt +++ b/Tests/CudaOnly/CircularLinkLine/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.7) -project (CircularLinkLine CUDA) +cmake_minimum_required(VERSION 3.18) +project(CircularLinkLine CUDA) #Goal for this example: # Verify that we de-duplicate the device link line @@ -7,7 +7,6 @@ project (CircularLinkLine CUDA) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CUDA_STANDARD 11) -set(CMAKE_CUDA_ARCHITECTURES 30) add_library(CUDACircularDeviceLinking1 STATIC file1.cu) add_library(CUDACircularDeviceLinking2 STATIC file2.cu) diff --git a/Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt b/Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt index 1265660..c8e8ebc 100644 --- a/Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt +++ b/Tests/CudaOnly/DontResolveDeviceSymbols/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.13) -project (DontResolveDeviceSymbols CUDA) +cmake_minimum_required(VERSION 3.18) +project(DontResolveDeviceSymbols CUDA) # Find nm and dumpbin if(CMAKE_NM) @@ -26,7 +26,6 @@ endif() # Verify that we can't use those device symbols from anything set(CMAKE_CXX_STANDARD 11) set(CMAKE_CUDA_STANDARD 11) -set(CMAKE_CUDA_ARCHITECTURES 30 50) set(CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS OFF) add_library(CUDANoDeviceResolve SHARED file1.cu) diff --git a/Tests/CudaOnly/GPUDebugFlag/CMakeLists.txt b/Tests/CudaOnly/GPUDebugFlag/CMakeLists.txt index 6675655..e9c0c1b 100644 --- a/Tests/CudaOnly/GPUDebugFlag/CMakeLists.txt +++ b/Tests/CudaOnly/GPUDebugFlag/CMakeLists.txt @@ -1,9 +1,7 @@ - -cmake_minimum_required(VERSION 3.7) -project (GPUDebugFlag CUDA) +cmake_minimum_required(VERSION 3.18) +project(GPUDebugFlag CUDA) set(CMAKE_CUDA_STANDARD 11) -set(CMAKE_CUDA_ARCHITECTURES 30) # Goal for this example: # Verify that enabling device debug works. diff --git a/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt b/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt index bd94ec8..a44b2f2 100644 --- a/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt +++ b/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.7) +cmake_minimum_required(VERSION 3.18) project (ResolveDeviceSymbols CUDA) # Find nm and dumpbin @@ -21,8 +21,6 @@ endif() # confirming that the first static library is on the device link line # 3. Verify that we can't use those device symbols from anything that links # to the static library -set(CMAKE_CUDA_ARCHITECTURES 30 50) - add_library(CUDAResolveDeviceDepsA STATIC file1.cu) add_library(CUDAResolveDeviceDepsB STATIC file2.cu) target_compile_features(CUDAResolveDeviceDepsA PUBLIC cuda_std_11) diff --git a/Tests/CudaOnly/RuntimeControls/CMakeLists.txt b/Tests/CudaOnly/RuntimeControls/CMakeLists.txt index 0da5739..b3b2210 100644 --- a/Tests/CudaOnly/RuntimeControls/CMakeLists.txt +++ b/Tests/CudaOnly/RuntimeControls/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.7) +cmake_minimum_required(VERSION 3.18) project (RuntimeControls CUDA) # Find nm and dumpbin @@ -16,7 +16,6 @@ else() endif() set(CMAKE_CUDA_STANDARD 11) -set(CMAKE_CUDA_ARCHITECTURES 30) set(CMAKE_CUDA_RUNTIME_LIBRARY static) if(NOT "x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC") diff --git a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt index 586be81..864ecbf 100644 --- a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt +++ b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt @@ -1,6 +1,5 @@ - -cmake_minimum_required(VERSION 3.7) -project (SeparateCompilation CUDA) +cmake_minimum_required(VERSION 3.18) +project(SeparateCompilation CUDA) #Goal for this example: #Build a static library that defines multiple methods and kernels that @@ -9,7 +8,6 @@ project (SeparateCompilation CUDA) #and executables. #We complicate the matter by also testing that multiple static libraries #all containing cuda separable compilation code links properly -set(CMAKE_CUDA_ARCHITECTURES 30 35 50 52) set(CMAKE_CUDA_SEPARABLE_COMPILATION ON) add_library(CUDASeparateLibA STATIC file1.cu file2.cu file3.cu) target_compile_features(CUDASeparateLibA PRIVATE cuda_std_11) diff --git a/Tests/CudaOnly/Standard98/CMakeLists.txt b/Tests/CudaOnly/Standard98/CMakeLists.txt index 3ba0360..6823352 100644 --- a/Tests/CudaOnly/Standard98/CMakeLists.txt +++ b/Tests/CudaOnly/Standard98/CMakeLists.txt @@ -1,8 +1,6 @@ -cmake_minimum_required(VERSION 3.7) +cmake_minimum_required(VERSION 3.18) project(CudaOnlyStandard98 CUDA) -set(CMAKE_CUDA_ARCHITECTURES 30) - # Support setting CUDA Standard to 98 which internally gets transformed to # CUDA03 set(CMAKE_CUDA_STANDARD 98) diff --git a/Tests/CudaOnly/StaticRuntimePlusToolkit/CMakeLists.txt b/Tests/CudaOnly/StaticRuntimePlusToolkit/CMakeLists.txt index 708a352..534bab2 100644 --- a/Tests/CudaOnly/StaticRuntimePlusToolkit/CMakeLists.txt +++ b/Tests/CudaOnly/StaticRuntimePlusToolkit/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.18) project(StaticRuntimePlusToolkit CUDA) #Goal for this example: diff --git a/Tests/CudaOnly/WithDefs/CMakeLists.txt b/Tests/CudaOnly/WithDefs/CMakeLists.txt index 0ed81d8..02f043f 100644 --- a/Tests/CudaOnly/WithDefs/CMakeLists.txt +++ b/Tests/CudaOnly/WithDefs/CMakeLists.txt @@ -1,9 +1,6 @@ +cmake_minimum_required(VERSION 3.18) +project(WithDefs CUDA) -cmake_minimum_required(VERSION 3.7) -project (WithDefs CUDA) - -#verify that we can pass explicit cuda arch flags -set(CMAKE_CUDA_ARCHITECTURES 30) set(release_compile_defs DEFREL) #Goal for this example: |