Skip to content

Refactor prefetch_resource_adaptor to shared CCCL MR design - #2275

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

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

Conversation

@bdice

@bdice bdice commented Mar 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Split prefetch_resource_adaptor implementation into detail/prefetch_resource_adaptor_impl.hpp + src/mr/detail/prefetch_resource_adaptor_impl.cpp, using cuda::mr::shared_resource for shared ownership
  • Accept device_async_resource_ref upstream; class is now non-template
  • Add mr_ref_prefetch_tests.cpp and integrate into cccl_adaptor_tests.cpp typed test suite
  • Update adaptor_tests.cpp type aliases, NullUpstream, and Equality tests for non-template type
  • Update Cython .pxd/.pyx bindings to match non-template C++ signature

Convert prefetch_resource_adaptor from a class template to a non-template
class using the shared_resource pattern established in earlier PRs.

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

Add mr_ref_prefetch_tests.cpp with CcclMrRef test instantiations.
Add prefetch_resource_adaptor to cccl_adaptor_tests.cpp typed test suite.
Update Cython pxd/pyx bindings to match non-template C++ signature.
@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 bfa86e3

Comment thread cpp/tests/mr/cccl_adaptor_tests.cpp
@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 left a comment

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.

Self-reviewed, all seems aligned with other refactorings.

@bdice
bdice marked this pull request as ready for review March 10, 2026 20:34
@bdice
bdice requested review from a team as code owners March 10, 2026 20:34
@bdice
bdice requested review from miscco and vyasr and removed request for a team March 10, 2026 20:34
@bdice
bdice merged commit 6167fd4 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