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
57 lines
1.5 KiB
CMake
57 lines
1.5 KiB
CMake
thrust_create_target(cudax.examples.thrust)
|
|
|
|
function(cudax_add_example target_name_var example_src)
|
|
get_filename_component(example_name ${example_src} NAME_WE)
|
|
|
|
# The actual name of the test's target:
|
|
set(example_target cudax.example.${example_name})
|
|
set(${target_name_var} ${example_target} PARENT_SCOPE)
|
|
|
|
cccl_add_executable(${example_target} SOURCES "${example_src}" ADD_CTEST)
|
|
target_link_libraries(
|
|
${example_target}
|
|
PRIVATE #
|
|
cudax.compiler_interface
|
|
cudax.examples.thrust
|
|
)
|
|
target_compile_options(
|
|
${example_target}
|
|
PRIVATE
|
|
$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:--expt-relaxed-constexpr>
|
|
$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:--extended-lambda>
|
|
)
|
|
target_include_directories(
|
|
${example_target}
|
|
PRIVATE "${CUB_SOURCE_DIR}/examples"
|
|
)
|
|
endfunction()
|
|
|
|
file(
|
|
GLOB example_srcs
|
|
RELATIVE "${cudax_SOURCE_DIR}/examples"
|
|
CONFIGURE_DEPENDS
|
|
*.cu
|
|
*.cpp
|
|
)
|
|
|
|
cccl_get_cudatoolkit()
|
|
|
|
# Example requires pinned_memory_resource.
|
|
if (CUDAToolkit_VERSION VERSION_LESS 12.9)
|
|
list(REMOVE_ITEM example_srcs async_buffer_add.cu cub_reduce.cu)
|
|
endif()
|
|
|
|
foreach (example_src IN LISTS example_srcs)
|
|
cudax_add_example(example_target "${example_src}")
|
|
endforeach()
|
|
|
|
# FIXME: Enable MSVC
|
|
if (cudax_ENABLE_CUDASTF AND NOT "MSVC" STREQUAL "${CMAKE_CXX_COMPILER_ID}")
|
|
# STF examples are handled separately:
|
|
add_subdirectory(stf)
|
|
endif()
|
|
|
|
if (cudax_ENABLE_PLACES AND NOT "MSVC" STREQUAL "${CMAKE_CXX_COMPILER_ID}")
|
|
add_subdirectory(places)
|
|
endif()
|