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
52 lines
1.3 KiB
CMake
52 lines
1.3 KiB
CMake
## Codegen adds the following build targets
|
|
# libcudacxx.atomics.codegen
|
|
# libcudacxx.atomics.codegen.install
|
|
## Test targets:
|
|
# libcudacxx.test.atomics.codegen.diff
|
|
|
|
add_executable(codegen EXCLUDE_FROM_ALL codegen.cpp)
|
|
|
|
target_compile_features(codegen PRIVATE cxx_std_20)
|
|
|
|
set(
|
|
atomic_generated_output
|
|
"${libcudacxx_BINARY_DIR}/codegen/cuda_ptx_generated.h"
|
|
)
|
|
set(
|
|
atomic_install_location
|
|
"${libcudacxx_SOURCE_DIR}/include/cuda/std/__atomic/functions"
|
|
)
|
|
|
|
add_custom_target(
|
|
libcudacxx.atomics.codegen
|
|
COMMAND codegen "${atomic_generated_output}"
|
|
BYPRODUCTS "${atomic_generated_output}"
|
|
)
|
|
|
|
add_custom_target(
|
|
libcudacxx.atomics.codegen.install
|
|
# gersemi: off
|
|
COMMAND
|
|
"${CMAKE_COMMAND}" -E copy
|
|
"${atomic_generated_output}"
|
|
"${atomic_install_location}/cuda_ptx_generated.h"
|
|
# gersemi: on
|
|
DEPENDS libcudacxx.atomics.codegen
|
|
BYPRODUCTS "${atomic_install_location}/cuda_ptx_generated.h"
|
|
)
|
|
|
|
add_test(
|
|
NAME libcudacxx.test.atomics.codegen.diff
|
|
# gersemi: off
|
|
COMMAND
|
|
"${CMAKE_COMMAND}" -E compare_files
|
|
"${atomic_install_location}/cuda_ptx_generated.h"
|
|
"${atomic_generated_output}"
|
|
# gersemi: on
|
|
)
|
|
|
|
set_tests_properties(
|
|
libcudacxx.test.atomics.codegen.diff
|
|
PROPERTIES REQUIRED_FILES "${atomic_generated_output}"
|
|
)
|