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_resource APIs and bridge helpers
cccl_adaptors.hpp wrapper 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.hpp is deleted
device_memory_resource_view.hpp is deleted
Pointer-based per_device_resource APIs are removed
to_device_async_resource_ref_checked and similar bridge helpers are removed
cccl_adaptors.hpp is 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):
Tasks
1. Delete device_memory_resource_view
File: cpp/include/rmm/mr/detail/device_memory_resource_view.hpp
2. Delete device_memory_resource.hpp
File: cpp/include/rmm/mr/device_memory_resource.hpp
3. Simplify cccl_adaptors.hpp
File: cpp/include/rmm/detail/cccl_adaptors.hpp
4. Remove pointer-based per_device_resource APIs and bridge helpers
File: cpp/include/rmm/mr/per_device_resource.hpp
5. Update test infrastructure
Validation
References
Remove bridge infrastructure and
device_memory_resourcePart of #2011. Depends on removal of
device_memory_resourceinheritance (#2295).Problem
After #2295, no resource inherits from
device_memory_resource, but the classand 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)per_device_resourceAPIs and bridge helperscccl_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 aredead code and can be deleted.
Goal
After this work:
device_memory_resource.hppis deleteddevice_memory_resource_view.hppis deletedper_device_resourceAPIs are removedto_device_async_resource_ref_checkedand similar bridge helpers are removedcccl_adaptors.hppis simplified (most bridge code removed, but file retainedfor deletion in [FEA] Delete cccl_adaptors.hpp and use raw CCCL resource_ref types #2323)
mock_resource.hpp,device_check_resource_adaptor.hpp)use CCCL concepts directly
Branch
delete-device-memory-resource(based onremove-dmr-inheritance)5 commits (#2295's 4 + 1):
f8c76212Remove device_memory_resource and DMR bridge infrastructure (25 files, deletingdevice_memory_resource.hppanddevice_memory_resource_view.hpp)Tasks
1. Delete
device_memory_resource_viewFile:
cpp/include/rmm/mr/detail/device_memory_resource_view.hpp#includedirectives referencing it2. Delete
device_memory_resource.hppFile:
cpp/include/rmm/mr/device_memory_resource.hpp#includedirectives across the codebase3. Simplify
cccl_adaptors.hppFile:
cpp/include/rmm/detail/cccl_adaptors.hppdevice_memory_resourcecccl_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_resourceAPIs and bridge helpersFile:
cpp/include/rmm/mr/per_device_resource.hppget_per_device_resource()returningdevice_memory_resource*set_per_device_resource()acceptingdevice_memory_resource*get_current_device_resource()returningdevice_memory_resource*set_current_device_resource()acceptingdevice_memory_resource*to_device_async_resource_ref_checkedand similar helpers5. Update test infrastructure
mock_resource.hppto satisfy CCCL concepts directlydevice_check_resource_adaptor.hppfor CCCL conceptscallback_memory_resourcetestsstream_ordered_memory_resourceto remove DMR dependenciesValidation
build-rmm-cpp -j0succeeds (with-DBUILD_BENCHMARKS=ON)test-rmm-cpp)build-rmm-python -j0succeedstest-rmm-python)References