-
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
Add support for streams in CuPy allocator #654
Add support for streams in CuPy allocator #654
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.
Minor fix, otherwise LGTM
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.
Requesting changes to block merging until the stream reference is added to maintain lifetime
While looking for stream lifetime management in Numba I stumbled upon https://github.com/numba/numba/blob/0bac18af44d08e913cd512babb9f9b7f6386d30a/numba/cuda/cudadrv/driver.py#L1834-L1836 which allowed me to simplify |
cc @gmarkall |
Co-authored-by: Mark Harris <mharris@nvidia.com>
Sorry everyone for the delay here, I was moving over the past several days and had very limited access to PC. I now updated the PR with the suggested changes, please take some time to review when possible. |
Generally things look good, but would suggest we merge #661 first which handles the Stream lifetime management, and then merge this in on top of it. |
#661 hasn't progressed. So I guess we need to move this to 0.19. |
Agreed, thanks @harrism for keeping track. |
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.
Small suggestion below to simplify some of the casting logic here
rerun tests |
This should be ready for review |
@gpucibot merge |
Thanks Peter for the PR and everyone for the reviews! 😄 |
Thanks everyone for reviews! |
This PR adds support for CuPy streams in
rmm_cupy_allocator
. It works by getting CuPy's current stream and passing that to theDeviceBuffer
constructor.There's also a fix for the casting of CuPy/Numba streams to
cudaStream_t
, it needs to be cast touintptr_t
first, without that the resulting pointer would be wrong and result in a segfault.Depends on #661