AlenkaF commented on code in PR #41889:
URL: https://github.com/apache/arrow/pull/41889#discussion_r1636435281


##########
python/pyarrow/tests/test_cuda.py:
##########
@@ -313,7 +313,8 @@ def test_CudaBuffer(size):
         assert cbuf[s].to_pybytes() == arr[s].tobytes()
 
     sbuf = cbuf.slice(size//4, size//2)
-    assert sbuf.parent == cbuf
+    cbuf_parent = cuda.CudaBuffer.from_buffer(sbuf.parent)
+    assert cbuf_parent.to_pybytes() == cbuf.to_pybytes()

Review Comment:
   Oh, I think I know.
   
   If I compared buffers coming out from the same memory location the `equals` 
method worked (for example sliced pyarrow Buffer on gpu and sliced CUDA buffer 
from which the pyarrow Buffer was created, or the example in the cuda test). 
But if I compared buffers on gpu but on a different memory location, it failed.
   
   Not sure it makes sense - will add a repr (working on it).



-- 
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]

Reply via email to