Skip to content

Conversation

@pwrliang
Copy link
Contributor

@pwrliang pwrliang commented Nov 15, 2025

This PR adds a GPU-accelerated spatial join library called libgpuspatial under c/sedona-libgpuspatial/libgpuspatial to support SedonaDB's GPU-acceleration feature. The GPU execution is automatically enabled when available and provides significant performance improvements for large-scale spatial joins. A Rust package called sedona-libgpuspatial for building and using the library is included under c/sedona-libgpuspatial. Currently, there's no GitHub action runner that has a GPU, so we only build the library and tests without actually running them.

@pwrliang pwrliang changed the title feat(c/sedona-libgpuspatial) Add GPU-accelerated spatial joins [WIP] feat(c/sedona-libgpuspatial) Add GPU-accelerated spatial joins Nov 15, 2025
@jiayuasu
Copy link
Member

@pwrliang now the CI is working

Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is amazing! It has been very cool to watch this project evolve over the last six months and I know this represents a huge amount of work.

This is a large change and I wanted to leave a few high-level things to think about while you're polishing this up.

  • I see a bit of commented-out code in some of the files...feel free to file GitHub issues if that code represents a future piece of work that needs doing (and remove the commented-out code)!
  • I see CUDA-specific tests, which are great! If there are portions of the code that aren't well-covered by tests we do need to add them (we can open follow-on issues and do this in follow-up PRs too)
  • Because we're an Apache project we need the licensing and provenance of the files to be clear. I see some copyright notices from Nvidia...there's a place in LICENSE.md to acknowledge subdirectories where code was copied. We also need license headers on all the files (there's a script in scripts/ that can help do mass addition of the license header to a bunch of files at once).
  • It looks like you've done a great job ensuring the casual contributor doesn't have to deal with the GPU build complexity using default-members. That was one of my initial concerns but it looks great so far.

Give me a ping when you're ready for me to take a look!

@pwrliang
Copy link
Contributor Author

This is amazing! It has been very cool to watch this project evolve over the last six months and I know this represents a huge amount of work.

This is a large change and I wanted to leave a few high-level things to think about while you're polishing this up.

  • I see a bit of commented-out code in some of the files...feel free to file GitHub issues if that code represents a future piece of work that needs doing (and remove the commented-out code)!
  • I see CUDA-specific tests, which are great! If there are portions of the code that aren't well-covered by tests we do need to add them (we can open follow-on issues and do this in follow-up PRs too)
  • Because we're an Apache project we need the licensing and provenance of the files to be clear. I see some copyright notices from Nvidia...there's a place in LICENSE.md to acknowledge subdirectories where code was copied. We also need license headers on all the files (there's a script in scripts/ that can help do mass addition of the license header to a bunch of files at once).
  • It looks like you've done a great job ensuring the casual contributor doesn't have to deal with the GPU build complexity using default-members. That was one of my initial concerns but it looks great so far.

Give me a ping when you're ready for me to take a look!

@paleolimbot Hi, Dewey, thanks for your attention. Currently, this PR has resolved the license issues, and can pass almost all of the jobs in the CI. I'd like to hear any suggestions from you. @zhangfengcdt has written the Rust part to hook up sedona-db to libgpuspatial, so the credits for building go to him.

@zhangfengcdt
Copy link
Member

@pwrliang Thanks for opening this PR! As per our discussion, we could break down this large PR into smaller ones to make it manageable and reviewable. Ideally, (1)libgpuspatial (c++ and cuda) with tests (2) gpu spatial join module in rust (3) build pipelines and e2e tests.

Let me know if you can reduce this to only include (1) with the proper cleanup and apache license headers. We can continue (2) and (3) once this one merges. Thanks!

@pwrliang
Copy link
Contributor Author

@pwrliang Thanks for opening this PR! As per our discussion, we could break down this large PR into smaller ones to make it manageable and reviewable. Ideally, (1)libgpuspatial (c++ and cuda) with tests (2) gpu spatial join module in rust (3) build pipelines and e2e tests.

Let me know if you can reduce this to only include (1) with the proper cleanup and apache license headers. We can continue (2) and (3) once this one merges. Thanks!

@zhangfengcdt Hi Feng, I have changed this PR to only keep the libgpuspatial part according to your suggestions. Please take a look.

@pwrliang pwrliang changed the title [WIP] feat(c/sedona-libgpuspatial) Add GPU-accelerated spatial joins [WIP] feat(c/sedona-libgpuspatial) Add GPU-accelerated spatial join library Nov 20, 2025
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

Successfully merging this pull request may close these issues.

4 participants