-
Notifications
You must be signed in to change notification settings - Fork 915
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
Rollback of DeviceBufferLike
#12009
Rollback of DeviceBufferLike
#12009
Conversation
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.
Some small questions to address before we finalize this.
…uffer_like_rollback
Thanks for the review @vyasr. I think it is a good idea to use the This also enables |
Codecov ReportBase: 88.09% // Head: 86.86% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## branch-22.12 #12009 +/- ##
================================================
- Coverage 88.09% 86.86% -1.24%
================================================
Files 133 135 +2
Lines 21982 21985 +3
================================================
- Hits 19366 19097 -269
- Misses 2616 2888 +272
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
…uffer_like_rollback
The "constructor-kwargs" is removed in rapidsai/cudf#12009
The "constructor-kwargs" is removed in rapidsai/cudf#12009
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.
One small suggestion, otherwise LGTM!
T = TypeVar("T", bound="Buffer") | ||
|
||
|
||
def cuda_array_interface_wrapper(ptr: int, size: int, owner: object = None): |
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.
Maybe out of scope for this PR, but we use the SimpleNamespace.__cuda_array_interface__
trick in multiple other places as well (mostly in column
code IIRC) and I wonder if we could use the same helper function in multiple places. It's not immediately obvious why one would create this object so having all the places that do so call to a single, well-documented helper function could be nice. Happy to push that to a downstream refactoring PR though.
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.
Done
@gpucibot merge |
The "constructor-kwargs" is being removed in rapidsai/cudf#12009 Authors: - Mads R. B. Kristensen (https://github.com/madsbk) Approvers: - Dante Gama Dessavre (https://github.com/dantegd) URL: #4965
Support the new `Buffer` in rapidsai/cudf#12009 Fixes #1032 Authors: - Mads R. B. Kristensen (https://github.com/madsbk) Approvers: - Peter Andreas Entschev (https://github.com/pentschev) URL: #1033
The "constructor-kwargs" is being removed in rapidsai/cudf#12009 Authors: - Mads R. B. Kristensen (https://github.com/madsbk) Approvers: - Dante Gama Dessavre (https://github.com/dantegd) URL: rapidsai#4965
This PR replaces
DeviceBufferLike
withBuffer
and clear the way for a spillable sub-class ofBuffer
.Context
The introduction of the
DeviceBufferLike
protocol was motivated by the spilling work, which we initially thought would have to be implemented in Cython. However, it can be done in pure Python, which makesDeviceBufferLike
an unneeded complexity.Review notes
as_buffer()
, to create Buffers.buffer.py
is moved into the submodulecore.buffer
to ease organization when adding the spillable-buffer and spilling manager.Breaking
This PR breaks external use of
Buffer
e.g.Buffer.__init__
raise an exception now and the"constructor-kwargs"
header from #4164 has been removed.Submitted a PR to fix this in cuml: rapidsai/cuml#4965
Checklist
cc. @shwina @vyasr