You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jorisvandenbossche (via GitHub)" <gi...@apache.org> on 2024/09/20 16:42:25 UTC
Re: [PR] GH-43589: [Python] Add bindings for Buffer copy() method to other device [arrow]
jorisvandenbossche commented on code in PR #43590:
URL: https://github.com/apache/arrow/pull/43590#discussion_r1768908101
##########
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)
Review Comment:
```suggestion
buf2 = buf_on_gpu.copy(dest)
```
This test is generally testing with the `buf_on_gpu` object, because it is testing the base class `Buffer` class instances with a non-cpu device (in `test_cuda.py` we are testing `CudaBuffer`).
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org