-
Notifications
You must be signed in to change notification settings - Fork 915
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
Parquet writer dictionary encoding refactor #8476
Parquet writer dictionary encoding refactor #8476
Conversation
cpp/src/io/parquet/chunk_dict.cu
Outdated
auto t = threadIdx.x; | ||
|
||
size_type start_row = block_x * 5000; | ||
size_type end_row = min(start_row + 5000, num_rows); |
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.
Then we need to explicitly add the prefix cuda::min
or something similar to that?
|
||
void InitializeChunkHashMaps(device_span<EncColumnChunk> chunks, rmm::cuda_stream_view stream) | ||
{ | ||
constexpr int block_size = 1024; |
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.
Use int32_t
instead, for clarification.
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.
I believe kernel launch parameters are not sensitive to bit size.
How does this fix #8890? |
The problem was that we allocated 256 kb as scratch space for every chunk even if the chunk contained much less values. Now we only allocate any temp memory proportional to data size. There was one instance in this PR where we still allocated 256kb per chunk but that has been limited to min(256kb, chunk size). |
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.
Partial review, still not understanding the kernels that well.
Causing a problem where early return would result in num_dict_entries == 65536 but that meant that the dict bit calc logic would think it's ok to use dict as 65536 fits in 16 bits
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.
Looks good. Note that there are still magic numbers which can be replaced by constexpr
variables:
- Magic numbers should always be avoided
- Any
constexpr
value replacing a magic number should be associated with a full comment/doxygen clarifying why it has such value
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.
Just a formatting error, otherwise good to go.
Co-authored-by: Vukasin Milovanovic <[email protected]>
@gpucibot merge |
Replaces previous parquet dictionary encoding code with one that uses
cuCollections
' static map.Adds
cuCollections
tolibcudf
Closes #7873
Fixes #8890
Currently blocked on Pascal support for static_map in cuCollections
(More details to be added)