-
Notifications
You must be signed in to change notification settings - Fork 96
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
Use RMM's DeviceBuffer
directly
#235
Conversation
This should bypass some overhead from Numba when constructing objects on the device.
Try to use the object's own `copy_to_host` if available. Otherwise fallback to coercing the object into a Numba `DeviceNDArray` and call `copy_to_host` on it.
@pentschev, what sorts of data does |
@jakirkham thanks for working on this.
The Also, it seems that tests are failing on deserialization. |
Thanks Peter! 😄 Alright will take a closer look at that. Thanks 🙂 Indeed. It looks like RMM 0.12.0 is being pulled in instead of the nightly. Not sure why that is. Do you know? (Edit: Asked ops offline) |
rerun tests |
Ok looks like RMM nightlies are now getting picked up. The remaining errors are legitimate will take a look at fixing these and update after. |
Before sending the data to device, make sure to flatten it and cast it as `uint8` so we can build a `DeviceBuffer` of it. From there we can handle the remaining deserialization steps.
Codecov Report
@@ Coverage Diff @@
## branch-0.13 #235 +/- ##
===============================================
+ Coverage 75.83% 75.93% +0.10%
===============================================
Files 14 14
Lines 960 964 +4
===============================================
+ Hits 728 732 +4
Misses 232 232 Continue to review full report at Codecov.
|
Think I've fixed the CI issues. Could you please take another look, @pentschev? 🙂 |
LGTM, thanks @jakirkham for the PR! |
This makes use of
to_device
andcopy_to_host
methods added toDeviceBuffer
recently in PR ( rapidsai/rmm#268 ) to directly create and copy data into RMM or serialize from RMM back to host.