Skip to content

Commit fb852b1

Browse files
committed
WIP [skip-vdc][skip-docs][skip-tpt]
1 parent 6a357a9 commit fb852b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1396
-925
lines changed

.gersemirc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ definitions: [
55
"cmake/", # CCCL level utilities
66
"lib/cmake/thrust/", # thrust_create_target and friends
77
# helper-function heavy:
8-
"cub/test/"
8+
"cub/test/",
9+
"thrust/testing/",
910
]
1011
disable_formatting: false
1112
extensions: [".gersemi/ext/builtins.py", ".gersemi/ext/cccl.py", ".gersemi/ext/thirdparty.py"]

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,15 @@ if (CCCL_TOPLEVEL_PROJECT)
8080
include(cmake/CCCLUtilities.cmake) # include this before other CCCL helpers
8181

8282
include(cmake/CCCLAddExecutable.cmake)
83+
include(cmake/CCCLAddTestsFromSrc.cmake)
84+
include(cmake/CCCLAddXFailCompileTargetTest.cmake)
8385
include(cmake/CCCLBuildCompilerTargets.cmake)
8486
include(cmake/CCCLClangdCompileInfo.cmake)
8587
include(cmake/CCCLConfigureTarget.cmake)
8688
include(cmake/CCCLEnsureMetaTargets.cmake)
8789
include(cmake/CCCLGenerateHeaderTests.cmake)
8890
include(cmake/CCCLGetDependencies.cmake)
91+
include(cmake/CCCLParseArguments.cmake)
8992
include(cmake/CCCLTestParams.cmake)
9093

9194
cccl_build_compiler_targets()

CMakePresets.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@
203203
"CMAKE_CUDA_ARCHITECTURES": "minmax-major-cccl",
204204
"CCCL_ENABLE_THRUST": true,
205205
"THRUST_ENABLE_MULTICONFIG": true,
206+
"THRUST_MULTICONFIG_WORKLOAD": "MEDIUM",
206207
"THRUST_MULTICONFIG_ENABLE_SYSTEM_CPP": true,
207208
"THRUST_MULTICONFIG_ENABLE_SYSTEM_CUDA": true,
208209
"THRUST_MULTICONFIG_ENABLE_SYSTEM_OMP": true,

c2h/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ else()
4646
target_compile_definitions(cccl.c2h PRIVATE C2H_HAS_CURAND=0)
4747
endif()
4848

49-
add_library(cccl.c2h.main OBJECT catch2_runner.cpp catch2_runner_helper.cu)
49+
add_library(cccl.c2h.main STATIC catch2_runner.cpp catch2_runner_helper.cu)
5050
target_link_libraries(cccl.c2h.main PUBLIC cccl.c2h)

ci/matrix.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ workflows:
2121
# args: '--preset libcudacxx --lit-tests "cuda/utility/basic_any.pass.cpp"' }
2222
#
2323
override:
24+
- {jobs: ['test'], project: ['thrust'], std: 20, cxx: ['gcc', 'clang', 'msvc'], gpu: 'rtx4090' }
25+
- {jobs: ['test'], project: ['cub'], std: 20, cxx: ['gcc', 'clang', 'msvc'], gpu: 'rtxa6000' }
26+
# TODO add coverage for these:
27+
- {jobs: ['test_nolid', 'test_lid0', 'test_lid2'],
28+
project: 'cub', std: 20, cxx: ['gcc', 'clang', 'msvc'], cmake_options: "-DCUB_FORCE_RDC=ON", gpu: 'rtxa6000' }
29+
- {jobs: ['test_gpu'],
30+
project: 'thrust', std: 20, cxx: ['gcc', 'clang', 'msvc'], cmake_options: "-DTHRUST_FORCE_RDC=ON", gpu: 'rtx4090' }
2431

2532
pull_request:
2633
# Old CTK: Oldest/newest supported host compilers:
@@ -546,7 +553,6 @@ projects:
546553

547554
# testing -> Runner with GPU is in a nv-gh-runners testing pool
548555
gpus:
549-
v100: { sm: 70 } # 32 GB, 40 runners
550556
t4: { sm: 75 } # 16 GB, 10 runners
551557
rtx2080: { sm: 75 } # 8 GB, 12 runners
552558
rtxa6000: { sm: 86 } # 48 GB, 12 runners

ci/upload_cub_test_artifacts.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ build_dir_regex="build${CCCL_BUILD_INFIX:+/$CCCL_BUILD_INFIX}/cub[^/]*"
4747

4848
# Just collect the minimum set of files needed for running each ctest preset:
4949
for preset_variant in ${preset_variants[@]}; do
50-
5150
# Shared across all presets:
5251
ci/util/artifacts/stage.sh "$artifact_prefix-$preset_variant" \
5352
"$build_dir_regex/build\.ninja$" \

cmake/CCCLAddExecutable.cmake

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,30 @@ function(cccl_add_executable target_name)
1111
set(oneValueArgs METATARGET_PATH)
1212
set(multiValueArgs SOURCES)
1313
cmake_parse_arguments(
14-
_cccl
14+
self
1515
"${options}"
1616
"${oneValueArgs}"
1717
"${multiValueArgs}"
1818
${ARGN}
1919
)
20+
cccl_parse_arguments_error_checks(
21+
"cccl_add_executable"
22+
ERROR_UNPARSED
23+
REQUIRED_VALUES SOURCES
24+
DEFAULT_VALUES METATARGET_PATH "${target_name}"
25+
)
2026

21-
if (_cccl_UNPARSED_ARGUMENTS)
22-
message(FATAL_ERROR "Unrecognized arguments: ${_cccl_UNPARSED_ARGUMENTS}")
23-
endif()
24-
25-
if (NOT DEFINED _cccl_SOURCES)
26-
message(FATAL_ERROR "cccl_add_executable requires SOURCES argument")
27-
endif()
28-
29-
add_executable(${target_name} ${_cccl_SOURCES})
27+
add_executable(${target_name} ${self_SOURCES})
3028
cccl_configure_target(${target_name})
3129

32-
if (_cccl_ADD_CTEST)
30+
if (self_ADD_CTEST)
3331
add_test(NAME ${target_name} COMMAND "$<TARGET_FILE:${target_name}>")
3432
endif()
3533

36-
if (NOT _cccl_NO_METATARGETS)
37-
set(metatarget_path ${target_name})
38-
if (DEFINED _cccl_METATARGET_PATH)
39-
set(metatarget_path ${_cccl_METATARGET_PATH})
40-
endif()
41-
cccl_ensure_metatargets(${target_name} METATARGET_PATH ${metatarget_path})
34+
if (NOT self_NO_METATARGETS)
35+
cccl_ensure_metatargets(
36+
${target_name}
37+
METATARGET_PATH ${self_METATARGET_PATH}
38+
)
4239
endif()
4340
endfunction()

cmake/CCCLAddSubdirHelper.cmake

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,22 @@ function(cccl_add_subdir_helper project_name)
1212
)
1313
set(multiValueArgs)
1414
cmake_parse_arguments(
15-
CCCL_SUBDIR
15+
self
1616
"${options}"
1717
"${oneValueArgs}"
1818
"${multiValueArgs}"
1919
${ARGN}
2020
)
21+
cccl_parse_arguments_error_checks("cccl_add_subdir_helper" ERROR_UNPARSED)
2122

22-
if (DEFINED CCCL_SUBDIR_PACKAGE_FILEBASE)
23-
set(package_filebase "${CCCL_SUBDIR_PACKAGE_FILEBASE}")
23+
if (DEFINED self_PACKAGE_FILEBASE)
24+
set(package_filebase "${self_PACKAGE_FILEBASE}")
2425
else()
2526
string(TOLOWER "${project_name}" package_filebase)
2627
endif()
2728

28-
if (DEFINED CCCL_SUBDIR_PACKAGE_PATH)
29-
set(package_prefix "${CCCL_SUBDIR_PACKAGE_PATH}/${package_filebase}")
29+
if (DEFINED self_PACKAGE_PATH)
30+
set(package_prefix "${self_PACKAGE_PATH}/${package_filebase}")
3031
else()
3132
set(
3233
package_prefix
@@ -36,20 +37,20 @@ function(cccl_add_subdir_helper project_name)
3637

3738
set(CMAKE_FIND_PACKAGE_NAME ${project_name})
3839
set(${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS)
39-
if (DEFINED CCCL_SUBDIR_REQUIRED_COMPONENTS)
40+
if (DEFINED self_REQUIRED_COMPONENTS)
4041
list(
4142
APPEND ${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS
42-
${CCCL_SUBDIR_REQUIRED_COMPONENTS}
43+
${self_REQUIRED_COMPONENTS}
4344
)
44-
foreach (component IN LISTS CCCL_SUBDIR_REQUIRED_COMPONENTS)
45+
foreach (component IN LISTS self_REQUIRED_COMPONENTS)
4546
set(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${component} TRUE)
4647
endforeach()
4748
endif()
4849

49-
if (DEFINED CCCL_SUBDIR_OPTIONAL_COMPONENTS)
50+
if (DEFINED self_OPTIONAL_COMPONENTS)
5051
list(
5152
APPEND ${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS
52-
${CCCL_SUBDIR_OPTIONAL_COMPONENTS}
53+
${self_OPTIONAL_COMPONENTS}
5354
)
5455
endif()
5556

0 commit comments

Comments
 (0)