feat[gpu]: export binary as Arrow Binary#8320
Open
0ax1 wants to merge 3 commits into
Open
Conversation
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Merging this PR will improve performance by 29.37%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | chunked_bool_canonical_into[(1000, 10)] |
46.7 µs | 31.8 µs | +46.95% |
| ⚡ | Simulation | chunked_varbinview_canonical_into[(1000, 10)] |
197.9 µs | 161.8 µs | +22.34% |
| ⚡ | Simulation | chunked_varbinview_into_canonical[(1000, 10)] |
213.6 µs | 177.3 µs | +20.42% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing ad/gpu-arrow-binary-export (e599e32) with develop (f2148d4)
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Comment on lines
+36
to
+55
| __device__ void repack_validity_device(const uint8_t *const input, | ||
| uint8_t *const output, | ||
| uint64_t len, | ||
| uint64_t input_offset, | ||
| uint64_t output_bytes) { | ||
| const uint64_t worker = blockIdx.x * blockDim.x + threadIdx.x; | ||
| const uint64_t start = start_elem(worker, output_bytes); | ||
| const uint64_t stop = stop_elem(worker, output_bytes); | ||
|
|
||
| for (uint64_t byte_idx = start; byte_idx < stop; byte_idx++) { | ||
| uint8_t byte = 0; | ||
| const uint64_t first_bit = byte_idx * 8; | ||
| for (uint64_t bit_idx = 0; bit_idx < 8 && first_bit + bit_idx < len; bit_idx++) { | ||
| if (get_bit(input, input_offset + first_bit + bit_idx)) { | ||
| byte |= static_cast<uint8_t>(1u << bit_idx); | ||
| } | ||
| } | ||
| output[byte_idx] = byte; | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
🤖 ⏰
Use a word level left shift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.