Skip to content

Commit 11a1656

Browse files
committed
Adapt Python stream access to cuda::stream_ref
1 parent 9348de5 commit 11a1656

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

python/rapidsmpf/rapidsmpf/memory/buffer_resource.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ cdef class BufferResource:
595595
If ``size`` exceeds the reservation size.
596596
"""
597597
cdef unique_ptr[cpp_Buffer] handle
598-
cdef stream_ref cpp_stream = stream_ref(stream.view().get())
598+
cdef stream_ref cpp_stream = stream.view()
599599
with nogil:
600600
handle = move(
601601
deref(self._handle).make_buffer(

python/rapidsmpf/rapidsmpf/memory/packed_data.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ cdef class PackedData:
201201
cdef const uint8_t* meta_ptr = NULL
202202
if meta_size > 0:
203203
meta_ptr = <const uint8_t*>&metadata[0]
204-
cdef stream_ref sv = stream_ref(stream.view().get())
204+
cdef stream_ref sv = stream.view()
205205
cdef unique_ptr[device_buffer] gpu = move(gpu_data.c_obj)
206206
cdef PackedData ret = cls.__new__(cls)
207207
with nogil:

python/rapidsmpf/rapidsmpf/memory/pinned_memory_resource.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ cdef class PinnedMemoryResource:
145145
Integer address of the allocated memory.
146146
"""
147147
cdef void* ptr
148-
cdef stream_ref cpp_stream = stream_ref(stream.view().get())
148+
cdef stream_ref cpp_stream = stream.view()
149149
with nogil:
150150
ptr = self._handle.value().allocate(cpp_stream, nbytes)
151151
return <size_t>ptr
@@ -163,7 +163,7 @@ cdef class PinnedMemoryResource:
163163
stream
164164
CUDA stream associated with the allocation.
165165
"""
166-
cdef stream_ref cpp_stream = stream_ref(stream.view().get())
166+
cdef stream_ref cpp_stream = stream.view()
167167
with nogil:
168168
self._handle.value().deallocate(cpp_stream, <void*>ptr, nbytes)
169169

0 commit comments

Comments
 (0)