Skip to content

Migrate RMM usage to CCCL memory resource design#1990

Draft
bdice wants to merge 1 commit intorapidsai:mainfrom
bdice:rmm-cccl-migration
Draft

Migrate RMM usage to CCCL memory resource design#1990
bdice wants to merge 1 commit intorapidsai:mainfrom
bdice:rmm-cccl-migration

Conversation

@bdice
Copy link
Copy Markdown
Contributor

@bdice bdice commented Apr 3, 2026

Summary

  • Migrate all RMM usage to the new CCCL memory resource design (de-templated resources, device_async_resource_ref instead of device_memory_resource*, value semantics)
  • Replace get_workspace_resource() / get_large_workspace_resource() with _ref() variants across 65 call sites
  • Rewrite cuda_huge_page_resource to satisfy CCCL resource concept directly
  • Remove owning_wrapper / dynamic_cast patterns in C API and benchmarks

Changes

  • 33 files changed (~208 insertions, ~221 deletions)
  • device_memory_resource* params → device_async_resource_ref (ivf_common, ivf_pq, naive_knn)
  • get_current_device_resource()get_current_device_resource_ref()
  • set_current_device_resource()set_current_device_resource_ref()
  • De-templated pool_memory_resource, failure_callback_resource_adaptor in bench utils
  • Removed &resource pointer patterns (resources are now copyable value types)
  • Removed spurious mr arg from select_k calls (previously compiled due to implicit pointer→bool conversion)
  • C API pool resource management rewritten without owning_wrapper

Depends on rapidsai/raft#2996.

Adapt cuVS to RMM breaking changes: removal of device_memory_resource
base class, de-templated resource/adaptor types, new per-device resource
ref APIs, and CCCL resource concept requirements.

Key changes:
- get_workspace_resource() -> get_workspace_resource_ref() (44 sites)
- get_large_workspace_resource() -> get_large_workspace_resource_ref() (21 sites)
- get_current_device_resource() -> get_current_device_resource_ref()
- device_memory_resource* params -> device_async_resource_ref
- Remove &resource pointer patterns (resources are now value types)
- Migrate cuda_huge_page_resource to CCCL concept
- De-template pool_memory_resource, failure_callback_resource_adaptor
- Rewrite C API pool resource management without owning_wrapper
- Remove deleted rmm/mr/device_memory_resource.hpp includes
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Apr 3, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants