perf: prefer copy bandwidth over compute overlap for large batch memcpys - #2
Open
felipeblazing wants to merge 2 commits into
Open
Conversation
cudf::detail::memcpy_batch_async unconditionally passed cudaMemcpyFlagPreferOverlapWithCompute. That flag caps device-to-device throughput at ~470 GB/s on GB300 regardless of copy size, while the default flag reaches ~3.2 TB/s -- a 6.8x gap on the multi-GB buffer copies behind cudf::concatenate's for_each_concatenate path. The flag is not useless: for batches of small buffers the driver fuses the copies far more effectively with it (213 GB/s vs 40 GB/s for 256 x 64 KiB), so dropping it outright regresses the small-copy IO paths by up to 5x. Measured crossover is ~1 MiB per copy and is nearly independent of the batch count, so select on the mean bytes per copy with a 2 MiB threshold. Host-device copies measured insensitive to the flag (within 1% pinned and pageable at every size), so this only changes device-to-device behavior. Also returns early on an empty batch, which the mean computation requires. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
mike-wendt
force-pushed
the
release/26.06
branch
5 times, most recently
from
August 21, 2026 19:39
eb2e22f to
d49c634
Compare
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.
cudf::detail::memcpy_batch_async unconditionally passed
cudaMemcpyFlagPreferOverlapWithCompute. That flag caps device-to-device
throughput at ~470 GB/s on GB300 regardless of copy size, while the default
flag reaches ~3.2 TB/s -- a 6.8x gap on the multi-GB buffer copies behind
cudf::concatenate's for_each_concatenate path.
The flag is not useless: for batches of small buffers the driver fuses the
copies far more effectively with it (213 GB/s vs 40 GB/s for 256 x 64 KiB), so
dropping it outright regresses the small-copy IO paths by up to 5x. Measured
crossover is ~1 MiB per copy and is nearly independent of the batch count, so
select on the mean bytes per copy with a 2 MiB threshold.
Host-device copies measured insensitive to the flag (within 1% pinned and
pageable at every size), so this only changes device-to-device behavior.
Also returns early on an empty batch, which the mean computation requires.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com