Skip to content

CUstream does not compare when the underlying pointer is the same #465

Closed

Description

@leofang

See CI failure: https://github.com/NVIDIA/cuda-python/actions/runs/13488648820/job/37683655417?pr=463#step:18:264

>       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

Activity

  1. added
    bugSomething isn't working
    cuda.bindingsEverything related to the cuda.bindings module
    triageNeeds the team's attention
    on Feb 24, 2025
  2. 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
  3. added
    enhancementAny code-related improvements
    and removed
    triageNeeds the team's attention
    on Apr 23, 2025
  4. removed their assignment
    on Apr 29, 2025
  5. assigned and unassigned on Jun 13, 2025
  6. added
    P1Medium priority - Should do
    on Jul 2, 2025
  7. leofang commented on Jul 2, 2025

    @leofang
    MemberAuthor

    @pciolkosz I left the meeting early today. What's the conclusion regarding stream's operator== behavior?

  8. pciolkosz commented on Jul 2, 2025

    @pciolkosz

    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

  9. leofang commented on Jul 2, 2025

    @leofang
    MemberAuthor

    Thanks, Piotr! Just wanna make sure I understand it correctly, by handle we meant CUstream address instead of its unique ID, right?

  10. pciolkosz commented on Jul 2, 2025

    @pciolkosz

    Yes, that's correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1Medium priority - Should dobugSomething isn't workingcuda.bindingsEverything related to the cuda.bindings moduleenhancementAny code-related improvements

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions