Skip to content

Commit

Permalink
Drop C++11 and C++14 support for all of cccl (NVIDIA#3417)
Browse files Browse the repository at this point in the history
* Drop C++11 and C++14 support for all of cccl

---------

Co-authored-by: Bernhard Manfred Gruber <[email protected]>
  • Loading branch information
2 people authored and davebayer committed Jan 22, 2025
1 parent ceaebaf commit 1924668
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 142 deletions.
106 changes: 0 additions & 106 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@
"CUB_ENABLE_DIALECT_CPP20": true,
"THRUST_ENABLE_MULTICONFIG": true,
"THRUST_MULTICONFIG_WORKLOAD": "LARGE",
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP11": true,
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP14": true,
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP17": true,
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP20": true,
"THRUST_MULTICONFIG_ENABLE_SYSTEM_CPP": true,
Expand Down Expand Up @@ -128,28 +126,6 @@
"LIBCUDACXX_ENABLE_LIBCUDACXX_TESTS": true
}
},
{
"name": "libcudacxx-cpp11",
"displayName": "libcu++: C++11",
"inherits": "libcudacxx-base",
"cacheVariables": {
"CMAKE_CXX_STANDARD": "11",
"CMAKE_CUDA_STANDARD": "11",
"LIBCUDACXX_TEST_STANDARD_VER": "c++11",
"CCCL_IGNORE_DEPRECATED_CPP_11": true
}
},
{
"name": "libcudacxx-cpp14",
"displayName": "libcu++: C++14",
"inherits": "libcudacxx-base",
"cacheVariables": {
"CMAKE_CXX_STANDARD": "14",
"CMAKE_CUDA_STANDARD": "14",
"LIBCUDACXX_TEST_STANDARD_VER": "c++14",
"CCCL_IGNORE_DEPRECATED_CPP_14": true
}
},
{
"name": "libcudacxx-cpp17",
"displayName": "libcu++: C++17",
Expand Down Expand Up @@ -179,28 +155,6 @@
"CMAKE_CUDA_ARCHITECTURES": "70"
}
},
{
"name": "libcudacxx-nvrtc-cpp11",
"displayName": "libcu++ NVRTC: C++11",
"inherits": "libcudacxx-nvrtc-base",
"cacheVariables": {
"CMAKE_CXX_STANDARD": "11",
"CMAKE_CUDA_STANDARD": "11",
"LIBCUDACXX_TEST_STANDARD_VER": "c++11",
"CCCL_IGNORE_DEPRECATED_CPP_11": true
}
},
{
"name": "libcudacxx-nvrtc-cpp14",
"displayName": "libcu++ NVRTC: C++14",
"inherits": "libcudacxx-nvrtc-base",
"cacheVariables": {
"CMAKE_CXX_STANDARD": "14",
"CMAKE_CUDA_STANDARD": "14",
"LIBCUDACXX_TEST_STANDARD_VER": "c++14",
"CCCL_IGNORE_DEPRECATED_CPP_14": true
}
},
{
"name": "libcudacxx-nvrtc-cpp17",
"displayName": "libcu++ NVRTC: C++17",
Expand Down Expand Up @@ -261,8 +215,6 @@
"THRUST_MULTICONFIG_ENABLE_SYSTEM_CUDA": true,
"THRUST_MULTICONFIG_ENABLE_SYSTEM_OMP": true,
"THRUST_MULTICONFIG_ENABLE_SYSTEM_TBB": true,
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP11": false,
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP14": false,
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP17": false,
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP20": false
}
Expand Down Expand Up @@ -420,22 +372,6 @@
"libcudacxx.test.atomics.ptx"
]
},
{
"name": "libcudacxx-nvrtc-cpp11",
"hidden": false,
"inherits": [
"libcudacxx-nvrtcc"
],
"configurePreset": "libcudacxx-nvrtc-cpp11"
},
{
"name": "libcudacxx-nvrtc-cpp14",
"hidden": false,
"inherits": [
"libcudacxx-nvrtcc"
],
"configurePreset": "libcudacxx-nvrtc-cpp14"
},
{
"name": "libcudacxx-nvrtc-cpp17",
"hidden": false,
Expand All @@ -452,20 +388,6 @@
],
"configurePreset": "libcudacxx-nvrtc-cpp20"
},
{
"name": "libcudacxx-cpp11",
"configurePreset": "libcudacxx-cpp11",
"inherits": [
"libcudacxx-base"
]
},
{
"name": "libcudacxx-cpp14",
"configurePreset": "libcudacxx-cpp14",
"inherits": [
"libcudacxx-base"
]
},
{
"name": "libcudacxx-cpp17",
"configurePreset": "libcudacxx-cpp17",
Expand Down Expand Up @@ -572,20 +494,6 @@
"outputOnFailure": false
}
},
{
"name": "libcudacxx-lit-cpp11",
"configurePreset": "libcudacxx-cpp11",
"inherits": [
"libcudacxx-lit-base"
]
},
{
"name": "libcudacxx-lit-cpp14",
"configurePreset": "libcudacxx-cpp14",
"inherits": [
"libcudacxx-lit-base"
]
},
{
"name": "libcudacxx-lit-cpp17",
"configurePreset": "libcudacxx-cpp17",
Expand All @@ -607,20 +515,6 @@
"libcudacxx-lit-base"
]
},
{
"name": "libcudacxx-nvrtc-cpp11",
"configurePreset": "libcudacxx-nvrtc-cpp11",
"inherits": [
"libcudacxx-nvrtc-base"
]
},
{
"name": "libcudacxx-nvrtc-cpp14",
"configurePreset": "libcudacxx-nvrtc-cpp14",
"inherits": [
"libcudacxx-nvrtc-base"
]
},
{
"name": "libcudacxx-nvrtc-cpp17",
"configurePreset": "libcudacxx-nvrtc-cpp17",
Expand Down
57 changes: 28 additions & 29 deletions ci/matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ workflows:
# Old CTK/compiler
- {jobs: ['build'], std: 'minmax', ctk: '12.0', cxx: ['gcc7', 'gcc9', 'clang14', 'msvc2019']}
# Current CTK build-only
- {jobs: ['build'], std: [11, 14], cxx: ['gcc7', 'clang14'], project: 'libcudacxx'}
- {jobs: ['build'], std: [17], cxx: ['gcc7', 'clang14']}
- {jobs: ['build'], std: 17, cxx: ['gcc7', 'clang14']}
- {jobs: ['build'], std: 'max', cxx: ['gcc8', 'gcc9', 'gcc10', 'gcc11', 'gcc12']}
- {jobs: ['build'], std: 'max', cxx: ['clang14', 'clang15', 'clang16', 'clang17']}
- {jobs: ['build'], std: 'max', cxx: ['msvc2019']}
- {jobs: ['build'], std: [17, 20], cxx: ['gcc', 'clang', 'msvc']}
- {jobs: ['build'], std: 'all', cxx: ['gcc', 'clang', 'msvc']}
# Current CTK testing:
- {jobs: ['test'], project: ['libcudacxx', 'thrust'], std: 'max', cxx: ['gcc']}
- {jobs: ['test'], project: ['libcudacxx', 'thrust'], std: 'max', cxx: ['clang', 'msvc']}
Expand All @@ -28,13 +27,13 @@ workflows:
- {jobs: ['test_nolid', 'test_lid0'], project: ['cub'], std: 'max', cxx: ['clang', 'msvc']}
- {jobs: ['test_lid0'], project: ['cub'], std: 'max', cxx: 'gcc12', gpu: 'h100', sm: 'gpu' }
# Modded builds:
- {jobs: ['build'], std: [17, 20], ctk: '12.5', cxx: 'nvhpc'}
- {jobs: ['build'], std: 'all', ctk: '12.5', cxx: 'nvhpc'}
- {jobs: ['build'], std: 'max', cxx: ['gcc', 'clang'], cpu: 'arm64'}
- {jobs: ['build'], std: 'max', cxx: ['gcc'], sm: '90a'}
# Test Thrust 32-bit-only dispatch here, since it's most likely to break. 64-bit-only is tested in nightly.
- {jobs: ['test_gpu'], project: 'thrust', cmake_options: '-DTHRUST_DISPATCH_TYPE=Force32bit'}
# default_projects: clang-cuda
- {jobs: ['build'], std: [17, 20], cudacxx: 'clang', cxx: 'clang'}
- {jobs: ['build'], std: 'all', cudacxx: 'clang', cxx: 'clang'}
- {jobs: ['build'], project: 'libcudacxx', std: 'max', cudacxx: 'clang', cxx: 'clang', sm: '90'}
- {jobs: ['build'], project: 'libcudacxx', std: 'max', cudacxx: 'clang', cxx: 'clang', sm: '90a'}
# nvrtc:
Expand All @@ -45,11 +44,11 @@ workflows:
- {jobs: ['build'], project: 'cudax', ctk: ['12.0'], std: 20, cxx: ['msvc14.36']}
- {jobs: ['build'], project: 'cudax', ctk: ['curr'], std: 20, cxx: ['gcc10', 'gcc11', 'gcc12']}
- {jobs: ['build'], project: 'cudax', ctk: ['curr'], std: 20, cxx: ['clang14', 'clang15', 'clang16', 'clang17']}
- {jobs: ['build'], project: 'cudax', ctk: ['12.5'], std: [17, 20], cxx: ['nvhpc']}
- {jobs: ['build'], project: 'cudax', ctk: ['12.5'], std: 'all', cxx: ['nvhpc']}
- {jobs: ['build'], project: 'cudax', ctk: ['curr'], std: 20, cxx: ['msvc2022']}
- {jobs: ['build'], project: 'cudax', ctk: ['curr'], std: 17, cxx: ['gcc'], sm: "90"}
- {jobs: ['build'], project: 'cudax', ctk: ['curr'], std: 20, cxx: ['gcc'], sm: "90a"}
- {jobs: ['build'], project: 'cudax', ctk: ['curr'], std: [17, 20], cxx: ['gcc', 'clang'], cpu: 'arm64'}
- {jobs: ['build'], project: 'cudax', ctk: ['curr'], std: 'all', cxx: ['gcc', 'clang'], cpu: 'arm64'}
- {jobs: ['test'], project: 'cudax', ctk: ['curr'], std: 20, cxx: ['gcc12', 'clang', 'msvc']}
# Python and c/parallel jobs:
- {jobs: ['test'], project: ['cccl_c_parallel', 'python'], ctk: '12.6'}
Expand Down Expand Up @@ -122,12 +121,12 @@ workflows:
devcontainer_version: '25.02'

# All supported C++ standards:
all_stds: [11, 14, 17, 20]
all_stds: [17, 20]

ctk_versions:
12.0: { stds: [11, 14, 17, 20] }
12.5: { stds: [11, 14, 17, 20] }
12.6: { stds: [11, 14, 17, 20], aka: 'curr' }
12.0: { stds: [17, 20] }
12.5: { stds: [17, 20] }
12.6: { stds: [17, 20], aka: 'curr' }

device_compilers:
nvcc: # Version / stds are taken from CTK
Expand All @@ -143,37 +142,37 @@ host_compilers:
container_tag: 'gcc'
exe: 'g++'
versions:
7: { stds: [11, 14, 17, ] }
8: { stds: [11, 14, 17, ] }
9: { stds: [11, 14, 17, ] }
10: { stds: [11, 14, 17, 20] }
11: { stds: [11, 14, 17, 20] }
12: { stds: [11, 14, 17, 20] }
13: { stds: [11, 14, 17, 20] }
7: { stds: [17, ] }
8: { stds: [17, ] }
9: { stds: [17, ] }
10: { stds: [17, 20] }
11: { stds: [17, 20] }
12: { stds: [17, 20] }
13: { stds: [17, 20] }
clang:
name: 'Clang'
container_tag: 'llvm'
exe: 'clang++'
versions:
14: { stds: [11, 14, 17, 20] }
15: { stds: [11, 14, 17, 20] }
16: { stds: [11, 14, 17, 20] }
17: { stds: [11, 14, 17, 20] }
18: { stds: [11, 14, 17, 20] }
14: { stds: [17, 20] }
15: { stds: [17, 20] }
16: { stds: [17, 20] }
17: { stds: [17, 20] }
18: { stds: [17, 20] }
msvc:
name: 'MSVC'
container_tag: 'cl'
exe: cl
versions:
14.29: { stds: [ 14, 17, ], aka: '2019' }
14.36: { stds: [ 14, 17, 20] }
14.39: { stds: [ 14, 17, 20], aka: '2022' }
14.29: { stds: [ 17, ], aka: '2019' }
14.36: { stds: [ 17, 20] }
14.39: { stds: [ 17, 20], aka: '2022' }
nvhpc:
name: 'NVHPC'
container_tag: 'nvhpc'
exe: nvc++
versions:
24.7: { stds: [11, 14, 17, 20 ] }
24.7: { stds: [17, 20 ] }

# Jobs support the following properties:
#
Expand Down Expand Up @@ -234,10 +233,10 @@ jobs:
projects:
cccl:
name: 'CCCL'
stds: [11, 14, 17, 20]
stds: [17, 20]
libcudacxx:
name: 'libcu++'
stds: [11, 14, 17, 20]
stds: [17, 20]
cub:
name: 'CUB'
stds: [17, 20]
Expand Down
12 changes: 5 additions & 7 deletions libcudacxx/include/cuda/std/__internal/cpp_dialect.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@
future release. Define CCCL_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.)
// clang-format on

#if _CCCL_STD_VER < 2011
# error libcu++ requires C++11 or later.
#elif _CCCL_STD_VER == 2011 && !defined(CCCL_IGNORE_DEPRECATED_CPP_11)
LIBCUDACXX_DIALECT_DEPRECATION(C++ 17, C++ 11)
#elif _CCCL_STD_VER == 2014 && !defined(CCCL_IGNORE_DEPRECATED_CPP_14)
LIBCUDACXX_DIALECT_DEPRECATION(C++ 17, C++ 14)
#endif // _CCCL_STD_VER >= 2017
#ifndef CCCL_IGNORE_DEPRECATED_CPP_DIALECT
# if _CCCL_STD_VER < 2017
# error libcu++ requires at least C++ 17. Define CCCL_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.
# endif // _CCCL_STD_VER >= 2017
#endif // CCCL_IGNORE_DEPRECATED_CPP_DIALECT

#endif // _LIBCUDACXX___INTERNAL_CPP_DIALECT_H
1 change: 1 addition & 0 deletions test/cmake/test_export/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ foreach (component IN LISTS COMPONENTS)
set(test_target version_check.${component})
set(component_target "${component}::${component}")
add_executable(${test_target} version_check.cxx)
target_compile_features(${test_target} PUBLIC cxx_std_17)
target_link_libraries(${test_target} PRIVATE ${component_target})
add_test(NAME ${test_target} COMMAND ${test_target})

Expand Down

0 comments on commit 1924668

Please sign in to comment.