Skip to content

Undo some CCCL workarounds fixed in the latest update - #22475

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
davidwendt:undo-cccl-workarounds
May 13, 2026
Merged

rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
davidwendt:undo-cccl-workarounds

Conversation

@davidwendt

@davidwendt davidwendt commented May 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes in sort_merge_join.cu re-enable calls to thrust::lower_bound with a cuda::tabulate_output_iterator
Also, the cuda::discard_iterator now works with the cuda::zip_iterator in all usage patterns in libcudf.
Both of these were fixed by NVIDIA/cccl#8845

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 May 12, 2026
@davidwendt
davidwendt requested a review from a team as a code owner May 12, 2026 15:35
@davidwendt
davidwendt requested review from shrshi and ttnghia May 12, 2026 15:35
@davidwendt davidwendt added 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 12, 2026
@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c64f4d09-9f1a-43e6-bb3c-ffc639b0b306

📥 Commits

Reviewing files that changed from the base of the PR and between e5b4e1d and 3d00254.

📒 Files selected for processing (3)
  • cpp/src/groupby/sort/group_replace_nulls.cu
  • cpp/src/join/sort_merge_join.cu
  • cpp/src/replace/nulls.cu

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Internal code optimizations and refactoring to improve performance and maintainability across core processing operations.

Walkthrough

This PR migrates CUDA kernel code from Thrust iterator utilities to CUDA standard-library equivalents, and optimizes join operations to reduce temporary memory allocations. Iterator construction in groupby and replace modules is rewritten using cuda::make_zip_iterator and cuda::std::make_tuple. Three merge join methods are refactored to write thrust::lower_bound outputs directly into target buffers via device-callable closures, eliminating intermediate temporary buffers and scatter loops.

Changes

CUDA Iterator Migration and Join Optimizations

Layer / File(s) Summary
Groupby module: migrate to CUDA iterators
cpp/src/groupby/sort/group_replace_nulls.cu
Header includes are replaced with CUDA iterator/tuple libraries, and group_replace_nulls scan input/output zip iterators are constructed using cuda::make_zip_iterator and cuda::make_discard_iterator instead of Thrust equivalents.
Replace module: migrate to CUDA iterators
cpp/src/replace/nulls.cu
Header includes are updated to CUDA iterator and tuple support, and replace_nulls_policy_impl zip iterator construction is rewritten to use cuda::make_zip_iterator with cuda::std::make_tuple for inclusive scan buffers.
Join operations: direct output via tabulate_output_iterator
cpp/src/join/sort_merge_join.cu
merge::matches_per_row, merge::inner, and merge::left are optimized to write thrust::lower_bound results directly into target buffers (match_counts, smaller_indices) using device-callable tabulate_output_iterator closures, removing intermediate temporary allocations and scatter steps.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main objective of the changeset: reverting CCCL workarounds that are now fixed in the latest CCCL update.
Description check ✅ Passed The description is directly related to the changeset, explaining the fixes in sort_merge_join.cu and cuda::discard_iterator compatibility improvements.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@davidwendt

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit edf7354 into NVIDIA:main May 13, 2026
111 of 113 checks passed
@davidwendt
davidwendt deleted the undo-cccl-workarounds branch May 13, 2026 19:24
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