General
Use native CMake support for CUDA:
CMake Package Implementation
CMake Package Testing
Next Steps
After the monorepo is in place, the following tasks are worth considering:
- Explore costs/benefits of using rapids-cmake across all projects.
- Move shared infra to the CCCL repo (Thrust/CUB have a lot of redundant CMake infra).
- Move Thrust/CUB/libcudacxx cmake packages into the same location as the CCCL package.
- Further CDP/RDC cleanup --
FORCE_RDC should be able to build with RDC on all arches, but the CDP tests require restricted arches. This will also involve updating our CUDA/C++ implementations.
Thrust
Tasks
General
cmake_pathand other QoL fixes. Does not affect user packages (CPM,find_package, andadd_subdirectoryusecases are unaffected and remain at 3.15).TOPLEVELsubproject logic when using when included from CCCL monorepo builds.Use native CMake support for CUDA:
CMAKE_CUDA_ARCHITECTURESinstead of per-arch boolean options.CMAKE_CUDA_FLAGS.${PROJ}_ENABLE_RDC_TESTS(enables tests/examples that require RDC) and${PROJ}_FORCE_RDC(Enable RDC for all targets, except those that explicit test RDC=off).CMake Package Implementation
cccl-config.cmakeandcccl-config-version.cmakein${CCCL_SOURCE_DIR}/share/cmake/cccl/${CMAKE_INSTALL_LIBDIR}/cmake/ccclfind_package(CCCL)finds all subprojects using existing subproject infrastructure.find_package(CCCL COMPONENTS [Thrust] [CUB] [libcudacxx])only loads requested components and their dependencies using existing subproject infrastructure.add_subdirectory(${CCCL_SOURCE_DIR})is effectively identical tofind_package(CCCL)for users.CCCL_REQUIRED_COMPONENTSandCCCL_OPTIONAL_COMPONENTSvariables equivalent to theCOMPONENToptions infind_package.add_subdirectorywill continue to work directly on subproject directories (i.e.add_subdirectory(${CCCL_SOURCE_DIR}/thrust)is equivalent tofind_package(CCCL COMPONENT Thrust)). This will reuse existing infrastructure.find_package(Thrust|CUB|libcudacxx)will continue to work using existing infrastructure.CMake Package Testing
find_package(CCCL [COMPONENTS Thrust|CUB|libcudacxx])for both installed CCCL and the source repo.find_package(Thrust|CUB|libcudacxx)for both installed CCCL and the source repo.add_subdirectoryusecase for CCCL and all subprojects, source tree only.CCCL_(REQUIRED|OPTIONAL)_COMPONENTSoptions foradd_subdirectory.Next Steps
After the monorepo is in place, the following tasks are worth considering:
FORCE_RDCshould be able to build with RDC on all arches, but the CDP tests require restricted arches. This will also involve updating our CUDA/C++ implementations.Thrust
Tasks