Skip to content

Commit 2c0343f

Browse files
committed
Docs, annotation fixes, remove dlpack export mentions
Signed-off-by: Kamil Tokarski <ktokarski@nvidia.com>
1 parent b74ef2c commit 2c0343f

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

cuda_core/cuda/core/experimental/_memoryview.pyx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ cdef class StridedMemoryView:
5858
Stream ordering will be properly established unless ``-1`` is passed.
5959
6060
61-
.. note::
62-
The StridedMemoryView can be exported with DLPack, in which case
63-
no synchronization is performed. It is the user's responsibility to ensure
64-
the data in ``exporting_obj`` is properly synchronized when consuming the view.
65-
66-
6761
Attributes
6862
-----------
6963
ptr : int
@@ -168,12 +162,12 @@ cdef class StridedMemoryView:
168162
The layout describing the shape, strides and itemsize of the elements in
169163
the buffer.
170164
dtype : :obj:`numpy.dtype`, optional
171-
Optional dtype. The dtype is required for exporting the view with DLPack.
165+
Optional dtype.
172166
If specified, the dtype's itemsize must match the layout's itemsize.
173167
To view the buffer with a different itemsize, please use :meth:`StridedLayout.repacked`
174168
first to transform the layout to the desired itemsize.
175169
is_readonly : bool, optional
176-
Whether the mark the view as readonly. The flag will be forwarded to the DLPack capsule.
170+
Whether the mark the view as readonly.
177171
"""
178172
cdef StridedMemoryView view = StridedMemoryView.__new__(cls)
179173
view_buffer_strided(view, buffer, layout, dtype, is_readonly)
@@ -184,7 +178,7 @@ cdef class StridedMemoryView:
184178
) -> StridedMemoryView:
185179
"""
186180
Creates a new view with adjusted layout and dtype.
187-
Same as calling :meth:`from_buffer` with the current buffer, layout and dtype.
181+
Same as calling :meth:`from_buffer` with the current buffer.
188182
"""
189183
cdef StridedMemoryView view = StridedMemoryView.__new__(self.__class__)
190184
if layout is None and dtype is None:
@@ -198,7 +192,7 @@ cdef class StridedMemoryView:
198192

199193
def copy_from(
200194
self, other : StridedMemoryView, stream : Stream,
201-
allocator : MemoryResource | None = None,
195+
allocator = None,
202196
blocking : bool | None = None,
203197
):
204198
"""
@@ -240,7 +234,7 @@ cdef class StridedMemoryView:
240234

241235
def copy_to(
242236
self, other : StridedMemoryView, stream : Stream | None = None,
243-
allocator : MemoryResource | None = None,
237+
allocator = None,
244238
blocking : bool | None = None,
245239
):
246240
"""

0 commit comments

Comments
 (0)