()
| 781 | |
| 782 | |
| 783 | def test_create_table_with_device_buffers(): |
| 784 | # ARROW-11872: make sure that we can create an Arrow Table from |
| 785 | # GPU-located Arrays without crashing. |
| 786 | hbuf, htable, dbuf, dtable = make_table_cuda() |
| 787 | # Construct a new Table from the device Table |
| 788 | dtable2 = pa.Table.from_arrays(dtable.columns, dtable.column_names) |
| 789 | # Assert basic fields the same between host and device tables |
| 790 | assert htable.schema == dtable2.schema |
| 791 | assert htable.num_rows == dtable2.num_rows |
| 792 | assert htable.num_columns == dtable2.num_columns |
| 793 | # Assert byte-level equality |
| 794 | assert hbuf.equals(dbuf.copy_to_host()) |
| 795 | # Copy DtoH and assert the tables are still equivalent |
| 796 | assert htable.equals(pa.ipc.open_stream( |
| 797 | dbuf.copy_to_host() |
| 798 | ).read_all()) |
| 799 | |
| 800 | |
| 801 | def other_process_for_test_IPC(handle_buffer, expected_arr): |
nothing calls this directly
no test coverage detected