Files
project_6/cccl_upstream/libcudacxx/cmake/LibcudacxxBuildCompilerTargets.cmake
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

54 lines
1.6 KiB
CMake

# This file defines the `libcudacxx_build_compiler_targets()` function, which
# creates the following interface targets:
#
# libcudacxx.compiler_interface
# - Interface target linked into all targets in the libcudacxx developer build.
# Defines common warning flags, definitions, etc, including those defined in
# the global CCCL targets.
cccl_get_libcudacxx()
function(libcudacxx_build_compiler_targets)
set(cuda_compile_options)
set(cxx_compile_options)
set(cxx_compile_definitions)
# if (CCCL_USE_LIBCXX)
# list(APPEND cxx_compile_options "-stdlib=libc++")
# list(APPEND cxx_compile_definitions "_ALLOW_UNSUPPORTED_LIBCPP=1")
# endif()
# Set test specific flags
list(APPEND cxx_compile_definitions "CCCL_ENABLE_ASSERTIONS")
list(APPEND cxx_compile_definitions "CCCL_IGNORE_DEPRECATED_CPP_DIALECT")
list(
APPEND cxx_compile_definitions
"CCCL_IGNORE_DEPRECATED_DISCARD_MEMORY_HEADER"
)
list(
APPEND cxx_compile_definitions
"CCCL_IGNORE_DEPRECATED_STREAM_REF_HEADER"
)
if (CCCL_ENABLE_TILE)
list(APPEND cuda_compile_options "--enable-tile")
endif()
cccl_build_compiler_interface(
libcudacxx.compiler_flags
"${cuda_compile_options}"
"${cxx_compile_options}"
"${cxx_compile_definitions}"
)
add_library(libcudacxx.compiler_interface INTERFACE)
target_link_libraries(
libcudacxx.compiler_interface
INTERFACE
# order matters here, we need the libcudacxx options to override the cccl options.
cccl.compiler_interface
libcudacxx.compiler_flags
libcudacxx::libcudacxx
)
endfunction()