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
Fix MemoryAsync to keep a weakref to stream #5264
Conversation
pfnCI, test this please. |
cc/ @leofang |
Jenkins CI test (for commit cd88bce, target branch master) succeeded! |
cd88bce
to
761f174
Compare
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! Just left a nitpick.
It is weird that I cannot reproduce any errors or segfaults on my side... I thought the ok_errors are enough to handle the stream lifetime issue 🤔
Jenkins, test this please |
Co-authored-by: Leo Fang <leofang@bnl.gov>
pfnCI, test this please. |
Jenkins CI test (for commit 769d4e5, target branch master) succeeded! |
Fix MemoryAsync to keep a weakref to stream
Currently MemoryAsync is holding a pointer to the stream, but this is unsafe because:
cudaStreamCreate(&x); cudaStreamDestroy(x); cudaStreamCreate(&y) // x != y is not guaranteed
)ref: #4592