Skip to content

Support building with CCCL 3.1.0 - #2017

Merged
rapids-bot[bot] merged 16 commits into
rapidsai:branch-25.10from
bdice:cccl-3.1.0
Sep 16, 2025
Merged

rapids-bot[bot] merged 16 commits into
rapidsai:branch-25.10from
bdice:cccl-3.1.0

Conversation

@bdice

@bdice bdice commented Aug 12, 2025 •

Copy link
Copy Markdown
Collaborator

Description

This PR allows building with CCCL 3.1.0. Contributes to #2011.

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-pr-bot Bot commented Aug 12, 2025

Copy link
Copy Markdown

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 changed the title Test with CCCL 3.1.0 Support building with CCCL 3.1.0 Aug 12, 2025
@bdice

bdice commented Aug 18, 2025 •

Copy link
Copy Markdown
Collaborator Author

CCCL's memory resources have breaking changes in CCCL 3.1.0. The changes in the memory resource concept mean that RMM's memory resources no longer meet the concept's requirements. Here are the breaking changes (NVIDIA/cccl#5313):

List of breaking changes

We want to position stream ordered allocations as the default ones. This means that resource concept names and member functions should not have async in the name, instead we will add sync or synchronous to things that are not async capable. We considered requiring stream ordered operation, but ultimately it seemed too limiting for potential future resources.

This PR makes the following renames:
mr::resource -> mr::synchronous_resource
mr::resource_with -> mr::synchronous_resource_with
mr::async_resource -> mr::resource
mr::async_resource_with -> mr::resource_with
.allocate() -> .allocate_sync()
.deallocate() -> .deallocate_sync()
.allocate_async() -> .allocate()
.deallocate_async() -> .deallocate()

Most CCCL Runtime APIs that take a stream as an argument do so in the first position. This way it's easier to tell something is asynchronous without the async in the name. This change aligns memory resources with this rule, now allocate and deallocate takes stream_ref as first argument instead of the last one.

@bdice

bdice commented Aug 21, 2025 •

Copy link
Copy Markdown
Collaborator Author

I wrote a plan with next steps for adoption here: #2011 (comment)

@lamarrr lamarrr added feature request New feature or request non-breaking Non-breaking change labels Aug 22, 2025
@lamarrr

lamarrr commented Aug 22, 2025

Copy link
Copy Markdown
Contributor

/ok to test 7aecdf6

@bdice
bdice marked this pull request as ready for review August 22, 2025 21:53
@bdice
bdice requested review from a team as code owners August 22, 2025 21:53
@bdice bdice added the DO NOT MERGE Hold off on merging; see PR for details label Aug 22, 2025

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Revert changes in this file before merging.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Delete this file before merging.

Comment thread cpp/include/rmm/detail/adapters.hpp Outdated
};

#if CCCL_MAJOR_VERSION > 3 || (CCCL_MAJOR_VERSION == 3 && CCCL_MINOR_VERSION >= 1)
#define RMM_CCCL_MR_METHODS \

@bdice bdice Aug 22, 2025 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@lamarrr Can you write a bit about why we're doing this with macros rather than directly implementing the methods (copy-paste)? This macro'd code would benefit from having docstrings. It looks like this is only used in host MRs and "mock" MRs. Do we need to restructure the way that host MRs look in order to better leverage the CCCL MR infrastructure?

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.

It's not RMM-specific code since our allocator methods will be different from CCCL's (from 3.1.0 upwards).
It's specific to CCCL and it is used to adapt to CCCL's changing allocator method signatures across versions.
We could also implement them manually, but it would be difficult to manage and track compared to a single source of truth.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can we use SFINAE instead of macro?

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.

I've duplicated the code as necessary, are you okay with the changeset now? @ttnghia

@bdice bdice mentioned this pull request Aug 22, 2025
51 tasks done
@bdice

bdice commented Aug 22, 2025 •

Copy link
Copy Markdown
Collaborator Author

Really nice progress on this @lamarrr, thanks for your help. For next steps:

@bdice bdice moved this to In Progress in RMM Project Board Aug 23, 2025
Comment thread cpp/include/rmm/detail/adapters.hpp Resolved
@lamarrr

lamarrr commented Aug 30, 2025

Copy link
Copy Markdown
Contributor

/ok to test 68389a1

@GregoryKimball GregoryKimball moved this to Burndown in libcudf Sep 3, 2025
#include <rmm/aligned.hpp>
#include <rmm/detail/aligned.hpp>
#include <rmm/detail/cccl_adapters.hpp>
#include <rmm/detail/cccl_adaptors.hpp>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @bdice: what is the difference between adapter vs adaptor?

@bdice bdice Sep 13, 2025 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is a British / American spelling difference. We actually use the British form in RMM, and never the American form. I am changing this just for consistency with RMM's existing precedent. (I prefer the American form but don't want to change all of RMM.)

@bdice bdice mentioned this pull request Sep 15, 2025
4 of 7 tasks
@bdice

bdice commented Sep 15, 2025

Copy link
Copy Markdown
Collaborator Author

/merge

@bdice bdice removed the DO NOT MERGE Hold off on merging; see PR for details label Sep 15, 2025

@vyasr vyasr left a comment

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.

Looks fine to me as a first, hopefully non-breaking step. Thanks!

@rapids-bot
rapids-bot Bot merged commit de85ed3 into rapidsai:branch-25.10 Sep 16, 2025
@github-project-automation github-project-automation Bot moved this from In Progress to Done in RMM Project Board Sep 16, 2025
@bdice bdice mentioned this pull request Sep 16, 2025
6 tasks done
@GregoryKimball GregoryKimball moved this from Burndown to Landed in libcudf Sep 17, 2025
@GregoryKimball GregoryKimball removed this from libcudf Oct 10, 2025
shawnwang18 pushed a commit to shawnwang18/xla that referenced this pull request Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request non-breaking Non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants