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
43 lines
1.1 KiB
CMake
43 lines
1.1 KiB
CMake
function(_thrust_find_thrust_multiconfig)
|
|
# Check which systems are enabled by multiconfig:
|
|
set(req_systems)
|
|
if (THRUST_MULTICONFIG_ENABLE_SYSTEM_CUDA)
|
|
list(APPEND req_systems CUDA)
|
|
endif()
|
|
if (THRUST_MULTICONFIG_ENABLE_SYSTEM_CPP)
|
|
list(APPEND req_systems CPP)
|
|
endif()
|
|
if (THRUST_MULTICONFIG_ENABLE_SYSTEM_TBB)
|
|
list(APPEND req_systems TBB)
|
|
endif()
|
|
if (THRUST_MULTICONFIG_ENABLE_SYSTEM_OMP)
|
|
list(APPEND req_systems OMP)
|
|
endif()
|
|
|
|
find_package(
|
|
Thrust
|
|
REQUIRED
|
|
CONFIG
|
|
NO_DEFAULT_PATH # Only check the explicit path in HINTS:
|
|
HINTS "${CCCL_SOURCE_DIR}/lib/cmake/thrust/"
|
|
COMPONENTS ${req_systems}
|
|
)
|
|
endfunction()
|
|
|
|
function(_thrust_find_thrust_singleconfig)
|
|
cccl_get_thrust()
|
|
|
|
# Create target now to prepare system found flags:
|
|
thrust_create_target(thrust.config FROM_OPTIONS ${THRUST_TARGET_FLAGS})
|
|
thrust_debug_target(thrust.config "${THRUST_VERSION}")
|
|
endfunction()
|
|
|
|
# Find thrust along with all requested backends.
|
|
function(thrust_find_thrust)
|
|
if (THRUST_ENABLE_MULTICONFIG)
|
|
_thrust_find_thrust_multiconfig()
|
|
else()
|
|
_thrust_find_thrust_singleconfig()
|
|
endif()
|
|
endfunction()
|