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