Skip to content

Delete cccl_adaptors.hpp and use raw CCCL resource_ref types#2325

Merged
bdice merged 1 commit intorapidsai:stagingfrom
bdice:delete-cccl-adaptors
Apr 1, 2026
Merged

Delete cccl_adaptors.hpp and use raw CCCL resource_ref types#2325
bdice merged 1 commit intorapidsai:stagingfrom
bdice:delete-cccl-adaptors

Conversation

@bdice
Copy link
Copy Markdown
Collaborator

@bdice bdice commented Mar 20, 2026

Description

Delete cccl_adaptors.hpp and replace RMM's wrapper types (cccl_resource_ref, cccl_async_resource_ref) with direct aliases to CCCL's resource_ref and synchronous_resource_ref. This eliminates the 480-line adaptor layer that was originally needed to work around the CCCL #8037 recursive constraint satisfaction issue, which has since been fixed upstream in CCCL #8121.

Additional changes:

  • per_device_resource: static_cast<any_device_resource>(ref) replaced with any_device_resource{ref} (wrapper had operator any_resource)
  • Add missing cuda_stream_view.hpp include to three impl headers that previously got it transitively through cccl_adaptors.hpp

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 link
Copy Markdown

copy-pr-bot bot commented Mar 20, 2026

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.

rapids-bot bot pushed a commit that referenced this pull request Mar 23, 2026
…#2328)

Replace the hand-rolled friend `get_property` templates in `cccl_resource_ref` and `cccl_async_resource_ref` with inheritance from `cuda::forward_property`. This delegates property forwarding to CCCL's own machinery, which correctly handles `dynamic_accessibility_property` ([NVIDIA/cccl#7727](NVIDIA/cccl#7727)) and any future properties without ambiguity.

Each wrapper now exposes `upstream_resource()` returning the inner `ResourceType`, as required by `forward_property` for stateful properties.

Tests add minimal `forward_property` adaptors using RMM resource refs as upstream, exercising the exact scenario that causes the ambiguity.

Note: this is a temporary solution for the `main` branch -- resolving #2323 / #2325 will remove this code on the `staging` branch while I continue working on CCCL MR migrations.

Closes #2322.

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

Approvers:
  - Rong Ou (https://github.com/rongou)

URL: #2328
@bdice bdice moved this to In Progress in RMM Project Board Mar 23, 2026
@bdice bdice added breaking Breaking change improvement Improvement / enhancement to an existing function labels Mar 23, 2026
@bdice bdice self-assigned this Mar 23, 2026
@bdice bdice force-pushed the delete-cccl-adaptors branch from 8a3dfa6 to 0f59bf7 Compare March 24, 2026 23:42
@bdice bdice force-pushed the delete-cccl-adaptors branch from 0f59bf7 to 423eeac Compare March 25, 2026 16:50
@bdice
Copy link
Copy Markdown
Collaborator Author

bdice commented Mar 25, 2026

I'm going to break this up into smaller PRs. I'm not 100% convinced all the changes are still necessary.

Copy link
Copy Markdown
Collaborator Author

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Self-reviewed. This is the final stage I need to start work on RAPIDS refactoring. It's mostly deletion and a couple small refactorings.

@bdice bdice marked this pull request as ready for review April 1, 2026 04:18
@bdice bdice requested a review from a team as a code owner April 1, 2026 04:18
@bdice bdice requested review from davidwendt and wence- and removed request for a team April 1, 2026 04:18
Replace RMM's wrapper types (cccl_resource_ref, cccl_async_resource_ref)
with direct aliases to CCCL's resource_ref and synchronous_resource_ref.
This eliminates the 480-line adaptor layer that was originally needed to
work around the CCCL #8037 recursive constraint satisfaction issue, which
has since been fixed upstream in CCCL PR #8121.

Additional changes:
- per_device_resource: static_cast<any_device_resource>(ref) replaced
  with any_device_resource{ref} (wrapper had operator any_resource)
- Add missing cuda_stream_view.hpp include to three impl headers that
  previously got it transitively through cccl_adaptors.hpp
@bdice bdice force-pushed the delete-cccl-adaptors branch from e81b85a to a5b4668 Compare April 1, 2026 04:19
@bdice bdice merged commit 5518661 into rapidsai:staging Apr 1, 2026
84 of 85 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in RMM Project Board Apr 1, 2026
@bdice bdice mentioned this pull request Apr 2, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change improvement Improvement / enhancement to an existing function

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants