How rapidsai/rmm works
Core Components (Top Level)
a. Language Interfaces (C++ and Python)
b. Memory Resource Management Layer
c. CUDA Memory Layer
Memory Resource Management Layer (Central)
a. Base Memory Resources
• device_memory_resource (abstract interface)
• host_memory_resource (abstract interface)
b. Concrete Memory Resources
• cuda_memory_resource
• managed_memory_resource
• pool_memory_resource
• fixed_size_memory_resource
• binning_memory_resource
c. Resource Adaptors
• logging_resource_adaptor
• thread_safe_resource_adaptor
• statistics_resource_adaptor
Data Structures Layer
• Device data structures:
• device_buffer
• device_uvector<T>
• device_scalar
Integration Layer
• CuPy Allocator
• Numba Allocator
• PyTorch Allocator
• Thrust Integration
Stream Management
• Stream handling components:
• cuda_stream_view
• cuda_stream
• cuda_stream_pool
Use these visual elements:
Connection Types
• Double lines: Interface implementations
Resource Management Pattern
• How memory resources can be composed and wrapped
• Default resource chain
Stream-Ordered Memory Management
• How streams are associated with allocations
• Stream synchronization points
Python/C++ Interoperability
• Bridging between Python and C++ components
• Ownership transfer points
Memory Pool Management
• How pool resources manage memory blocks
• Sizing and growth strategies
• Special annotations or markers
• Component type categories
Remember to emphasize the stream-ordered nature of the memory management, as this is a key distinguishing feature of RMM's architecture.