Skip to content
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

Add dask serialization of CUDA objects #3482

Merged
merged 9 commits into from
Feb 19, 2020

Conversation

jakirkham
Copy link
Member

@jakirkham jakirkham commented Feb 15, 2020

This implements "dask" serialization for CUDA objects. All serializers work by first performing "cuda" serialization on the different objects and then performing a device-to-host transfer. The deserializers perform a host-to-device transfer before running the respective "cuda" deserializer for the object considered. Should provide an alternative way to do TCP transfers with CUDA objects that does not rely on pickling.

Note: Just like with UCX transfers, we preferentially add objects to the RMM pool if RMM is available. Otherwise we fallback to using Numba.

This should make room for Dask serializers to also be specified and
added.
To make TCP a bit more performant with RMM, provide Dask serializers to
allow going to and from host memory.
@mrocklin
Copy link
Member

Thanks @jakirkham ! For testing, what do you think about calling serialize on a few objects, like a cupy array, and verifying that some of the frames are memoryview objects?

@jakirkham
Copy link
Member Author

Yep, agree this needs some tests. Those sound like reasonable suggestions. Will work on those and update when they are up. Thanks Matt! 😄

To make sure that different CUDA objects can use different serialization
protocols, test with each one individual and ensure it completes. In
particular test both "cuda" and "dask". Where supported also test
"pickle", but skip it when it is not (like with Numba).
To make sure Dask can handle transmission of the frames serialized, test
they match the type expected by the protocol used. With "cuda" ensure we
get something that supports `__cuda_array_interface__`. With "dask" make
sure we get a `memoryview`.
@jakirkham jakirkham force-pushed the add_dask_cuda_serializers branch from e8ec4c6 to f73b614 Compare February 18, 2020 03:28
@jakirkham
Copy link
Member Author

Have parametrized tests around serializers so this tests cuda, dask, and pickle (where possible). Also have tested that frames are acceptable. Please let me know if there is anything else. 🙂

Planning on merging in 24hrs if no comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants