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

Function test_table_deserialize

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

Source from the content-addressed store, hash-verified

773
774
775def test_table_deserialize():
776 # ARROW-9659: make sure that we can deserialize a GPU-located table
777 # without crashing when initializing or validating the underlying arrays.
778 hbuf, htable, dbuf, dtable = make_table_cuda()
779 # Assert basic fields the same between host and device tables
780 assert htable.schema == dtable.schema
781 assert htable.num_rows == dtable.num_rows
782 assert htable.num_columns == dtable.num_columns
783 # Assert byte-level equality
784 assert hbuf.equals(dbuf.copy_to_host())
785 # Copy DtoH and assert the tables are still equivalent
786 assert htable.equals(pa.ipc.open_stream(
787 dbuf.copy_to_host()
788 ).read_all())
789
790
791def 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