Skip to content

Commit 1924668

Browse files
misccobernhardmgruber
authored andcommitted
Drop C++11 and C++14 support for all of cccl (NVIDIA#3417)
* Drop C++11 and C++14 support for all of cccl --------- Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com>
1 parent ceaebaf commit 1924668

File tree

4 files changed

+34
-142
lines changed

4 files changed

+34
-142
lines changed

CMakePresets.json

Lines changed: 0 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@
7373
"CUB_ENABLE_DIALECT_CPP20": true,
7474
"THRUST_ENABLE_MULTICONFIG": true,
7575
"THRUST_MULTICONFIG_WORKLOAD": "LARGE",
76-
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP11": true,
77-
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP14": true,
7876
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP17": true,
7977
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP20": true,
8078
"THRUST_MULTICONFIG_ENABLE_SYSTEM_CPP": true,
@@ -128,28 +126,6 @@
128126
"LIBCUDACXX_ENABLE_LIBCUDACXX_TESTS": true
129127
}
130128
},
131-
{
132-
"name": "libcudacxx-cpp11",
133-
"displayName": "libcu++: C++11",
134-
"inherits": "libcudacxx-base",
135-
"cacheVariables": {
136-
"CMAKE_CXX_STANDARD": "11",
137-
"CMAKE_CUDA_STANDARD": "11",
138-
"LIBCUDACXX_TEST_STANDARD_VER": "c++11",
139-
"CCCL_IGNORE_DEPRECATED_CPP_11": true
140-
}
141-
},
142-
{
143-
"name": "libcudacxx-cpp14",
144-
"displayName": "libcu++: C++14",
145-
"inherits": "libcudacxx-base",
146-
"cacheVariables": {
147-
"CMAKE_CXX_STANDARD": "14",
148-
"CMAKE_CUDA_STANDARD": "14",
149-
"LIBCUDACXX_TEST_STANDARD_VER": "c++14",
150-
"CCCL_IGNORE_DEPRECATED_CPP_14": true
151-
}
152-
},
153129
{
154130
"name": "libcudacxx-cpp17",
155131
"displayName": "libcu++: C++17",
@@ -179,28 +155,6 @@
179155
"CMAKE_CUDA_ARCHITECTURES": "70"
180156
}
181157
},
182-
{
183-
"name": "libcudacxx-nvrtc-cpp11",
184-
"displayName": "libcu++ NVRTC: C++11",
185-
"inherits": "libcudacxx-nvrtc-base",
186-
"cacheVariables": {
187-
"CMAKE_CXX_STANDARD": "11",
188-
"CMAKE_CUDA_STANDARD": "11",
189-
"LIBCUDACXX_TEST_STANDARD_VER": "c++11",
190-
"CCCL_IGNORE_DEPRECATED_CPP_11": true
191-
}
192-
},
193-
{
194-
"name": "libcudacxx-nvrtc-cpp14",
195-
"displayName": "libcu++ NVRTC: C++14",
196-
"inherits": "libcudacxx-nvrtc-base",
197-
"cacheVariables": {
198-
"CMAKE_CXX_STANDARD": "14",
199-
"CMAKE_CUDA_STANDARD": "14",
200-
"LIBCUDACXX_TEST_STANDARD_VER": "c++14",
201-
"CCCL_IGNORE_DEPRECATED_CPP_14": true
202-
}
203-
},
204158
{
205159
"name": "libcudacxx-nvrtc-cpp17",
206160
"displayName": "libcu++ NVRTC: C++17",
@@ -261,8 +215,6 @@
261215
"THRUST_MULTICONFIG_ENABLE_SYSTEM_CUDA": true,
262216
"THRUST_MULTICONFIG_ENABLE_SYSTEM_OMP": true,
263217
"THRUST_MULTICONFIG_ENABLE_SYSTEM_TBB": true,
264-
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP11": false,
265-
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP14": false,
266218
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP17": false,
267219
"THRUST_MULTICONFIG_ENABLE_DIALECT_CPP20": false
268220
}
@@ -420,22 +372,6 @@
420372
"libcudacxx.test.atomics.ptx"
421373
]
422374
},
423-
{
424-
"name": "libcudacxx-nvrtc-cpp11",
425-
"hidden": false,
426-
"inherits": [
427-
"libcudacxx-nvrtcc"
428-
],
429-
"configurePreset": "libcudacxx-nvrtc-cpp11"
430-
},
431-
{
432-
"name": "libcudacxx-nvrtc-cpp14",
433-
"hidden": false,
434-
"inherits": [
435-
"libcudacxx-nvrtcc"
436-
],
437-
"configurePreset": "libcudacxx-nvrtc-cpp14"
438-
},
439375
{
440376
"name": "libcudacxx-nvrtc-cpp17",
441377
"hidden": false,
@@ -452,20 +388,6 @@
452388
],
453389
"configurePreset": "libcudacxx-nvrtc-cpp20"
454390
},
455-
{
456-
"name": "libcudacxx-cpp11",
457-
"configurePreset": "libcudacxx-cpp11",
458-
"inherits": [
459-
"libcudacxx-base"
460-
]
461-
},
462-
{
463-
"name": "libcudacxx-cpp14",
464-
"configurePreset": "libcudacxx-cpp14",
465-
"inherits": [
466-
"libcudacxx-base"
467-
]
468-
},
469391
{
470392
"name": "libcudacxx-cpp17",
471393
"configurePreset": "libcudacxx-cpp17",
@@ -572,20 +494,6 @@
572494
"outputOnFailure": false
573495
}
574496
},
575-
{
576-
"name": "libcudacxx-lit-cpp11",
577-
"configurePreset": "libcudacxx-cpp11",
578-
"inherits": [
579-
"libcudacxx-lit-base"
580-
]
581-
},
582-
{
583-
"name": "libcudacxx-lit-cpp14",
584-
"configurePreset": "libcudacxx-cpp14",
585-
"inherits": [
586-
"libcudacxx-lit-base"
587-
]
588-
},
589497
{
590498
"name": "libcudacxx-lit-cpp17",
591499
"configurePreset": "libcudacxx-cpp17",
@@ -607,20 +515,6 @@
607515
"libcudacxx-lit-base"
608516
]
609517
},
610-
{
611-
"name": "libcudacxx-nvrtc-cpp11",
612-
"configurePreset": "libcudacxx-nvrtc-cpp11",
613-
"inherits": [
614-
"libcudacxx-nvrtc-base"
615-
]
616-
},
617-
{
618-
"name": "libcudacxx-nvrtc-cpp14",
619-
"configurePreset": "libcudacxx-nvrtc-cpp14",
620-
"inherits": [
621-
"libcudacxx-nvrtc-base"
622-
]
623-
},
624518
{
625519
"name": "libcudacxx-nvrtc-cpp17",
626520
"configurePreset": "libcudacxx-nvrtc-cpp17",

ci/matrix.yaml

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ workflows:
1313
# Old CTK/compiler
1414
- {jobs: ['build'], std: 'minmax', ctk: '12.0', cxx: ['gcc7', 'gcc9', 'clang14', 'msvc2019']}
1515
# Current CTK build-only
16-
- {jobs: ['build'], std: [11, 14], cxx: ['gcc7', 'clang14'], project: 'libcudacxx'}
17-
- {jobs: ['build'], std: [17], cxx: ['gcc7', 'clang14']}
16+
- {jobs: ['build'], std: 17, cxx: ['gcc7', 'clang14']}
1817
- {jobs: ['build'], std: 'max', cxx: ['gcc8', 'gcc9', 'gcc10', 'gcc11', 'gcc12']}
1918
- {jobs: ['build'], std: 'max', cxx: ['clang14', 'clang15', 'clang16', 'clang17']}
2019
- {jobs: ['build'], std: 'max', cxx: ['msvc2019']}
21-
- {jobs: ['build'], std: [17, 20], cxx: ['gcc', 'clang', 'msvc']}
20+
- {jobs: ['build'], std: 'all', cxx: ['gcc', 'clang', 'msvc']}
2221
# Current CTK testing:
2322
- {jobs: ['test'], project: ['libcudacxx', 'thrust'], std: 'max', cxx: ['gcc']}
2423
- {jobs: ['test'], project: ['libcudacxx', 'thrust'], std: 'max', cxx: ['clang', 'msvc']}
@@ -28,13 +27,13 @@ workflows:
2827
- {jobs: ['test_nolid', 'test_lid0'], project: ['cub'], std: 'max', cxx: ['clang', 'msvc']}
2928
- {jobs: ['test_lid0'], project: ['cub'], std: 'max', cxx: 'gcc12', gpu: 'h100', sm: 'gpu' }
3029
# Modded builds:
31-
- {jobs: ['build'], std: [17, 20], ctk: '12.5', cxx: 'nvhpc'}
30+
- {jobs: ['build'], std: 'all', ctk: '12.5', cxx: 'nvhpc'}
3231
- {jobs: ['build'], std: 'max', cxx: ['gcc', 'clang'], cpu: 'arm64'}
3332
- {jobs: ['build'], std: 'max', cxx: ['gcc'], sm: '90a'}
3433
# Test Thrust 32-bit-only dispatch here, since it's most likely to break. 64-bit-only is tested in nightly.
3534
- {jobs: ['test_gpu'], project: 'thrust', cmake_options: '-DTHRUST_DISPATCH_TYPE=Force32bit'}
3635
# default_projects: clang-cuda
37-
- {jobs: ['build'], std: [17, 20], cudacxx: 'clang', cxx: 'clang'}
36+
- {jobs: ['build'], std: 'all', cudacxx: 'clang', cxx: 'clang'}
3837
- {jobs: ['build'], project: 'libcudacxx', std: 'max', cudacxx: 'clang', cxx: 'clang', sm: '90'}
3938
- {jobs: ['build'], project: 'libcudacxx', std: 'max', cudacxx: 'clang', cxx: 'clang', sm: '90a'}
4039
# nvrtc:
@@ -45,11 +44,11 @@ workflows:
4544
- {jobs: ['build'], project: 'cudax', ctk: ['12.0'], std: 20, cxx: ['msvc14.36']}
4645
- {jobs: ['build'], project: 'cudax', ctk: ['curr'], std: 20, cxx: ['gcc10', 'gcc11', 'gcc12']}
4746
- {jobs: ['build'], project: 'cudax', ctk: ['curr'], std: 20, cxx: ['clang14', 'clang15', 'clang16', 'clang17']}
48-
- {jobs: ['build'], project: 'cudax', ctk: ['12.5'], std: [17, 20], cxx: ['nvhpc']}
47+
- {jobs: ['build'], project: 'cudax', ctk: ['12.5'], std: 'all', cxx: ['nvhpc']}
4948
- {jobs: ['build'], project: 'cudax', ctk: ['curr'], std: 20, cxx: ['msvc2022']}
5049
- {jobs: ['build'], project: 'cudax', ctk: ['curr'], std: 17, cxx: ['gcc'], sm: "90"}
5150
- {jobs: ['build'], project: 'cudax', ctk: ['curr'], std: 20, cxx: ['gcc'], sm: "90a"}
52-
- {jobs: ['build'], project: 'cudax', ctk: ['curr'], std: [17, 20], cxx: ['gcc', 'clang'], cpu: 'arm64'}
51+
- {jobs: ['build'], project: 'cudax', ctk: ['curr'], std: 'all', cxx: ['gcc', 'clang'], cpu: 'arm64'}
5352
- {jobs: ['test'], project: 'cudax', ctk: ['curr'], std: 20, cxx: ['gcc12', 'clang', 'msvc']}
5453
# Python and c/parallel jobs:
5554
- {jobs: ['test'], project: ['cccl_c_parallel', 'python'], ctk: '12.6'}
@@ -122,12 +121,12 @@ workflows:
122121
devcontainer_version: '25.02'
123122

124123
# All supported C++ standards:
125-
all_stds: [11, 14, 17, 20]
124+
all_stds: [17, 20]
126125

127126
ctk_versions:
128-
12.0: { stds: [11, 14, 17, 20] }
129-
12.5: { stds: [11, 14, 17, 20] }
130-
12.6: { stds: [11, 14, 17, 20], aka: 'curr' }
127+
12.0: { stds: [17, 20] }
128+
12.5: { stds: [17, 20] }
129+
12.6: { stds: [17, 20], aka: 'curr' }
131130

132131
device_compilers:
133132
nvcc: # Version / stds are taken from CTK
@@ -143,37 +142,37 @@ host_compilers:
143142
container_tag: 'gcc'
144143
exe: 'g++'
145144
versions:
146-
7: { stds: [11, 14, 17, ] }
147-
8: { stds: [11, 14, 17, ] }
148-
9: { stds: [11, 14, 17, ] }
149-
10: { stds: [11, 14, 17, 20] }
150-
11: { stds: [11, 14, 17, 20] }
151-
12: { stds: [11, 14, 17, 20] }
152-
13: { stds: [11, 14, 17, 20] }
145+
7: { stds: [17, ] }
146+
8: { stds: [17, ] }
147+
9: { stds: [17, ] }
148+
10: { stds: [17, 20] }
149+
11: { stds: [17, 20] }
150+
12: { stds: [17, 20] }
151+
13: { stds: [17, 20] }
153152
clang:
154153
name: 'Clang'
155154
container_tag: 'llvm'
156155
exe: 'clang++'
157156
versions:
158-
14: { stds: [11, 14, 17, 20] }
159-
15: { stds: [11, 14, 17, 20] }
160-
16: { stds: [11, 14, 17, 20] }
161-
17: { stds: [11, 14, 17, 20] }
162-
18: { stds: [11, 14, 17, 20] }
157+
14: { stds: [17, 20] }
158+
15: { stds: [17, 20] }
159+
16: { stds: [17, 20] }
160+
17: { stds: [17, 20] }
161+
18: { stds: [17, 20] }
163162
msvc:
164163
name: 'MSVC'
165164
container_tag: 'cl'
166165
exe: cl
167166
versions:
168-
14.29: { stds: [ 14, 17, ], aka: '2019' }
169-
14.36: { stds: [ 14, 17, 20] }
170-
14.39: { stds: [ 14, 17, 20], aka: '2022' }
167+
14.29: { stds: [ 17, ], aka: '2019' }
168+
14.36: { stds: [ 17, 20] }
169+
14.39: { stds: [ 17, 20], aka: '2022' }
171170
nvhpc:
172171
name: 'NVHPC'
173172
container_tag: 'nvhpc'
174173
exe: nvc++
175174
versions:
176-
24.7: { stds: [11, 14, 17, 20 ] }
175+
24.7: { stds: [17, 20 ] }
177176

178177
# Jobs support the following properties:
179178
#
@@ -234,10 +233,10 @@ jobs:
234233
projects:
235234
cccl:
236235
name: 'CCCL'
237-
stds: [11, 14, 17, 20]
236+
stds: [17, 20]
238237
libcudacxx:
239238
name: 'libcu++'
240-
stds: [11, 14, 17, 20]
239+
stds: [17, 20]
241240
cub:
242241
name: 'CUB'
243242
stds: [17, 20]

libcudacxx/include/cuda/std/__internal/cpp_dialect.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,10 @@
3535
future release. Define CCCL_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.)
3636
// clang-format on
3737

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

4644
#endif // _LIBCUDACXX___INTERNAL_CPP_DIALECT_H

test/cmake/test_export/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ foreach (component IN LISTS COMPONENTS)
8181
set(test_target version_check.${component})
8282
set(component_target "${component}::${component}")
8383
add_executable(${test_target} version_check.cxx)
84+
target_compile_features(${test_target} PUBLIC cxx_std_17)
8485
target_link_libraries(${test_target} PRIVATE ${component_target})
8586
add_test(NAME ${test_target} COMMAND ${test_target})
8687

0 commit comments

Comments
 (0)