Skip to content

Conversation

@bdice
Copy link
Contributor

@bdice bdice commented Dec 9, 2025

Description

This PR implements a "bridge" for CCCL 3.2 compatibility while retaining support for resources stored as device_memory_resource*. This is a different approach than #2162/#2166 and hopefully will be a better solution.

Before merging, we need to run C++ and Python tests for all of RAPIDS with both CCCL 3.1 and 3.2.

Part of #2143.

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-pr-bot bot commented Dec 9, 2025

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 cccl-3.2.x-compat branch from 967c800 to b20c573 Compare December 9, 2025 22:51
@bdice bdice added feature request New feature or request breaking Breaking change labels Dec 16, 2025
@bdice bdice self-assigned this Dec 16, 2025
@bdice bdice moved this to In Progress in RMM Project Board Dec 16, 2025
@bdice
Copy link
Contributor Author

bdice commented Dec 16, 2025

/ok to test

updates RMM's `cccl_adaptors.hpp` to work with these changes.

The following changes are intended to be *temporary* until RAPIDS is
fully migrated to the new CCCL memory resource design. See
rapidsai#2011 for details.

- Switch from inheritance to composition for both `cccl_resource_ref` and
  `cccl_async_resource_ref`, to support construction from
  `device_memory_resource*`
- Add `device_memory_resource_view` member (a copyable resource) to
  preserve DMR pointers through copy/move operations. This class is a
  copyable view wrapping a `device_memory_resource` pointer.
- Add `is_specialization_of_v` trait to exclude `resource_ref` types
  from resource-accepting constructors (prevents recursive constraint
  satisfaction)

Version guards ensure CCCL 3.1/3.2 compatibility until the 3.2
transition is complete. This allows RMM to work with both CCCL 3.1 and
3.2.
@bdice bdice force-pushed the cccl-3.2.x-compat branch from 338bc86 to 9eeb5ca Compare December 16, 2025 18:34
@bdice bdice marked this pull request as ready for review December 16, 2025 20:28
@bdice bdice requested review from a team as code owners December 16, 2025 20:28
@bdice bdice requested review from miscco and wence- December 16, 2025 20:28
Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

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

I did a live review with Bradley. I am comfortable with the implementation choices here and to the extent that some of them could be a bit cleaner I don't think it's worth too much effort since a lot of it is transitional code. I would like to see the tests cleaned up before merging if at all possible.

@bdice
Copy link
Contributor Author

bdice commented Dec 18, 2025

I have tested this adequately to ensure that existing RAPIDS builds should not be broken by this PR. (Macro guards ensure there should be no change in behavior for CCCL 3.1.) I'll merge it now, which will make it easier to do the final rounds of CCCL 3.2 testing.

@bdice
Copy link
Contributor Author

bdice commented Dec 18, 2025

/merge

@rapids-bot rapids-bot bot merged commit 00f99c5 into rapidsai:main Dec 18, 2025
77 of 79 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in RMM Project Board Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change feature request New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants