Replace Python scalar conversions with libcudf#14124
Merged
rapids-bot[bot] merged 7 commits intorapidsai:branch-23.10from Sep 25, 2023
Merged
Replace Python scalar conversions with libcudf#14124rapids-bot[bot] merged 7 commits intorapidsai:branch-23.10from
rapids-bot[bot] merged 7 commits intorapidsai:branch-23.10from
Conversation
Contributor
Author
|
C++ codeowners (@mythrocks and @bdice are requested), please disregard review requests on this PR. This PR depends on #14121 and should not be merged until after it. However, it can be reviewed now for Python changes. All the C++ changes will be merged as part of the other PR. Python reviewers can go ahead and review this PR as is, just ignore all changes to the cpp/ directory. Also, I wouldn't be too concerned about the exact interface boundaries in this implementation, especially between DeviceScalar and the interop functions. Those will be changing in the follow-up PR anyway. This PR's primary focus is the removal of all the Cython code for scalar initialization since that can now be done using libcudf. |
d4821f2 to
b8f0669
Compare
3 tasks
b8f0669 to
0fcee57
Compare
brandon-b-miller
approved these changes
Sep 25, 2023
Contributor
Author
|
/merge |
rapids-bot bot
pushed a commit
that referenced
this pull request
Oct 6, 2023
This PR adds a new Scalar object to pylibcudf that will function as the pylibcudf equivalent of cudf::scalar. Unlike columns, which are typically operated on in the form of views rather than owning types by libcudf, owning scalars are accepted by (const) ref by libcudf APIs and no corresponding view type exists. Therefore, pylibcudf.Scalar differs from pylibcudf.Column by actually owning an instance of the underlying libcudf type (cudf::scalar). Construction of pylibcudf Scalars is expected to be done from an Arrow scalar. This PR relies on #14124 and should not be merged until after that one. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Lawrence Mitchell (https://github.com/wence-) URL: #14133
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR replaces the various Cython converters for different libcudf scalar types by using the new libcudf
[to|from]_arrowoverloads for scalars introduced in #14121. This change dramatically simplifies the Cython code and paves the way for implementation of a pylibcudf.Scalar object.Checklist