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 initial cupyx.spatial.distance support from pylibraft #6690
Conversation
I think the current functionality is enough for this PR. |
@emcastillo sounds great. I'll do that |
This PR depends upon the changes in rapidsai/raft#643 (which should be merged shortly). |
@emcastillo, one thing I've noticed is that I don't believe pylibcugraph is being tested in CuPy's CI. At least I don't think it is, because I don't see it listed in any dependencies in the build so I'm assuming those tests are getting skipped. It would be nice if we could run the tests for pylibraft and I think we might be safe installing it since I don't believe any of the RAFT python artifacts have any dependency on cupy. I suppose we could either just install it as a test or runtime dependency but I think that will depend on whether the sizes of dependent artifacts are a concern. What are your thoughts here? |
We will try to add |
seems like it is installed in CI rapids configuration? https://ci.preferred.jp/cupy.linux.cuda-rapids/101331/ Need to add |
We intend to test CuPy code depending on RAPIDS in
These are separated from regular unit tests (which are based on pip) as RAPIDS installation requires conda. CI can be triggered in pull-requests using |
/test mini, rapids |
/test mini |
/test mini |
/test rapids |
/test mini,rapids |
/test mini, rapids |
/test mini, rapids |
@emcastillo we're working on the fix for the RAPIDS core-devel container build and then this should be ready. |
Depends on PR ( rapidsai/raft#714 ) |
/test rapids |
/test rapids |
@emcastillo @kmaehashi looks like the RAPIDS tests are finally running (and passing!). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks all! 🙏 Looking forward to using these 😄 |
Yes, thanks again @emcastillo @kmaehashi and @leofang. As requested by @emcastillo, We'll continue opening smaller PRs to continue to fill in the API support now that we've got the integration path working end-to-end. |
This is an initial PR to establish integration of pylibraft within cupy. For now, the intention is to use RAFT for supported distances and types and cupy kernels for other distances and types until we support them in RAFT. This provides us a path to make use of what's available and then continue optimizing RAFT underneath, allowing cupy to reap the benefits immediately.
This is really just a start in the direction of backing the entire cupyx.scipy.spatial package with RAFT, as well as the cupyx.scipy.cluster and cupyx.scipy.optimize packages (and potentially cupyx.scipy.stats / cupyx.scipy.qmc in the future).
Tasks: