MCPcopy Create free account
hub / github.com/apache/arrow / test_table_deserialize

Function test_table_deserialize

python/pyarrow/tests/test_cuda.py:767–780  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

765
766
767def test_table_deserialize():
768 # ARROW-9659: make sure that we can deserialize a GPU-located table
769 # without crashing when initializing or validating the underlying arrays.
770 hbuf, htable, dbuf, dtable = make_table_cuda()
771 # Assert basic fields the same between host and device tables
772 assert htable.schema == dtable.schema
773 assert htable.num_rows == dtable.num_rows
774 assert htable.num_columns == dtable.num_columns
775 # Assert byte-level equality
776 assert hbuf.equals(dbuf.copy_to_host())
777 # Copy DtoH and assert the tables are still equivalent
778 assert htable.equals(pa.ipc.open_stream(
779 dbuf.copy_to_host()
780 ).read_all())
781
782
783def test_create_table_with_device_buffers():

Callers

nothing calls this directly

Calls 2

make_table_cudaFunction · 0.85
equalsMethod · 0.80

Tested by

no test coverage detected