Skip to content

Commit df71f24

Browse files
committed
Move comment
1 parent 8a05be3 commit df71f24

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

cuda_core/cuda/core/experimental/_memoryview.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ cdef StridedMemoryView view_as_dlpack(obj, stream_ptr, view=None):
213213
cdef StridedMemoryView buf = StridedMemoryView() if view is None else view
214214
buf.ptr = <intptr_t>(dl_tensor.data)
215215

216-
# Construct shape and strides tuples using the Python/C API for speed
217216
buf.shape = cuda_utils.carray_int64_t_to_tuple(dl_tensor.shape, dl_tensor.ndim)
218217
if dl_tensor.strides:
219218
buf.strides = cuda_utils.carray_int64_t_to_tuple(dl_tensor.strides, dl_tensor.ndim)

cuda_core/cuda/core/experimental/_utils/cuda_utils.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ cpdef check_or_create_options(type cls, options, str options_description=*, bint
1414

1515

1616
cdef inline tuple carray_int64_t_to_tuple(libc.stdint.int64_t *ptr, int length):
17+
# Construct shape and strides tuples using the Python/C API for speed
1718
result = cpython.PyTuple_New(length)
1819
for i in range(length):
1920
cpython.PyTuple_SET_ITEM(result, i, cpython.PyLong_FromLongLong(ptr[i]))

0 commit comments

Comments
 (0)