[FEA] Avoid host-side processing in CSV reader #13797
Labels
0 - Backlog
In queue waiting for assignment
cuIO
cuIO issue
feature request
New feature or request
libcudf
Affects libcudf (C++/CUDA) code.
Performance
Performance related issue
Milestone
As of 23.10, the CSV reader cannot take advantage of kvikIO and GPUDirect Storage due to several processing steps that require the input data to be present in the system memory. These host-side processing steps include:
Decompression (1) is most likely faster on the CPU (not verified) since all data is compressed in a single block. For CSV files with decompression we may choose to decompress on the host side (also see #5142 and #12255). (2) could readily be processed on the device with
thrust::find
and (3) could be accomplished by a single thread kernel. For (4), we can copy the header data from the device and keep the column name parsing code (also see #12582), which avoids keeping input data on the host at the cost of a small D2H copy.High level proposal:
When reading compressed CSV files, read to host and decompress, then wrap the host buffer into a datasource and pass to
load_data_and_gather_row_offsets
. When reading uncompressed input, just forward the source toload_data_and_gather_row_offsets
. There, usedevice_read
to load chunks to device memory. Items (2) and (3) can be done here (BOM skipping is currently outside ofload_data_and_gather_row_offsets
).This approach brings several benefits:
The text was updated successfully, but these errors were encountered: