Skip to content

Add cudf::detail::copy_if_async utility#21495

Merged
rapids-bot[bot] merged 5 commits intorapidsai:mainfrom
davidwendt:copy-if-async
Feb 23, 2026
Merged

Add cudf::detail::copy_if_async utility#21495
rapids-bot[bot] merged 5 commits intorapidsai:mainfrom
davidwendt:copy-if-async

Conversation

@davidwendt
Copy link
Copy Markdown
Contributor

Description

Adds the cudf::detail::copy_if_async utility which is useful when the result of the copy-if is not needed and therefore no stream sync is required. Also updates the many places that can use this.

Checklist

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

@davidwendt davidwendt self-assigned this Feb 19, 2026
@davidwendt davidwendt requested a review from a team as a code owner February 19, 2026 17:25
@davidwendt davidwendt added 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Feb 19, 2026
@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Feb 19, 2026
auto const num_items = cuda::std::distance(begin, end);

auto tmp_bytes = std::size_t{0};
auto no_out = thrust::make_discard_iterator<int>();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, in NVIDIA/cuCollections#797 I confirmed that cuda::discard_iterator is now available. We could migrate all existing uses to the cuda:: version in a separate PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, it did not show up in my intellisense so I wasn't sure it was ready yet.
I will double check it is available in our version of CCCL

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cuco uses the same or slightly older rapids-cmake (and therefore CCCL), so anything in cuco is also in cudf.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, good to know. Thanks.

@davidwendt
Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 0b94cab into rapidsai:main Feb 23, 2026
114 checks passed
@davidwendt davidwendt deleted the copy-if-async branch March 1, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review Ready for review by team improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants