Files
project_6/cccl_upstream/c/experimental/stf/CMakeLists.txt
EngineX CI 56fd68e7dd [INFRA] Import NVIDIA/CCCL upstream as optimization reference library
CCCL (CUDA C++ Core Libraries) provides:
- CUB: device/block/warp-level GPU primitives (reduce, scan, sort, topk)
- Thrust: high-level parallel algorithms (transform_reduce, sort, scan)
- libcudacxx: CUDA C++ standard library (atomics, barriers, memory)
- cudax: experimental features (memory resources, allocators)
- Tuning policies: per-SM hardware-specific algorithm parameters

Competition optimization vectors mapped to CCCL:
- Output TPS (83% weight): warp_reduce, block_reduce, device_topk
- Input TPS (14% weight): device_scan, block_load, prefetch
- Cache TPS (3% weight): prefix caching strategy patterns
- Memory (0.9 util): pooled/cached/buddy allocators

Source: https://github.com/NVIDIA/cccl (shallow clone, HEAD only)
License: Apache-2.0
2026-07-30 09:35:51 +00:00

80 lines
1.9 KiB
CMake

cmake_minimum_required(VERSION 3.21)
project(CCCL_C_EXPERIMENTAL_STF LANGUAGES CUDA CXX C)
option(
CCCL_C_EXPERIMENTAL_STF_ENABLE_TESTING
"Build cccl.experimental.c.stf tests."
OFF
)
# FIXME Ideally this would be handled by presets and install rules, but for now
# consumers may override this to control the target location of cccl.c.experimental.stf.
set(
CCCL_C_EXPERIMENTAL_STF_LIBRARY_OUTPUT_DIRECTORY
""
CACHE PATH
"Override output directory for the cccl.c.experimental.stf library"
)
mark_as_advanced(CCCL_C_EXPERIMENTAL_STF_LIBRARY_OUTPUT_DIRECTORY)
file(
GLOB_RECURSE srcs
RELATIVE "${CMAKE_CURRENT_LIST_DIR}"
CONFIGURE_DEPENDS
"src/*.cu"
"src/*.cuh"
)
cccl_get_cudatoolkit()
cccl_get_cudax()
add_library(cccl.c.experimental.stf SHARED ${srcs})
set_property(
TARGET cccl.c.experimental.stf
PROPERTY POSITION_INDEPENDENT_CODE ON
)
cccl_configure_target(cccl.c.experimental.stf DIALECT 20)
# Override the properties set by cccl_configure_target:
if (CCCL_C_EXPERIMENTAL_STF_LIBRARY_OUTPUT_DIRECTORY)
set_target_properties(
cccl.c.experimental.stf
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY
"${CCCL_C_EXPERIMENTAL_STF_LIBRARY_OUTPUT_DIRECTORY}"
ARCHIVE_OUTPUT_DIRECTORY
"${CCCL_C_EXPERIMENTAL_STF_LIBRARY_OUTPUT_DIRECTORY}"
)
endif()
set_target_properties(
cccl.c.experimental.stf
PROPERTIES CUDA_RUNTIME_LIBRARY STATIC
)
target_compile_definitions(cccl.c.experimental.stf PUBLIC CCCL_C_EXPERIMENTAL=1)
target_link_libraries(
cccl.c.experimental.stf
PRIVATE #
CUDA::cudart_static
CUDA::cuda_driver
cudax::cudax
)
target_compile_options(
cccl.c.experimental.stf
PRIVATE #
$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:--expt-relaxed-constexpr>
$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:--extended-lambda>
)
target_include_directories(
cccl.c.experimental.stf
PUBLIC "include"
PRIVATE "src"
)
if (CCCL_C_EXPERIMENTAL_STF_ENABLE_TESTING)
add_subdirectory(test)
endif()