Skip to content

Refactor callback_memory_resource to shared CCCL MR design - #2274

Merged
bdice merged 2 commits into
rapidsai:stagingfrom
bdice:detemplate-callback
Mar 10, 2026
Merged

bdice merged 2 commits into
rapidsai:stagingfrom
bdice:detemplate-callback

Conversation

@bdice

@bdice bdice commented Mar 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Split callback_memory_resource implementation into detail/callback_memory_resource_impl.hpp + src/mr/detail/callback_memory_resource_impl.cpp, using cuda::mr::shared_resource for shared ownership
  • Accept device_async_resource_ref upstream; class is now non-template
  • Add mr_ref_callback_tests.cpp and integrate into cccl_adaptor_tests.cpp typed test suite
  • Update Cython .pxd/.pyx bindings to match non-template C++ signature

Convert callback_memory_resource to the shared_resource pattern established
in earlier PRs (logging, pool, fixed_size, tracking, statistics, aligned,
arena).

The adaptor now:
- Splits implementation into detail/callback_memory_resource_impl.hpp and
  src/mr/detail/callback_memory_resource_impl.cpp
- Inherits private cuda::mr::shared_resource<detail::callback_memory_resource_impl>
- Exposes get_property for cuda::mr::device_accessible
- Is copyable via shared_resource (shared ownership semantics)

Add mr_ref_callback_tests.cpp with CcclMrRef test instantiations.
Add CallbackMRAdaptorTest to cccl_adaptor_tests.cpp.
@bdice bdice added breaking Breaking change improvement Improvement / enhancement to an existing function labels Mar 6, 2026
@copy-pr-bot

copy-pr-bot Bot commented Mar 6, 2026

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 commented Mar 6, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 96c8845

@bdice

bdice commented Mar 6, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test

@bdice bdice moved this to In Progress in RMM Project Board Mar 6, 2026
@bdice
bdice marked this pull request as ready for review March 10, 2026 20:31
@bdice
bdice requested review from a team as code owners March 10, 2026 20:31
@bdice
bdice requested review from shrshi and vyasr and removed request for a team March 10, 2026 20:31
@bdice

bdice commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator Author

Self-reviewed, this is in line with the other refactoring PRs. Admin-merging.

@bdice
bdice merged commit 66c7303 into rapidsai:staging Mar 10, 2026
77 of 79 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in RMM Project Board Mar 10, 2026
@bdice bdice mentioned this pull request Mar 10, 2026
51 tasks done
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.

1 participant