Skip to content

Migrate RMM usage to CCCL MR design#5483

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

Migrate RMM usage to CCCL MR design#5483
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

  • Replace removed rmm::mr::device_memory_resource base class, owning_wrapper, shared_ptr-based resource management, and deprecated per-device resource APIs with CCCL-native memory resource types
  • Use cuda::mr::any_resource<cuda::mr::device_accessible> for owning type-erased storage, rmm::device_async_resource_ref for non-owning references, and value-typed resources (cuda_memory_resource, pinned_host_memory_resource)
  • Remove invalid 3rd MR argument from raft::handle_t constructor calls (handle only accepts stream + stream_pool)

Files changed (15)

Headers:

  • algorithms.hpp, dendrogram.hpp, legacy/graph.hpp, legacy/functions.hpp: get_current_device_resource()get_current_device_resource_ref()
  • host_staging_buffer_manager.hpp: Remove owning_wrapper, use pool_memory_resource directly via std::optional, accept pinned_host_memory_resource by value
  • large_buffer_manager.hpp: Store pinned_host_memory_resource by value (not shared_ptr), return device_async_resource_ref from get()
  • mtmg/resource_manager.hpp: Use cuda::mr::any_resource<device_accessible> instead of shared_ptr<device_memory_resource>, use set_per_device_resource_ref, remove MR arg from raft::handle_t

Tests:

  • base_fixture.hpp: Return any_resource from create_memory_resource(), use value-typed resources, set_current_device_resource_ref
  • multi_node_threaded_test.cpp: set_current_device_resource_ref(resource)
  • mg_graph500_bfs_test.cu: pinned_mr_ as optional<pinned_host_memory_resource> value type
  • mg_graph500_sssp_test.cu: pinned_memory_resourcepinned_host_memory_resource value type

Examples:

  • All 4 example files: value-typed cuda_memory_resource, set_current_device_resource_ref, remove MR from handle constructor

Replace removed rmm::mr::device_memory_resource base class, owning_wrapper,
shared_ptr-based resource management, and deprecated per-device resource APIs
with CCCL-native memory resource types: value-typed resources,
cuda::mr::any_resource for owning type-erased storage, and
rmm::device_async_resource_ref for non-owning references.
@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

None yet

Development

Successfully merging this pull request may close these issues.

1 participant