kkraus14 commented on code in PR #42221:
URL: https://github.com/apache/arrow/pull/42221#discussion_r1701810729


##########
python/pyarrow/tests/test_cuda.py:
##########
@@ -534,6 +534,25 @@ def put(*args, **kwargs):
             put(position=position, nbytes=nbytes)
 
 
+def test_buffer_device():
+    buf = cuda.new_host_buffer(10)
+    assert buf.device_type == pa.DeviceAllocationType.CUDA_HOST
+    assert isinstance(buf.device, pa.Device)
+    assert isinstance(buf.memory_manager, pa.MemoryManager)
+    assert buf.is_cpu
+    assert buf.device.is_cpu
+    assert buf.device == pa.default_cpu_memory_manager().device

Review Comment:
   Yes, it's a problem in general. I would argue the entire `is_cpu` method and 
concept is generally broken, but that's obviously a much bigger chunk of work 
and a can of worms we probably don't want to open now.



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