[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
This commit is contained in:
38
cccl_upstream/thrust/cmake/ThrustBuildCompilerTargets.cmake
Normal file
38
cccl_upstream/thrust/cmake/ThrustBuildCompilerTargets.cmake
Normal file
@@ -0,0 +1,38 @@
|
||||
# This file defines the `thrust_build_compiler_targets()` function, which
|
||||
# creates the following interface targets:
|
||||
#
|
||||
# thrust.compiler_interface
|
||||
# Provides compiler settings for all thrust tests, examples, etc. This should not be used
|
||||
# directly, as it is linked to by all thrust configuration targets in THRUST_TARGETS.
|
||||
|
||||
function(thrust_build_compiler_targets)
|
||||
set(cuda_compile_options)
|
||||
set(cxx_compile_options)
|
||||
set(cxx_compile_definitions)
|
||||
|
||||
if ("MSVC" STREQUAL "${CMAKE_CXX_COMPILER_ID}")
|
||||
# Disabled loss-of-data conversion warnings.
|
||||
# TODO Re-enable.
|
||||
append_option_if_available("/wd4244" cxx_compile_options)
|
||||
|
||||
# Disable warning about applying unary operator- to unsigned type.
|
||||
# TODO Re-enable.
|
||||
append_option_if_available("/wd4146" cxx_compile_options)
|
||||
endif()
|
||||
|
||||
cccl_build_compiler_interface(
|
||||
thrust.compiler_flags
|
||||
"${cuda_compile_options}"
|
||||
"${cxx_compile_options}"
|
||||
"${cxx_compile_definitions}"
|
||||
)
|
||||
|
||||
add_library(thrust.compiler_interface INTERFACE)
|
||||
target_link_libraries(
|
||||
thrust.compiler_interface
|
||||
INTERFACE
|
||||
# order matters here, we need the project options to override the cccl options.
|
||||
cccl.compiler_interface
|
||||
thrust.compiler_flags
|
||||
)
|
||||
endfunction()
|
||||
Reference in New Issue
Block a user