jorisvandenbossche commented on code in PR #43590:
URL: https://github.com/apache/arrow/pull/43590#discussion_r1768909175
##########
python/pyarrow/tests/test_io.py:
##########
@@ -710,6 +710,15 @@ def test_non_cpu_buffer(pickle_module):
# Sliced buffers with same address
assert buf_on_gpu_sliced.equals(cuda_buf[2:4])
+ # Testing copying buffer
+ mm = ctx.memory_manager
+ for dest in [mm, mm.device]:
+ buf2 = cuda_buf.copy(dest)
+ cuda_buf2 = cuda.CudaBuffer.from_buffer(buf2)
+ assert cuda_buf2.size == cuda_buf.size
+ assert cuda_buf2.copy_to_host()[:] == b'testing'
Review Comment:
```suggestion
assert cuda_buf2..to_pybytes() == b'testing'
```
(shouldn't matter in practice, but just to use the same method for verifying
the result as above)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]