Skip to content

Fix CCCL compilation errors - #22349

Merged
rapids-bot[bot] merged 5 commits into
NVIDIA:mainfrom
bdice:fix-cccl
May 1, 2026
Merged

rapids-bot[bot] merged 5 commits into
NVIDIA:mainfrom
bdice:fix-cccl

Conversation

@bdice

@bdice bdice commented May 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes cuDF compilation failures exposed by a recent CCCL update.

  • Row comparators: make row-comparator wrapper types satisfy CCCL algorithms that now require assignable functors.
  • Reductions: update noinline_adapter_fn to preserve its callable return type and support assignment.
  • Sort-merge join: replace thrust::tabulate_output_iterator lower-bound outputs with materialized lower-bound buffers.
  • ORC writer: switch the thrust::max_element predicate to a named device functor to avoid the problematic proclaimed-return-type path.

Checklist

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

@bdice
bdice requested a review from a team as a code owner May 1, 2026 14:50
@bdice
bdice requested review from lamarrr and shrshi May 1, 2026 14:50
@github-actions github-actions Bot added the libcudf Affects libcudf (C++/CUDA) code. label May 1, 2026
@bdice bdice added bug Something isn't working non-breaking Non-breaking change labels May 1, 2026
@davidwendt

Copy link
Copy Markdown
Contributor

Claude made the changes to sort_merge_join.cu
Here is its comments:

  Root cause: The new CCCL zip_iterator computes value_type = cuda::std::tuple<it_value_t<Its>...>.                 
  thrust::tabulate_output_iterator has value_type = void (it's a write-only proxy iterator), so zipping it with a   
  values iterator produces cuda::std::tuple<rhs_index_type, void>. The new libcudacxx tuple rejects void as an      
  element type — previously the old Thrust tuple handled it silently. thrust::tabulate_output_iterator is also
  marked CCCL_DEPRECATED in this version, which confirms the intent to move away from it.

  Fix: Split each of the 3 thrust::lower_bound(..., tabulate_output_iterator, ...) calls into two passes:           
  1. Compute lower bounds into a rmm::device_uvector<size_type> temporary buffer with a plain iterator output
  2. Apply the index-writing logic via thrust::transform (case 1) or thrust::for_each_n (cases 2 & 3)               
                                                                                                     
  Removed the now-unused #include <thrust/iterator/tabulate_output_iterator.h>.  

ss.data() + ss.count(),
cuda::proclaim_return_type<bool>([] __device__(auto const& lhs, auto const& rhs) {
return lhs.stream_size < rhs.stream_size;
}));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Turned the lambda into a functor and this worked.

Comment on lines +648 to +652

less_comparator<Comparator>& operator=(less_comparator<Comparator> const& other)
{
return *this;
};

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.

One of the problems I've noticed is that if I try to also add a move operator here or to noinline_adapter_fn, or change this to a constructor, or change it to = default, compilation breaks again. Something doesn't smell right about that. This got it to compile, but surely there must be a better way?

@davidwendt

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit 5e33923 into NVIDIA:main May 1, 2026
133 checks passed
vyasr pushed a commit to vyasr/cudf that referenced this pull request May 4, 2026
Fixes cuDF compilation failures exposed by a recent CCCL update.

- Row comparators: make row-comparator wrapper types satisfy CCCL algorithms that now require assignable functors.
- Reductions: update `noinline_adapter_fn` to preserve its callable return type and support assignment.
- Sort-merge join: replace `thrust::tabulate_output_iterator` lower-bound outputs with materialized lower-bound buffers.
- ORC writer: switch the `thrust::max_element` predicate to a named device functor to avoid the problematic proclaimed-return-type path.

Authors:
  - Bradley Dice (https://github.com/bdice)
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)
  - David Wendt (https://github.com/davidwendt)

Approvers:
  - David Wendt (https://github.com/davidwendt)
  - Yunsong Wang (https://github.com/PointKernel)
  - Vukasin Milovanovic (https://github.com/vuule)

URL: NVIDIA#22349
rapids-bot Bot pushed a commit to rapidsai/rapids-cmake that referenced this pull request May 8, 2026
This PR updates CCCL to the latest 3.4.0 pre-release commit.

Comparison of CCCL commits: NVIDIA/cccl@2b7188d...bc6be12

We specifically need these features/fixes for RAPIDS projects:
- NVIDIA/cccl#8839
- NVIDIA/cccl#8845
- NVIDIA/cccl#8882

Changes to revert once this lands:
- `sort_merge_joins.cu` workaround from NVIDIA/cudf#22349
- Disabled warpspeed scan in cuVS from NVIDIA/cuvs#2062
- Refactor `sample_and_compute_local_nbr_indices.cuh` to avoid transform iterators from rapidsai/cugraph@913da05

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Robert Maynard (https://github.com/robertmaynard)

URL: #1018
shrshi pushed a commit to shrshi/cudf that referenced this pull request May 12, 2026
Fixes cuDF compilation failures exposed by a recent CCCL update.

- Row comparators: make row-comparator wrapper types satisfy CCCL algorithms that now require assignable functors.
- Reductions: update `noinline_adapter_fn` to preserve its callable return type and support assignment.
- Sort-merge join: replace `thrust::tabulate_output_iterator` lower-bound outputs with materialized lower-bound buffers.
- ORC writer: switch the `thrust::max_element` predicate to a named device functor to avoid the problematic proclaimed-return-type path.

Authors:
  - Bradley Dice (https://github.com/bdice)
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)
  - David Wendt (https://github.com/davidwendt)

Approvers:
  - David Wendt (https://github.com/davidwendt)
  - Yunsong Wang (https://github.com/PointKernel)
  - Vukasin Milovanovic (https://github.com/vuule)

URL: NVIDIA#22349
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants