-
Notifications
You must be signed in to change notification settings - Fork 198
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
[REVIEW] Add a public copy
API to DeviceBuffer
#1128
[REVIEW] Add a public copy
API to DeviceBuffer
#1128
Conversation
It might be worth thinking about implementing or using the |
In general, the SciPy/PyData ecosystem seems to have shied away from this model, instead providing explicit |
Interestingly, NumPy defines both: https://numpy.org/doc/stable/reference/generated/numpy.ndarray.__deepcopy__.html I don’t have strong feelings here. Just wanted to mention that that object model exists, in case someone wants to use Python’s copy module to (deep) copy an arbitrary object containing a DeviceBuffer. |
I suppose we could follow suit and implement |
Added a |
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.
Looks good, just some minor clarifications about deep/shallow copying before I approve.
Co-authored-by: Bradley Dice <[email protected]>
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, one minor question.
Co-authored-by: Bradley Dice <[email protected]>
@gpucibot merge |
Description
This PR adds a public
copy
API toDeviceBuffer
, this is required for the ongoingcopy-on-write
work in rapidsai/cudf#11718Checklist