Skip to content

Restore resource_cast guard for RAFT memory pool#3020

Merged
rapids-bot[bot] merged 1 commit into
rapidsai:release/26.06from
bdice:restore-resource-cast-memory-resource
May 20, 2026
Merged

Restore resource_cast guard for RAFT memory pool#3020
rapids-bot[bot] merged 1 commit into
rapidsai:release/26.06from
bdice:restore-resource-cast-memory-resource

Conversation

@bdice
Copy link
Copy Markdown
Contributor

@bdice bdice commented May 17, 2026

Description

PR #2996 migrated RAFT to the CCCL/RMM memory-resource model and temporarily removed the guard that prevented device_resources_manager from overwriting a user-installed RMM resource. Now that CCCL provides cuda::mr::resource_cast support for RMM resources, restore that behavior using rmm::mr::get_current_device_resource_ref().

With this change, device_resources_manager only creates and installs its pool when the current resource is the default rmm::mr::cuda_memory_resource. If another resource is already installed, RAFT preserves it and emits the existing warning.

The test coverage removed during #2996 is restored with resource_cast against the current resource ref.

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 17, 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 bdice added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 17, 2026
@bdice bdice self-assigned this May 17, 2026
@bdice bdice marked this pull request as ready for review May 17, 2026 23:40
@bdice bdice requested a review from a team as a code owner May 17, 2026 23:40
@cjnolet
Copy link
Copy Markdown
Member

cjnolet commented May 20, 2026

/merge

@rapids-bot rapids-bot Bot merged commit 723d9bc into rapidsai:release/26.06 May 20, 2026
153 of 155 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants