-
Notifications
You must be signed in to change notification settings - Fork 245
Open
Labels
feature requestNew feature or requestNew feature or request
Description
Remove bridge infrastructure and device_memory_resource
Part of #2011. Depends on removal of device_memory_resource inheritance (#2295).
Problem
After #2295, no resource inherits from device_memory_resource, but the class
and its bridge infrastructure still exist:
device_memory_resource(cpp/include/rmm/mr/device_memory_resource.hpp)device_memory_resource_view(cpp/include/rmm/mr/detail/device_memory_resource_view.hpp)- Pointer-based
per_device_resourceAPIs and bridge helpers cccl_adaptors.hppwrapper is simplified but retained (deleted in [FEA] Delete cccl_adaptors.hpp and use raw CCCL resource_ref types #2323)
With no resource inheriting from device_memory_resource, these components are
dead code and can be deleted.
Goal
After this work:
device_memory_resource.hppis deleteddevice_memory_resource_view.hppis deleted- Pointer-based
per_device_resourceAPIs are removed to_device_async_resource_ref_checkedand similar bridge helpers are removedcccl_adaptors.hppis simplified (most bridge code removed, but file retained
for deletion in [FEA] Delete cccl_adaptors.hpp and use raw CCCL resource_ref types #2323)- Test mock resources (
mock_resource.hpp,device_check_resource_adaptor.hpp)
use CCCL concepts directly
Branch
delete-device-memory-resource (based on remove-dmr-inheritance)
5 commits (#2295's 4 + 1):
- Commits from [FEA] Remove device_memory_resource inheritance from all C++ memory resources #2295 (see that issue)
f8c76212Remove device_memory_resource and DMR bridge infrastructure (25 files, deletingdevice_memory_resource.hppanddevice_memory_resource_view.hpp)
Tasks
1. Delete device_memory_resource_view
File: cpp/include/rmm/mr/detail/device_memory_resource_view.hpp
- Delete the file
- Remove all
#includedirectives referencing it
2. Delete device_memory_resource.hpp
File: cpp/include/rmm/mr/device_memory_resource.hpp
- Delete the file
- Remove all
#includedirectives across the codebase
3. Simplify cccl_adaptors.hpp
File: cpp/include/rmm/detail/cccl_adaptors.hpp
- Remove bridge code that depends on
device_memory_resource - Retain core
cccl_resource_ref/cccl_async_resource_refwrappers
(full deletion in [FEA] Delete cccl_adaptors.hpp and use raw CCCL resource_ref types #2323)
4. Remove pointer-based per_device_resource APIs and bridge helpers
File: cpp/include/rmm/mr/per_device_resource.hpp
- Remove
get_per_device_resource()returningdevice_memory_resource* - Remove
set_per_device_resource()acceptingdevice_memory_resource* - Remove
get_current_device_resource()returningdevice_memory_resource* - Remove
set_current_device_resource()acceptingdevice_memory_resource* - Remove
to_device_async_resource_ref_checkedand similar helpers
5. Update test infrastructure
- Rewrite
mock_resource.hppto satisfy CCCL concepts directly - Rewrite
device_check_resource_adaptor.hppfor CCCL concepts - Update
callback_memory_resourcetests - Update aligned, arena, failure_callback test files
- Update
stream_ordered_memory_resourceto remove DMR dependencies
Validation
-
build-rmm-cpp -j0succeeds (with-DBUILD_BENCHMARKS=ON) - All 103 C++ tests pass (
test-rmm-cpp) -
build-rmm-python -j0succeeds - All 1781 Python tests pass (
test-rmm-python)
References
- Depends on [FEA] Remove device_memory_resource inheritance from all C++ memory resources #2295 (remove DMR inheritance)
- Followed by [FEA] Delete cccl_adaptors.hpp and use raw CCCL resource_ref types #2323 (delete cccl_adaptors.hpp and use raw CCCL types)
- [FEA] Support memory resources from CCCL 3.2 #2011 (parent tracking issue)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or request
Type
Projects
Status
To-do