-
Notifications
You must be signed in to change notification settings - Fork 157
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
Have Cython methods accept pylibcudf.Column instead of cudf._lib.column.Column #1514
Merged
rapids-bot
merged 2 commits into
rapidsai:branch-25.02
from
mroeschke:ref/cudf/via_pylibcudf
Jan 23, 2025
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can these just be imported as Column?
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.
We'll have a namespace shadowing issue because we need
cudf.core.column.Column
(for the output) andpylibcudf.Column
(to type these inputs). I decided to aliaspylibcudf.Column
toplc_Column
, but happy to use another alias if you'd likeThere 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.
Why are we mixing the use of cudf column and pylibcudf column here?
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.
The primary motivation of this PR is based on removing
cudf._lib
in favor of pylibcudf rapidsai/cudf#17317, socudf._lib.column.Column
is going away. The libcudf-like APIs (mainly accessing acolumn_view
in cuspatial) will now be available onpylibcudf.Column
, but to be compatible with cudf Python APIs we still need to return a cudf Python column.We also have to do this
cudf column -> pylibcudf column -> cudf column
conversion currently in cudf itself before calling a Cythonized function. Potentially one of these days if we can connect a cudf column to a pylibcudf column via subclass or make cudf work entirely with pylibcudf columns, then we could avoid this conversionThere 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.
Yes, in an ideal world I'd like to see if we can implement most of the features with just pylibcudf and not having to do the round trip. I think the strong typing in cython functions without any supports of protocol / duck typing makes that a bit harder to achieve that. However, I wonder if cuspatial has a smaller API surface that can help make directly using pylibcudf a bit easier?
As always, thanks for consistent work on removing cudf internals in cuspatial!
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.
Yes definitely. I could do a follow up PR to move the
pylibcudf column -> cudf column
conversion from the Cython layer to the Python layer. (I could have done that in this PR but there would have been more visual noise)