Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMake presets to RAPIDS repositories #52

Open
vyasr opened this issue Apr 22, 2024 · 0 comments
Open

Add CMake presets to RAPIDS repositories #52

vyasr opened this issue Apr 22, 2024 · 0 comments

Comments

@vyasr
Copy link
Contributor

vyasr commented Apr 22, 2024

CMake 3.19 added support for presets, a way to share common build configurations.
While options provide a way to configure a build, they are often too granular for users to know exactly what they want when building.
Presets provide a way to group options, environment variables, and other settings such that users are required to know less.
A major reason why RAPIDS repositories offer build.sh scripts is because direct CMake configuration was (at least at one point) viewed as something users compiling libraries shouldn't have to be able to do themselves.
Presets help lower this barrier substantially; rather than invoking ccmake and having to look at every option individually, users can instead run cmake --list-presets and get a much smaller set of default configurations that set groups of options that work well together.

RAPIDS packages should look into implementing some common presets.
The first place to look for inspiration is build.sh scripts.
The default sets of flags defined in build.sh should provide a sensible default preset.
Other presets that may be useful include the combinations of options specified when building:

  • conda packages
  • pip packages
  • The Java Native Interface for cudf
  • The Rust interface for raft
  • The C library interface for cugraph
  • devcontainers (or more generally, local builds for development)

Note that in the case of pip packages, this will likely involve two steps: first, we must define presets for the C++ library when it is being built for the Python package, and then we must define presets in the Python CMakeLists that set appropriate options on the Python side.
Presets can include other presets, so combining presets in a suitable way should pose no issues.

In an ideal scenario, we would be able to use presets to almost completely replace any custom logic in build.sh scripts, devcontainer build scripts, and other custom build scripts stored in places like the spark-rapids-jni.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant