Files
project_6/cccl_upstream/cudax/test/places/CMakeLists.txt
muh-bot dedf08166a [CCCL] Add missing CCCL components: c2h, nvbench_helper, cmake, cudax, AGENTS.md
Added 863 files from NVIDIA/cccl sparse checkout:
- c2h/ (27 files): Catch2 test helpers — generators, validators, runner
- nvbench_helper/ (10 files): Benchmark harness utilities
- cmake/ (29 files): CMake presets and build helpers
- cudax/ (794 files): Experimental CUDA extensions
- AGENTS.md: NVIDIA's official AI agent instructions for CCCL
- CMakePresets.json: Standardized build configurations
- cccl-version.json: Version tracking

Also added CCCL_ASSET_MAP.md mapping all 4295 CCCL files to
competition value and PRD items.

cccl_upstream now covers 100% of competition-critical assets:
- 27 tuning headers (SM80/90/100 benchmark data)
- 32 dispatch headers (algorithm implementations)
- 60 Thrust examples (correctness verification)
- 217 CUB Catch2 tests (regression matrix)
- 153 CUB benchmarks (parameter space search)
- 18 CUB examples (API verification)
- 27 test helpers + benchmark harness
- 794 cudax experimental extensions
2026-08-06 02:14:18 +00:00

137 lines
4.0 KiB
CMake

set(
places_test_sources
include_only.cu
data_place_alloc.cu
data_place_vmm.cu
exec_place_scope.cu
placement.cu
stream_pool.cu
)
set(places_fail_tests exec_place_scope_data_place_fail.cu)
set(
places_unittested_headers
cuda/experimental/__places/cute_partition.cuh
cuda/experimental/__places/places.cuh
cuda/experimental/__places/exec/cuda_context.cuh
cuda/experimental/__places/exec/green_context.cuh
cuda/experimental/__places/partitions/blocked_partition.cuh
cuda/experimental/__places/partitions/cyclic_shape.cuh
cuda/experimental/__places/partitions/tiled_partition.cuh
)
cccl_get_cudatoolkit()
## cudax_add_places_test
#
# Add a places test executable and register it with ctest.
#
# target_name_var: Variable name to overwrite with the name of the test
# target. Useful for adding target information after creation.
# source: The source file for the test.
#
function(cudax_add_places_test target_name_var source)
get_filename_component(dir ${source} DIRECTORY)
get_filename_component(filename ${source} NAME_WE)
if (dir)
set(filename "${dir}/${filename}")
endif()
string(REPLACE "/" "." test_name "${filename}")
set(test_target cudax.test.places.${test_name})
cccl_add_executable(${test_target} SOURCES ${source} ADD_CTEST)
cudax_places_configure_target(${test_target})
target_link_libraries(${test_target} PRIVATE cudax.compiler_interface)
set(${target_name_var} ${test_target} PARENT_SCOPE)
endfunction()
## cudax_add_places_unittest_header
#
# Add a places unittested header executable and register it with ctest.
#
# Unittested headers contain a set of tests that are enabled by including
# `unittest.cuh` and defining `UNITTESTED_FILE`.
#
# target_name_var: Variable name to overwrite with the name of the test
# target. Useful for adding target information after creation.
# source: The source file for the test.
#
function(cudax_add_places_unittest_header target_name_var source)
get_filename_component(relative_path ${source} DIRECTORY)
get_filename_component(filename ${source} NAME_WE)
string(
REPLACE
"cuda/experimental/"
""
test_label
"${relative_path}/${filename}"
)
string(REPLACE "/" "." test_label "${test_label}")
set(test_target "cudax.test.places.unittest_headers.${test_label}")
get_filename_component(
source_full_path
../../../cudax/include/${source}
ABSOLUTE
)
set(source ${source_full_path})
set(ut_template "${cudax_SOURCE_DIR}/cmake/places_header_unittest.in.cu")
set(ut_source "${cudax_BINARY_DIR}/unittest_headers/${test_target}.cu")
configure_file(${ut_template} ${ut_source} @ONLY)
cccl_add_executable(${test_target} SOURCES ${ut_source} ADD_CTEST)
cudax_places_configure_target(${test_target})
target_link_libraries(${test_target} PRIVATE cudax.compiler_interface)
set(${target_name_var} ${test_target} PARENT_SCOPE)
endfunction()
# Basic tests:
foreach (source IN LISTS places_test_sources)
cudax_add_places_test(test_target "${source}")
endforeach()
# Unittested headers
foreach (source IN LISTS places_unittested_headers)
cudax_add_places_unittest_header(test_target "${source}")
endforeach()
## cudax_add_places_fail_test
#
# Adds an EXCLUDE_FROM_ALL build target for `source` and a ctest that
# verifies compilation fails with errors matching expected-error annotations
# in the source file.
#
function(cudax_add_places_fail_test target_name_var source)
get_filename_component(filename ${source} NAME_WE)
set(test_target cudax.test.places.error.${filename})
cccl_add_executable(
${test_target}
SOURCES ${source}
NO_METATARGETS
NO_CLANG_TIDY
)
cudax_places_configure_target(${test_target})
target_link_libraries(${test_target} PRIVATE cudax.compiler_interface)
cccl_add_xfail_compile_target_test(
${test_target}
SOURCE_FILE "${source}"
ERROR_REGEX_LABEL "expected-error"
)
set(${target_name_var} ${test_target} PARENT_SCOPE)
endfunction()
# Expected-failure compile tests (_fail.cu convention)
foreach (source IN LISTS places_fail_tests)
cudax_add_places_fail_test(test_target "${source}")
endforeach()