-
Notifications
You must be signed in to change notification settings - Fork 926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix uninitialized reads in parquet chunked reader #17810
base: branch-25.04
Are you sure you want to change the base?
Fix uninitialized reads in parquet chunked reader #17810
Conversation
I would be concerned about any performance impact this my incur. |
That CCCL resolution has been open for 3.5 years now; I doubt it is getting fixed. And UB is bad. And any overhead this adds is negligible compared to everything else needed for parquet reads (decompression, reading global device memory, etc.) |
You are welcome to note your comments in the CCCL issue. |
Also, this overhead isn't being applied to processing of the data itself, it's just overhead on calculating a few page offsets. The perf cost of this is negligible, UB should be avoided, and CCCL is not going to fix this (it may even require a branch in exclusive_scan(), so they may not even want to change anything there). |
The counterargument here is that this isn't being applied to bulk data. It's being applied to metadata - dozens/hundreds of things (page structs) during the setup phase. |
I don't want to workaround issues like this but prefer CCCL fix (or not) the issue in their library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend closing this PR.
This PR fixes a couple of uninitialized reads in parquet chunked reader.
We are trying to go from an array of size N to a list of offsets to the data referred to by the array of length N+1, where the last offset is the total offset to the end. The exclusive_scan() calls compute the offsets, but do an uninitialized read of array[N]. This introduces thrust counting_transform_iterator's to perform an indirection so that we don't read array[N]. Note that exclusive_scan() computes a prefix sum, so the uninitialized data in array[N] shouldn't have been used to compute anything anyway.
Checklist