-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Optimize RLE decoding using a warp-balanced chunking approach #23271
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
base: main
Are you sure you want to change the base?
Changes from 26 commits
5fec7c1
0a9f45a
3f3e4fc
910da6e
401cdfc
bb226c8
c60de71
c3f6c05
1e5d130
8f2b7f4
042d8c5
be9a068
c4facac
fca7320
3388901
e2c899a
5396008
2ce885c
317b9ac
4317bd2
ba909e8
85b9532
041c4ab
18b7d0b
798d545
9e9d8bf
b120823
b3515c7
64c6af2
e3738f3
aebcc26
44d0571
ceb81d6
789b511
9128028
27446f9
9a55599
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -418,7 +418,7 @@ CUDF_KERNEL void __launch_bounds__(level_decode_block_size) | |||||
| __shared__ rle_run def_runs[rle_run_buffer_size]; | ||||||
| __shared__ rle_run rep_runs[rle_run_buffer_size]; | ||||||
| static constexpr int max_output_values = cuda::std::numeric_limits<int>::max(); | ||||||
| rle_stream<level_t, level_decode_block_size, max_output_values> | ||||||
| rle_stream<level_t, level_decode_block_size, max_output_values, true> | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's use the alias directly here instead of
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in |
||||||
| decoders[level_type::NUM_LEVEL_TYPES] = {{def_runs}, {rep_runs}}; | ||||||
|
|
||||||
| // Shared-memory staging scratch for the encoded level streams. Level streams | ||||||
|
|
@@ -452,7 +452,8 @@ CUDF_KERNEL void __launch_bounds__(level_decode_block_size) | |||||
| rep, | ||||||
| num_to_decode, | ||||||
| stage, | ||||||
| ©_barrier); | ||||||
| ©_barrier, | ||||||
| rle_stream_t::smem_stage_size); | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use the same
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in |
||||||
| copy_barrier.arrive_and_wait(); | ||||||
| decoders[level_type::REPETITION].decode_next(t, num_to_decode); | ||||||
| } | ||||||
|
|
@@ -475,7 +476,8 @@ CUDF_KERNEL void __launch_bounds__(level_decode_block_size) | |||||
| def, | ||||||
| num_to_decode, | ||||||
| stage, | ||||||
| ©_barrier); | ||||||
| ©_barrier, | ||||||
| rle_stream_t::smem_stage_size); | ||||||
| copy_barrier.arrive_and_wait(); | ||||||
| decoders[level_type::DEFINITION].decode_next(t, num_to_decode); | ||||||
| } | ||||||
|
|
||||||
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.
decode_next_chunkeddoes not useruns. Remove these shared ring buffers for chunked streams, or make the chunked stream constructible without anrle_run*, to recover shared memory.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.
Done in
ceb81d66f7. I went with the second option and split the constructor withrequiresclauses onuse_chunked_expand.