-
Notifications
You must be signed in to change notification settings - Fork 58
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
RemoteIO: use a pinned bounce buffer #519
Merged
rapids-bot
merged 6 commits into
rapidsai:branch-24.12
from
madsbk:remote-io-pinned-bounce-buffer
Oct 30, 2024
Merged
RemoteIO: use a pinned bounce buffer #519
rapids-bot
merged 6 commits into
rapidsai:branch-24.12
from
madsbk:remote-io-pinned-bounce-buffer
Oct 30, 2024
Conversation
This file contains 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
madsbk
added
improvement
Improves an existing functionality
non-breaking
Introduces a non-breaking change
labels
Oct 28, 2024
3 tasks
madsbk
force-pushed
the
remote-io-pinned-bounce-buffer
branch
3 times, most recently
from
October 28, 2024 21:35
4364be4
to
a555d85
Compare
madsbk
force-pushed
the
remote-io-pinned-bounce-buffer
branch
from
October 29, 2024 15:12
a555d85
to
1c86f2f
Compare
vuule
reviewed
Oct 29, 2024
@@ -450,6 +538,10 @@ class RemoteHandle { | |||
curl.perform(); | |||
} else { | |||
PushAndPopContext c(get_context_from_pointer(buf)); | |||
// We use a bounce buffer to avoid many small memory copies to device. Libcurl has a | |||
// maximum chunk size of 16kb (`CURL_MAX_WRITE_SIZE`) but chunks are often much smaller. | |||
detail::BounceBufferH2D bounce_buffer(detail::StreamsByThread::get(), buf); |
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.
how big is the bounce buffer?
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.
16MiB, it is taken from the same memory pool as the one POSIX IO uses.
Added this to the docstring:
* When reading into device memory, a bounce buffer is used to avoid many small memory
* copies to device. Use `kvikio::default::bounce_buffer_size_reset()` to set the size
* of this bounce buffer (default 16 MiB).
…o remote-io-pinned-bounce-buffer
wence-
approved these changes
Oct 30, 2024
Co-authored-by: Lawrence Mitchell <[email protected]>
/merge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
We use a bounce buffer to avoid many small memory copies to device. Libcurl has a maximum chunk size of 16kb (
CURL_MAX_WRITE_SIZE
) but chunks are often much smaller.For now, the bounce buffer isn't double buffered, let's defer that to later: #520