-
Notifications
You must be signed in to change notification settings - Fork 972
[QDP] Double-buffered pinned I/O pipeline and faster Parquet decode #751
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
Conversation
|
Thanks @400Ping for the patch!
|
My bad just fixed it. |
63ab994 to
755140f
Compare
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.
@400Ping thanks for the patch!
left some comments
|
I think maybe we could add some unit tests for this. |
|
We have 2 improvement in this PR. Based on the benchmark result, I'm speculating if there's one of them are not contributing to the speed improvement. What's your experience? |
Signed-off-by: 400Ping <fourhundredping@gmail.com>
Signed-off-by: 400Ping <fourhundredping@gmail.com>
Signed-off-by: 400Ping <fourhundredping@gmail.com>
This reverts commit 3556b5a.
Signed-off-by: 400Ping <fourhundredping@gmail.com>
372a6c5 to
b411dcf
Compare
I think both have improvements, for the second one is what @rich7420 and @guan404ming suggested to change a different decompression technique to improve its performance. But I think overall it is because of the first one improving the speed improvements. |
Signed-off-by: 400Ping <fourhundredping@gmail.com>
Signed-off-by: 400Ping <fourhundredping@gmail.com>
|
please fix pre-commit. I tested locally and get a 2.8% speedup on arrow ipc case. |
Signed-off-by: 400Ping <fourhundredping@gmail.com>
Signed-off-by: 400Ping <fourhundredping@gmail.com>
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.
Pull request overview
This PR introduces a double-buffered pinned host memory I/O pipeline to improve GPU data transfer performance. The key optimization is adding a reusable pool of pinned host buffers to eliminate repeated CUDA allocation/deallocation overhead in the streaming Parquet decode path.
- Implements
PinnedBufferPoolwith automatic RAII-based buffer management - Refactors
PipelineContextto support multiple event slots for double-buffered synchronization - Renames
PinnedBuffertoPinnedHostBufferfor clarity - Moves norm buffer allocation from per-pipeline to per-chunk
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| qdp/qdp-core/src/gpu/buffer_pool.rs | New pinned host buffer pool with acquire/release semantics and automatic return-to-pool on drop |
| qdp/qdp-core/src/gpu/pipeline.rs | Extended PipelineContext to support multiple event slots; integrated pinned buffer pool; improved error handling with Result returns |
| qdp/qdp-core/src/gpu/memory.rs | Renamed PinnedBuffer to PinnedHostBuffer and added immutable slice accessor |
| qdp/qdp-core/src/lib.rs | Integrated buffer pool types; moved norm buffer allocation to per-chunk scope; updated pipeline event handling |
| qdp/qdp-core/src/gpu/mod.rs | Exposed new buffer_pool module and its public types |
| qdp/qdp-core/src/gpu/cuda_ffi.rs | Removed redundant cfg attribute (already applied at module level) |
| qdp/qdp-kernels/tests/amplitude_encode.rs | Refactored test loop to use idiomatic iterator pattern instead of direct indexing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I agree that the comment regarding |
I think I will change the code to handle it more gracefully and add some comments to document this behavior. |
Signed-off-by: 400Ping <fourhundredping@gmail.com>
Signed-off-by: 400Ping <fourhundredping@gmail.com>
|
Need resolve conflicts, and overall looks good to me! |
ryankert01
left a comment
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.
lg, some suggestions
rich7420
left a comment
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.
@400Ping thanks for the update
|
nits: in |
Signed-off-by: 400Ping <fourhundredping@gmail.com>
|
thanks for the update! |
|
except that overall LGTM |
Should I do this in this pr or open up a follow up |
|
In follow-up |
|
Let's refine it after we get into main. |
…751) * Double-buffered async I/O for read_parquet_batch Signed-off-by: 400Ping <fourhundredping@gmail.com> * update Signed-off-by: 400Ping <fourhundredping@gmail.com> * fix python binding error Signed-off-by: 400Ping <fourhundredping@gmail.com> * update Signed-off-by: 400Ping <fourhundredping@gmail.com> * update Signed-off-by: 400Ping <fourhundredping@gmail.com> * update Signed-off-by: 400Ping <fourhundredping@gmail.com> * update Signed-off-by: 400Ping <fourhundredping@gmail.com> * update Signed-off-by: 400Ping <fourhundredping@gmail.com> * fix build error Signed-off-by: 400Ping <fourhundredping@gmail.com> * Revert "fix build error" This reverts commit 3556b5a. * fix build errors Signed-off-by: 400Ping <fourhundredping@gmail.com> * update unit test and boundary check Signed-off-by: 400Ping <fourhundredping@gmail.com> * remove improvement 2 Signed-off-by: 400Ping <fourhundredping@gmail.com> * fix qdp-core error Signed-off-by: 400Ping <fourhundredping@gmail.com> * fix pre-commit Signed-off-by: 400Ping <fourhundredping@gmail.com> * [Fix] fix pre-commit errors & warnings Signed-off-by: 400Ping <fourhundredping@gmail.com> * fix rust linters Signed-off-by: 400Ping <fourhundredping@gmail.com> * [Fix] handle buffer pool lock poisoning Signed-off-by: 400Ping <fourhundredping@gmail.com> * [Chore] fix rust linters Signed-off-by: 400Ping <fourhundredping@gmail.com> * update Signed-off-by: 400Ping <fourhundredping@gmail.com> * Remove unused func Signed-off-by: 400Ping <fourhundredping@gmail.com> * update Signed-off-by: 400Ping <fourhundredping@gmail.com> --------- Signed-off-by: 400Ping <fourhundredping@gmail.com>
Purpose of PR
Related Issues or PRs
Closes #703
Changes Made
Breaking Changes
Checklist