Skip to content

Refactor callback_memory_resource to shared CCCL MR design#2274

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

Refactor callback_memory_resource to shared CCCL MR design#2274
bdice merged 2 commits intorapidsai:stagingfrom
bdice:detemplate-callback

Conversation

@bdice
Copy link
Copy Markdown
Collaborator

@bdice bdice commented Mar 6, 2026

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

copy-pr-bot bot commented Mar 6, 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.

@bdice
Copy link
Copy Markdown
Collaborator Author

bdice commented Mar 6, 2026

/ok to test 96c8845

@bdice
Copy link
Copy Markdown
Collaborator Author

bdice commented Mar 6, 2026

/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
Copy link
Copy Markdown
Collaborator Author

bdice commented Mar 10, 2026

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

@bdice bdice merged commit 66c7303 into rapidsai:staging Mar 10, 2026
82 of 85 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in RMM Project Board Mar 10, 2026
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