Repository navigation
Migrate device memory resource headers - #2140
Merged
Merged
Conversation
|
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. |
Collaborator
Author
|
I'll be opening this for review as soon as I finish testing a build with all of RAPIDS. |
TomAugspurger
approved these changes
Nov 13, 2025
miscco
approved these changes
Nov 13, 2025
lamarrr
approved these changes
Nov 13, 2025
miscco
approved these changes
Nov 13, 2025
Collaborator
Author
|
/merge |
rapids-bot Bot
pushed a commit
that referenced
this pull request
Nov 13, 2025
Documentation changes corresponding to #2140 / #2141. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Shruti Shivakumar (https://github.com/shrshi) URL: #2142
3 tasks done
rapids-bot Bot
pushed a commit
that referenced
this pull request
Nov 18, 2025
Removes deprecated device memory resources in `<rmm/mr/device/...>`. Users should use `<rmm/mr/...>` instead. Closes #2141. Follows up on #2140. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Vyas Ramasubramani (https://github.com/vyasr) - Lawrence Mitchell (https://github.com/wence-) URL: #2151
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR reorganizes the RMM header structure by moving all device memory resource headers from
cpp/include/rmm/mr/device/tocpp/include/rmm/mr/. This change simplifies the header hierarchy and improves the developer experience by reducing nested directory structures.This implements a proposal from #2103 to flatten the memory resource hierarchy, because
hostanddeviceare no longer meaningful distinctions as we adopt the CCCL memory resource design (#2011).The vast majority of this PR is purely code movement. The only meaningful changes are adding deprecation warnings to the old header locations that can be controlled with the CMake option (or preprocessor definition)
RMM_DEPRECATE_MR_DEVICE_HEADERS.Changes Made
1. Header Files Moved (30 files)
Main headers moved from
cpp/include/rmm/mr/device/→cpp/include/rmm/mr/:aligned_resource_adaptor.hpparena_memory_resource.hppbinning_memory_resource.hppcallback_memory_resource.hppcuda_async_managed_memory_resource.hppcuda_async_memory_resource.hppcuda_async_view_memory_resource.hppcuda_memory_resource.hppdevice_memory_resource.hppfailure_callback_resource_adaptor.hppfixed_size_memory_resource.hpplimiting_resource_adaptor.hpplogging_resource_adaptor.hppmanaged_memory_resource.hppowning_wrapper.hppper_device_resource.hpppolymorphic_allocator.hpppool_memory_resource.hppprefetch_resource_adaptor.hppsam_headroom_memory_resource.hppstatistics_resource_adaptor.hppsystem_memory_resource.hppthread_safe_resource_adaptor.hppthrust_allocator_adaptor.hpptracking_resource_adaptor.hppDetail headers moved from
cpp/include/rmm/mr/device/detail/→cpp/include/rmm/mr/detail/:arena.hppcoalescing_free_list.hppfixed_size_free_list.hppfree_list.hppstream_ordered_memory_resource.hpp2. Backward Compatibility (30 forwarding headers)
Created deprecated forwarding headers in
cpp/include/rmm/mr/device/that:"rmm/mr/device/[header].hpp is deprecated in 25.12 and will be removed in 26.02. Use rmm/mr/[header].hpp instead."3. Include Path Updates
Updated all include statements throughout the codebase (53 occurrences across 23 files):
cpp/benchmarks/,cpp/examples/,cpp/tests/python/rmm/rmm/librmm/_torch_allocator.cppdevice_buffer.hpp,device_scalar.hpp,device_uvector.hpp,device_vector.hpp,exec_policy.hppdevice_check_resource_adaptor.hpp,mock_resource.hppChanged from:
#include <rmm/mr/device/xxx.hpp>Changed to:
#include <rmm/mr/xxx.hpp>4. Test Directory Reorganization (22 files)
Moved test files from
cpp/tests/mr/device/→cpp/tests/mr/:.cppand.cu)mr_ref_test.hpp,test_utils.hpp)../../to../cpp/tests/CMakeLists.txtwith new test file paths (20 ConfigureTest entries)5. Python/Cython Bindings (3 files)
Updated Cython declaration files with new header paths (23 total header references):
python/rmm/rmm/librmm/memory_resource.pxd(20 headers)python/rmm/rmm/librmm/per_device_resource.pxd(2 headers)python/rmm/rmm/librmm/device_buffer.pxd(1 header)Migration Guide
Old code (still works with deprecation warning):
New code (recommended):
Deprecation Timeline
Impact
cpp/include/rmm/mr/host/is already deprecated in 25.12, pending deletion in 26.02, so it has not been modified.Testing
All existing tests pass with the new header structure. The forwarding headers ensure backward compatibility during the deprecation period.
Checklist