[CCCL] 瘦身 + 补全: 移除 cudax/python/libcudacxx-tests 冗余文件, 新增 c2h 测试助手 + cmake 构建系统 + 8 个 CUDA thrust examples

变更摘要:
- 删除: cudax/ (783 files, 7.2M) — 实验性组件,竞赛不需要
- 删除: python/ (226 files, 2.0M) — Python 绑定,竞赛不需要
- 删除: libcudacxx/{test,benchmarks,codegen,cmake,share} (4432 files, 31M)
  保留: libcudacxx/include/ (1463 headers, cuda::std 编译依赖)
- 新增: c2h/ (27 files) — CUB Catch2 测试辅助头文件,编译 243 个测试必需
- 新增: cmake/ (29 files) — CCCL 原生 CMake 构建系统
- 新增: thrust/examples/cuda/ (7 files) + cpp_integration/ (1 file)
  async_reduce, custom_temporary_allocation, explicit_cuda_stream,
  global_device_vector, range_view, unwrap_pointer, wrap_pointer, device

结果: cccl_upstream 从 74M→35M (瘦身 53%), 核心内容 100% 保留:
  27/27 tuning headers, 78 benchmarks, 243 tests,
  60 thrust examples, 18 CUB examples, 全部编译头文件
This commit is contained in:
muh-bot
2026-08-03 12:39:26 +00:00
parent a2a5dd8f00
commit 24ef6a91b5
5439 changed files with 0 additions and 719516 deletions

View File

@@ -1,65 +0,0 @@
# Including this file defines the following targets:
#
# cudax.compiler_interface
# - Interface target that includes all compiler settings for cudax tests, etc.
cccl_get_cub()
cccl_get_cudax()
cccl_get_libcudacxx()
cccl_get_thrust()
set(cuda_compile_options)
set(cxx_compile_options)
set(cxx_compile_definitions)
if ("MSVC" STREQUAL "${CMAKE_CXX_COMPILER_ID}")
# C4848: support for attribute 'msvc::no_unique_address' in C++17 and earlier is a vendor extension
append_option_if_available("/wd4848" cxx_compile_options)
# XXX Temporary hack for STF !
# C4267: conversion from 'meow' to 'purr', possible loss of data
append_option_if_available("/wd4267" cxx_compile_options)
# C4459 : declaration of 'identifier' hides global declaration
# We work around std::chrono::last which hides some internal "last" variable
append_option_if_available("/wd4459" cxx_compile_options)
# stf used getenv which is potentially unsafe but not in our context
list(APPEND cxx_compile_definitions "_CRT_SECURE_NO_WARNINGS")
endif()
if ("Clang" STREQUAL "${CMAKE_CXX_COMPILER_ID}")
# stf heavily uses host device lambdas which break on clang due to a warning about the implicitly
# deleted copy constructor
# TODO(bgruber): remove this when NVBug 4980157 is resolved
append_option_if_available("-Wno-deprecated-copy" cxx_compile_options)
endif()
list(APPEND cxx_compile_definitions CCCL_ENABLE_ASSERTIONS)
# Some groups related experimental code is located directly in libcu++ and is guarded by
# _CUDAX_ENABLE_GROUP_FEATURES_IN_LIBCUDACXX macro, otherwise it would lead to a lot of code duplication. We define this
# macro for cudax code globally, to get access to get access to the code.
#
# Can be removed once groups are no longer experimental.
list(APPEND cxx_compile_definitions _CUDAX_ENABLE_GROUP_FEATURES_IN_LIBCUDACXX)
cccl_build_compiler_interface(
cudax.compiler_flags
"${cuda_compile_options}"
"${cxx_compile_options}"
"${cxx_compile_definitions}"
)
add_library(cudax.compiler_interface INTERFACE)
target_link_libraries(
cudax.compiler_interface
INTERFACE
# order matters here, we need the cudax options to override the cccl options.
cccl.compiler_interface
cudax.compiler_flags
libcudacxx::libcudacxx
CUB::CUB
Thrust::Thrust
cudax::cudax
)