You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CUstream does not compare when the underlying pointer is the same #465
> assert other_stream.handle == stream.handle
E assert <CUstream 0x559c33ea2e20> == <CUstream 0x559c33ea2e20>
E + where <CUstream 0x559c33ea2e20> = <cuda.core.experimental._stream.Stream object at 0x7fd4dd21e1d0>.handle
E + and <CUstream 0x559c33ea2e20> = <cuda.core.experimental._stream.Stream object at 0x7fd4de7b7f40>.handle
tests/test_stream.py:93: AssertionError
changed the title [-]`CUstream` does not compare equal to itself[/-][+]`CUstream` does not compare when the underlying pointer is the same[/+]on Feb 24, 2025
We will continue to compare the handles. We will document that using stream_ref member functions is UB past the lifetime of the stream with an exception for .get() which will always work. I will also add the stream ID getter to stream_ref and check with RMM if that is sufficient
Activity
[-]`CUstream` does not compare equal to itself[/-][+]`CUstream` does not compare when the underlying pointer is the same[/+]leofang commentedon Jul 2, 2025
@pciolkosz I left the meeting early today. What's the conclusion regarding stream's
operator==behavior?pciolkosz commentedon Jul 2, 2025
We will continue to compare the handles. We will document that using
stream_refmember functions is UB past the lifetime of the stream with an exception for.get()which will always work. I will also add the stream ID getter tostream_refand check with RMM if that is sufficientleofang commentedon Jul 2, 2025
Thanks, Piotr! Just wanna make sure I understand it correctly, by handle we meant
CUstreamaddress instead of its unique ID, right?pciolkosz commentedon Jul 2, 2025
Yes, that's correct.