Skip to content

Add 26.06 migration guide#2344

Open
bdice wants to merge 13 commits into
rapidsai:release/26.06from
bdice:docs/migration-guide-2606
Open

Add 26.06 migration guide#2344
bdice wants to merge 13 commits into
rapidsai:release/26.06from
bdice:docs/migration-guide-2606

Conversation

@bdice
Copy link
Copy Markdown
Collaborator

@bdice bdice commented Apr 2, 2026

Description

Adds an RMM 26.06 migration guide covering library API changes and memory resource migration guidance.

Closes #2345

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot
Copy link
Copy Markdown

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

rapids-bot Bot pushed a commit to rapidsai/raft that referenced this pull request Apr 21, 2026
## Summary
- Remove `device_memory_resource` base class usage, de-template all resource and adaptor types, replace pointer-based per-device resource APIs with ref-based equivalents
- Part of rapidsai/rmm#2011. Migration guide: rapidsai/rmm#2344.
- Supersedes #2917 and #2920

Depends on rapidsai/rmm#2361.
Depends on rapidsai/ucxx#636.

## Changes

### Core resource infrastructure
- **`device_memory_resource.hpp`**: Remove `any_resource_bridge` (which inherited from `rmm::mr::device_memory_resource`), remove all `shared_ptr<device_memory_resource>` constructor overloads, consolidate to `any_resource`-only path
- **`device_resources.hpp`**: Remove deprecated constructor taking `shared_ptr<device_memory_resource>`, update `get_workspace_resource()` return type (de-templated `limiting_resource_adaptor`)
- **`device_resources_snmg.hpp`**: Remove stale include, de-template `pool_memory_resource`
- **`handle.hpp`**: Remove deprecated constructors taking `shared_ptr<device_memory_resource>`
- **`device_resources_manager.hpp`**: Retype `workspace_mrs` vector from `shared_ptr<device_memory_resource>` to `raft::mr::device_resource`, update `set_workspace_memory_resource()` signature accordingly, de-template `pool_mr_` to `optional<pool_memory_resource>`, remove `dynamic_cast` for upstream type detection, replace `get/set_current_device_resource()` with `_ref` variants

### Memory tracking
- **`memory_tracking_resources.hpp`**: Remove `device_tracking_bridge` (inherited from `device_memory_resource`), use `set_current_device_resource_ref()` directly

### Call sites using `get_workspace_resource()` → `get_workspace_resource_ref()`
- `select_k-inl.cuh`, `select_radix.cuh`, `select_warpsort.cuh`, `sparse/select_k-inl.cuh`, `bitmap_to_csr.cuh`, `bitset_to_csr.cuh`

### Benchmarks
- **`benchmark.hpp`**: De-template `pool_memory_resource`, use `any_resource` for RAII restore
- **`gather.cu`**, **`subsample.cu`**: Same pattern

### Tests
- **`handle.cpp`**: Dereference `limiting_resource_adaptor*` for `device_buffer` constructor
- **`device_resources_manager.cpp`**: Remove workspace-related test code for removed APIs
- **`mdarray.cu`**: Remove `test_device_resource_bridge_unwrap` (bridge no longer exists)
- **`multi_variable_gaussian.cu`**: `get_current_device_resource()` → `get_current_device_resource_ref()`

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Divye Gala (https://github.com/divyegala)

URL: #2996
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 14, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@bdice bdice changed the base branch from staging to main May 14, 2026 20:10
@bdice bdice force-pushed the docs/migration-guide-2606 branch from 30f2784 to d0914a6 Compare May 14, 2026 20:10
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new RMM 26.06 migration guide and inserts it into the user guide toctree. The guide documents C++ API/signature changes, custom resource implementation rules, CCCL constraints, and detailed Python/Cython binding migration steps.

Changes

Migration Guide Documentation

Layer / File(s) Summary
Guide header and Sphinx navigation
docs/migration_guide_2606.md, docs/user_guide/guide.md
Adds the RMM 26.06 migration guide with header and breaking-change checklist; inserts a Sphinx toctree entry linking ../migration_guide_2606.
C++ API model and signature changes
docs/migration_guide_2606.md
Documents removal of device_memory_resource, elimination of Upstream templates, upstreams passed/stored via cuda::mr::any_resource<cuda::mr::device_accessible>/device_async_resource_ref, allocate/deallocate signature reorder (stream first), added alignment, deallocate noexcept, device_buffer internal any_resource storage, and linking against librmm for compiled resources.
Custom C++ resource implementation and constraints
docs/migration_guide_2606.md
Describes required CCCL resource interface (async + sync methods), removal of do_allocate/do_deallocate overrides, copyability/movability requirements for types stored in any_resource, use of resource_cast for type checks, and deprecation of cuda::stream_ref{} default construction.
Python and Cython binding migration
docs/migration_guide_2606.md
Details DeviceMemoryResource internal representation change to concrete unique_ptr + optional[device_async_resource_ref], .pxd/.pyx signature updates from pointer to value-style refs (device_async_resource_ref/any_resource[...]), continued use of mr.get_mr() in .pyx, and the make_*_resource_ref helper pattern.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

non-breaking, improvement

Suggested reviewers

  • miscco
  • ttnghia
  • rongou
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed PR fully addresses linked issue #2345 by documenting all required C++ breaking changes, custom resource migration patterns, and Python/Cython migration guidance as specified.
Out of Scope Changes check ✅ Passed Changes are limited to documentation: adding migration guide and updating toctree, both directly aligned with issue #2345 requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title 'Add 26.06 migration guide' directly and clearly summarizes the main change in the changeset, which adds a comprehensive RMM 26.04 to 26.06 migration guide.
Description check ✅ Passed The PR description accurately describes the changeset as adding an RMM 26.06 migration guide covering library API changes and memory resource migration, which aligns with both file modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/migration_guide_2604_to_2606.md`:
- Around line 577-580: The doc currently tells Cython authors to keep using
self.get_mr() in .pyx code, but the migration requires switching to
mr.c_ref.value(); update the migration text (the lines referencing
self.c_obj.get(), self.get_mr(), and device_async_resource_ref) to instruct
authors to replace uses of self.c_obj.get() / self.get_mr() with
mr.c_ref.value() when passing a resource ref from Cython to C++, and adjust
examples and the other affected section (lines ~676-690) to consistently show
mr.c_ref.value() as the correct replacement.
- Around line 209-214: The migration guide currently conflicts: the prose states
`_ref` reset APIs are deprecated-but-still-present in 26.06, but the per-device
table marks reset_per_device_resource_ref and reset_current_device_resource_ref
as removed; update the table rows (and the similar entries at lines referenced
219-220) to explicitly mark those functions as "Deprecated (still available in
26.06; removed in 26.08)" or similar wording, and ensure the surrounding prose
references the exact symbols reset_per_device_resource_ref and
reset_current_device_resource_ref (and `_ref` setters/reset functions) so
readers clearly understand they remain in 26.06 as deprecated compatibility APIs
and will be removed in 26.08.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8d5fb5c0-d933-4799-b8c8-6d054af9ad04

📥 Commits

Reviewing files that changed from the base of the PR and between d0914a6 and 012c921.

📒 Files selected for processing (1)
  • docs/migration_guide_2604_to_2606.md

Comment thread docs/migration_guide_2604_to_2606.md Outdated
Comment on lines +209 to +214
owning `any_resource` setters instead. The `_ref` setters and reset functions
still exist in 26.06 as deprecated compatibility APIs, but will be removed in
26.08:

| Removed (26.04) | Replacement (26.06) |
|-----------------|---------------------|
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Clarify contradictory _ref reset API status in the per-device table.

The prose says _ref reset APIs still exist in 26.06 (deprecated), but the table marks reset_per_device_resource_ref / reset_current_device_resource_ref as removed. Please make the status explicit (deprecated-but-still-available vs removed) to avoid migration ambiguity.

As per coding guidelines: "Clarity: Flag confusing explanations, missing prerequisites, or unclear examples" and "Consistency: Version numbers, parameter types, and terminology match code".

Also applies to: 219-220

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/migration_guide_2604_to_2606.md` around lines 209 - 214, The migration
guide currently conflicts: the prose states `_ref` reset APIs are
deprecated-but-still-present in 26.06, but the per-device table marks
reset_per_device_resource_ref and reset_current_device_resource_ref as removed;
update the table rows (and the similar entries at lines referenced 219-220) to
explicitly mark those functions as "Deprecated (still available in 26.06;
removed in 26.08)" or similar wording, and ensure the surrounding prose
references the exact symbols reset_per_device_resource_ref and
reset_current_device_resource_ref (and `_ref` setters/reset functions) so
readers clearly understand they remain in 26.06 as deprecated compatibility APIs
and will be removed in 26.08.

Comment thread docs/migration_guide_2606.md Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
docs/migration_guide_2606.md (1)

650-653: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Resolve conflicting .pyx migration guidance (get_mr() vs c_ref.value()).

These sections still instruct downstream .pyx code to use get_mr(), but this conflicts with the stated migration contract to move call sites to mr.c_ref.value(). Please align both prose and examples to a single migration path to avoid incorrect downstream updates.

As per coding guidelines: "Accuracy: Verify code examples compile and run correctly" and "Consistency: Version numbers, parameter types, and terminology match code".

Also applies to: 754-777

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/migration_guide_2606.md` around lines 650 - 653, The migration guide
currently gives conflicting advice for Cython `.pyx` bindings—some places say
replace self.c_obj.get() with self.get_mr() while others instruct moving call
sites to mr.c_ref.value(); pick one consistent migration path and update the
prose and examples accordingly: either (A) change every occurrence and example
that mentions self.get_mr() to instead call mr.c_ref.value() where a raw
device_memory_resource* is required, or (B) change all references that suggest
using mr.c_ref.value() to consistently show using self.get_mr() and how to
extract the underlying pointer from that object; update the paragraphs around
the examples and the example code blocks (references: self.c_obj.get(),
self.get_mr(), mr.c_ref.value(), and any .pyx snippets) so the guide shows one
coherent, compile-able approach throughout.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@docs/migration_guide_2606.md`:
- Around line 650-653: The migration guide currently gives conflicting advice
for Cython `.pyx` bindings—some places say replace self.c_obj.get() with
self.get_mr() while others instruct moving call sites to mr.c_ref.value(); pick
one consistent migration path and update the prose and examples accordingly:
either (A) change every occurrence and example that mentions self.get_mr() to
instead call mr.c_ref.value() where a raw device_memory_resource* is required,
or (B) change all references that suggest using mr.c_ref.value() to consistently
show using self.get_mr() and how to extract the underlying pointer from that
object; update the paragraphs around the examples and the example code blocks
(references: self.c_obj.get(), self.get_mr(), mr.c_ref.value(), and any .pyx
snippets) so the guide shows one coherent, compile-able approach throughout.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0d1895ed-64e4-4608-9d17-d6e8a83c9469

📥 Commits

Reviewing files that changed from the base of the PR and between 012c921 and 8a70542.

📒 Files selected for processing (2)
  • docs/migration_guide_2606.md
  • docs/user_guide/guide.md
✅ Files skipped from review due to trivial changes (1)
  • docs/user_guide/guide.md

@bdice bdice changed the title Add 26.04 to 26.06 migration guide Add 26.06 migration guide Jun 1, 2026
@bdice bdice marked this pull request as ready for review June 1, 2026 16:53
bdice and others added 13 commits June 1, 2026 16:54
Covers the removal of device_memory_resource, de-templating of all
resources/adaptors, CCCL resource concept requirements (including
allocate_sync/deallocate_sync, copyability for any_resource, and
get_property friend restrictions), and downstream Cython migration
patterns for .pxd and .pyx files.
Co-authored-by: Bradley Dice <bdice@bradleydice.com>
@bdice bdice force-pushed the docs/migration-guide-2606 branch from df90e63 to 483c1a7 Compare June 1, 2026 16:55
@bdice bdice changed the base branch from main to release/26.06 June 1, 2026 16:55
@bdice bdice added doc Documentation non-breaking Non-breaking change labels Jun 1, 2026
@bdice bdice self-assigned this Jun 1, 2026
@bdice bdice moved this to In Progress in RMM Project Board Jun 1, 2026
@bdice bdice moved this from In Progress to Review in RMM Project Board Jun 1, 2026
Copy link
Copy Markdown
Contributor

@davidwendt davidwendt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is amazing.
I know this is just documentation but I only really read through the C++ parts.

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

Labels

doc Documentation non-breaking Non-breaking change

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

Add migration guide for RMM 26.04 → 26.06 breaking changes

3 participants