Skip to content

Select batched memcpy flags by copy size - #1152

Merged
rapids-bot[bot] merged 3 commits into
rapidsai:mainfrom
bdice:fix/cuda-memcpy-batch-threshold
Aug 18, 2026
Merged

Select batched memcpy flags by copy size#1152
rapids-bot[bot] merged 3 commits into
rapidsai:mainfrom
bdice:fix/cuda-memcpy-batch-threshold

Conversation

@bdice

@bdice bdice commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Description

This addresses a performance issue documented in NVIDIA/cudf#23674.

Use cudaMemcpyFlagPreferOverlapWithCompute for a cudaMemcpyBatchAsync batch only when every copy is 128 KiB or less. If any copy is larger, use cudaMemcpyFlagDefault for the entire batch. The choice of 128 KiB was determined by benchmarking on several devices (GB300, GB10, RTX PRO A6000) and minimizing the time cost modeled with latency and bandwidth.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Aug 16, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@bdice
bdice force-pushed the fix/cuda-memcpy-batch-threshold branch from 92826f0 to d0c23c3 Compare August 16, 2026 07:10
Signed-off-by: Bradley Dice <bdice@bradleydice.com>
@bdice
bdice force-pushed the fix/cuda-memcpy-batch-threshold branch from d0c23c3 to 940ef01 Compare August 16, 2026 07:12
@bdice bdice self-assigned this Aug 16, 2026
@bdice bdice added bug Something isn't working non-breaking Introduces a non-breaking change labels Aug 16, 2026
@bdice
bdice marked this pull request as ready for review August 16, 2026 07:16
@bdice
bdice requested a review from a team as a code owner August 16, 2026 07:16
@bdice

bdice commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit 6c94e34 into rapidsai:main Aug 18, 2026
67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants