Skip to content

Commit b1a6baf

Browse files
authored
Add __cuda_stream__ protocol to driver.CUStream class (#1225)
1 parent 2cf7971 commit b1a6baf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cuda_bindings/cuda/bindings/driver.pyx.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7101,8 +7101,11 @@ cdef class CUstream:
71017101
return <void_ptr>self._pvt_ptr[0]
71027102
def getPtr(self):
71037103
return <void_ptr>self._pvt_ptr
7104+
def __cuda_stream__(self):
7105+
return (0, <uintptr_t><void_ptr>(self._pvt_ptr[0]))
71047106
{{endif}}
71057107

7108+
71067109
{{if 'CUgraphicsResource' in found_types}}
71077110

71087111
cdef class CUgraphicsResource:

0 commit comments

Comments
 (0)