-
Notifications
You must be signed in to change notification settings - Fork 283
Closed
Labels
infrastructureShared CMake, github, etc infrastructureShared CMake, github, etc infrastructure
Description
General
- Bump minimum CMake version for developer build to 3.21. Enables
cmake_pathand other QoL fixes. Does not affect user packages (CPM,find_package, andadd_subdirectoryusecases are unaffected and remain at 3.15). - Write CCCL monorepo top layer CMakeLists.txt.
- Update subproject minimum CMake version for developer builds.
- Enable
TOPLEVELsubproject logic when using when included from CCCL monorepo builds. - Verify/update subproject install rules.
- Verify/update subproject CMake package configs.
- Update user docs to reflect changes to configuration options.
Use native CMake support for CUDA:
- Remove nvc++ hacks from Thrust/CUB CMake implementation
- Rewrite architecture logic to use
CMAKE_CUDA_ARCHITECTURESinstead of per-arch boolean options. - Update logic for setting architectures on RDC vs non-RDC builds.
- Set CUDA architecture and RDC state using per-target properties, rather than directory-wide modifications to
CMAKE_CUDA_FLAGS. - Replace the existing RDC enable/disable options with
${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
- Create
cccl-config.cmakeandcccl-config-version.cmakein${CCCL_SOURCE_DIR}/share/cmake/cccl/ - Implement semantic version checks.
- Install the CCCL CMake package to
${CMAKE_INSTALL_LIBDIR}/cmake/cccl -
find_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
- Add automated tests for validating
find_package(CCCL [COMPONENTS Thrust|CUB|libcudacxx])for both installed CCCL and the source repo. - Add automated tests for validating
find_package(Thrust|CUB|libcudacxx)for both installed CCCL and the source repo. - Add automated tests for validating
add_subdirectoryusecase for CCCL and all subprojects, source tree only. - Add automated tests for validating the
CCCL_(REQUIRED|OPTIONAL)_COMPONENTSoptions foradd_subdirectory.
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_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
- Update THRUST_MULTICONFIG_ENABLE_DIALECT_CPPXX to be a list #97
- Update libcudacxx dependency to always require the same version as Thrust
Tasks
- Update libcudacxx dependency to always require the same version as CUB
Metadata
Metadata
Assignees
Labels
infrastructureShared CMake, github, etc infrastructureShared CMake, github, etc infrastructure
Type
Projects
Status
Done