MAINT: Use RAPIDS 24.10 cmake and scikit-build-core setup#195
MAINT: Use RAPIDS 24.10 cmake and scikit-build-core setup#195seberg merged 4 commits intorapidsai:mainfrom
Conversation
c1cb9f4 to
f2eb602
Compare
pyproject.toml
Outdated
| [tool.rapids-build-backend] | ||
| build-backend = "scikit_build_core.build" | ||
| dependencies-file = "dependencies.yaml" | ||
| commit_files = ["legateboost/GIT_COMMIT"] |
There was a problem hiding this comment.
rapids-build-backend default to adding a GIT_COMMIT file, which is fine. But because the project name legate-boost and the module name legateboost mismatch, we have to add it explicitly (I think).
EDIT: spelled commit-files here of course.
There was a problem hiding this comment.
Yes you're exactly right about this. Here's where that behavior was introduced: rapidsai/rapids-build-backend#30
This changes the setup to align it with the typical setup in 24.10 RAPIDS (and future) using scikit-build-core. `legate` is currently using 24.10 rapids-cmake, so it seems good to keep this in sync. Signed-off-by: Sebastian Berg <[email protected]>
f2eb602 to
25ede7f
Compare
jameslamb
left a comment
There was a problem hiding this comment.
Awesome work!
I totally support this... getting caught up to a newer rapids-cmake and switching to scikit-build-core are really nice changes. It's great to see setup.py deleted 😁
Left a few small comments, but overall I support this. I think we should answer the rapids-cmake-sha question before merging this.
| key: requires | ||
| includes: | ||
| - build | ||
| - build_tools |
There was a problem hiding this comment.
If you want this to look a bit more like other RAPIDS libraries, then by convention these 2 lists would be spelled like this:
py_build_legateboost:
output: pyproject
pyproject_dir: .
extras:
table: build-system
includes:
- rapids_build_skbuild
py_rapids_build_legateboost:
output: pyproject
pyproject_dir: .
extras:
table: tool.rapids-build-backend
key: requires
includes:
- build
- build_toolsThere are some docs on those conventions at https://github.com/rapidsai/build-planning/blob/d9e3c606d95c835ee384ac6480a4af0ac6cb024a/docs/docs/packaging.md#L85
Not critical, but following RAPIDS conventions does make it easier for more other RAPIDS folks to come in and help out on these repos.
| cmake_flags = [ | ||
| f"-Dlegate_ROOT:STRING={legate_dir}", | ||
| f"-DCMAKE_CUDA_ARCHITECTURES={cuda_arch}", | ||
| ] |
There was a problem hiding this comment.
With this removed, will the following still work?
Lines 47 to 52 in ba062bf
It might need to be updated to something like
SKBUILD_CMAKE_ARGS="-DCMAKE_CUDA_ARCHITECTURES='70;80'"Or something similar.
There was a problem hiding this comment.
Good find! Pushing another commit to introduce rapids_cuda_init_architectures(legateboost), that seems like a reasonable thing to me. In legate-raft and legate-dataframe, I did use the "RAPIDS" architectures (but then, they use rapids libraries...)
The difference is that if you just do a plain pip install . RAPIDS seems to default to the "RAPIDS" architectures and not "native".
So there is a slightly unfortunate change, but at least this will keep working (maybe only with the new commit).
There was a problem hiding this comment.
Ah perfect, rapids_cuda_init_architectures() seems like the right way to do this (I did not actually know about that 🙈 )
| # default | ||
| set(rapids-cmake-version 24.08) | ||
| set(rapids-cmake-version 24.10) | ||
| set(rapids-cmake-sha "3cc764f287a6f3caeee5dd1c96c24b1710d4cdf1") |
There was a problem hiding this comment.
I don't know from memory... does the version matter if we're still pinning to a specific commit of rapids-cmake?
I can't tell what version is getting downloaded from the build logs since they're pretty quiet: https://github.com/rapidsai/legate-boost/actions/runs/12374421493/job/34536930592?pr=195
I'd support updating their verbosity. Not sure the right place...maybe PIP INSTALL_ARGS should pick up -v in build.sh? Or maybe we need to set CMake verbosity in scikit-build-core: https://scikit-build-core.readthedocs.io/en/latest/configuration.html#verbosity. Or maybe both?
There was a problem hiding this comment.
I added a lot of verbosity, but I think not in the one command (the first cmake run) that actually matters :).
As far as I can tell, this was not used at all and I removed it. My suspicion would be it was a temporary work-around at some point, but didn't double check.
Signed-off-by: Sebastian Berg <[email protected]>
Signed-off-by: Sebastian Berg <[email protected]>
Signed-off-by: Sebastian Berg <[email protected]>
|
Putting it in, I suppose the build in CI may actually fail because gh-196 is required. I'll ask for a review there (it is trivial). |

This changes the setup to align it with the typical setup in 24.10 RAPIDS (and future) using scikit-build-core.
legateis currently using 24.10 rapids-cmake, so it seems good to keep this in sync.