Skip to content

Commit 805b254

Browse files
Add __cuda_stream__ protocol to driver.CUStream class (#1225) (#1275)
Co-authored-by: Keith Kraus <keith.j.kraus@gmail.com>
1 parent 3760194 commit 805b254

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cuda_bindings/cuda/bindings/driver.pyx.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6908,8 +6908,11 @@ cdef class CUstream:
69086908
return <void_ptr>self._pvt_ptr[0]
69096909
def getPtr(self):
69106910
return <void_ptr>self._pvt_ptr
6911+
def __cuda_stream__(self):
6912+
return (0, <uintptr_t><void_ptr>(self._pvt_ptr[0]))
69116913
{{endif}}
69126914

6915+
69136916
{{if 'CUgraphicsResource' in found_types}}
69146917

69156918
cdef class CUgraphicsResource:

0 commit comments

Comments
 (0)