Memory Resource classes and adaptors. More...
Classes | |
| class | aligned_resource_adaptor |
| Resource that adapts an upstream resource to allocate memory with a specified alignment. More... | |
| class | arena_memory_resource |
| A suballocator that emphasizes fragmentation avoidance and scalable concurrency support. More... | |
| class | binning_memory_resource |
| Allocates memory from upstream resources associated with bin sizes. More... | |
| class | callback_memory_resource |
| A device memory resource that uses the provided callbacks for memory allocation and deallocation. More... | |
| class | cuda_async_managed_memory_resource |
Memory resource that uses cudaMallocFromPoolAsync/cudaFreeFromPoolAsync with a managed memory pool for allocation/deallocation. More... | |
| class | cuda_async_memory_resource |
Memory resource that uses cudaMallocAsync/cudaFreeAsync for allocation/deallocation. More... | |
| class | cuda_async_view_memory_resource |
Memory resource that uses cudaMallocAsync/cudaFreeAsync for allocation/deallocation. More... | |
| class | cuda_memory_resource |
| Memory resource that uses cudaMalloc/Free for allocation/deallocation. More... | |
| class | failure_callback_resource_adaptor |
| A device memory resource that calls a callback function when allocations throw a specified exception type. More... | |
| class | fixed_size_memory_resource |
| A memory resource which allocates memory blocks of a single fixed size. More... | |
| class | limiting_resource_adaptor |
| Resource that uses an upstream resource to allocate memory and limits the total allocations possible. More... | |
| class | logging_resource_adaptor |
| Resource that uses an upstream resource to allocate memory and logs information about the requested allocation/deallocations. More... | |
| class | managed_memory_resource |
| Memory resource that uses cudaMallocManaged/Free for allocation/deallocation. More... | |
| class | pinned_host_memory_resource |
| Memory resource class for allocating pinned host memory. More... | |
| class | polymorphic_allocator |
A stream ordered Allocator using a device_async_resource_ref to satisfy (de)allocations. More... | |
| class | stream_allocator_adaptor |
Adapts a stream ordered allocator to provide a standard Allocator interface. More... | |
| class | pool_memory_resource |
| A coalescing best-fit suballocator which uses a pool of memory allocated from an upstream memory_resource. More... | |
| class | prefetch_resource_adaptor |
| Resource that prefetches all memory allocations. More... | |
| class | sam_headroom_memory_resource |
| Resource that uses system memory resource to allocate memory with a headroom. More... | |
| class | statistics_resource_adaptor |
| Resource that uses an upstream resource to allocate memory and tracks allocation statistics (current, peak, total bytes and allocation counts). More... | |
| class | system_memory_resource |
| Memory resource that uses malloc/free for allocation/deallocation. More... | |
| class | thread_safe_resource_adaptor |
| Resource that adapts an upstream resource to be thread safe. More... | |
| class | thrust_allocator |
An allocator compatible with Thrust containers and algorithms using a device_async_resource_ref for memory (de)allocation. More... | |
| class | tracking_resource_adaptor |
| Resource that uses an upstream resource to allocate memory and tracks allocations. More... | |
Typedefs | |
| using | allocate_callback_t = std::function< void *(std::size_t, cuda_stream_view, void *)> |
| Callback function type used by callback memory resource for allocation. More... | |
| using | deallocate_callback_t = std::function< void(void *, std::size_t, cuda_stream_view, void *)> |
| Callback function type used by callback_memory_resource for deallocation. More... | |
| using | failure_callback_t = std::function< bool(std::size_t, void *)> |
| Callback function type used by failure_callback_resource_adaptor. More... | |
Functions | |
| device_async_resource_ref | get_per_device_resource_ref (cuda_device_id device_id) |
Get the device_async_resource_ref for the specified device. More... | |
| cuda::mr::any_resource< cuda::mr::device_accessible > | set_per_device_resource (cuda_device_id device_id, cuda::mr::any_resource< cuda::mr::device_accessible > new_resource) |
| Set the memory resource for the specified device. More... | |
| cuda::mr::any_resource< cuda::mr::device_accessible > | set_per_device_resource_ref (cuda_device_id device_id, device_async_resource_ref new_resource_ref) |
Set the device_async_resource_ref for the specified device to new_resource_ref More... | |
| device_async_resource_ref | get_current_device_resource_ref () |
Get the device_async_resource_ref for the current device. More... | |
| cuda::mr::any_resource< cuda::mr::device_accessible > | set_current_device_resource (cuda::mr::any_resource< cuda::mr::device_accessible > new_resource) |
| Set the memory resource for the current device. More... | |
| cuda::mr::any_resource< cuda::mr::device_accessible > | set_current_device_resource_ref (device_async_resource_ref new_resource_ref) |
Set the device_async_resource_ref for the current device. More... | |
| cuda::mr::any_resource< cuda::mr::device_accessible > | reset_per_device_resource (cuda_device_id device_id) |
| Reset the memory resource for the specified device to the initial resource. More... | |
| cuda::mr::any_resource< cuda::mr::device_accessible > | reset_current_device_resource () |
| Reset the memory resource for the current device to the initial resource. More... | |
| cuda::mr::any_resource< cuda::mr::device_accessible > | reset_per_device_resource_ref (cuda_device_id device_id) |
Reset the device_async_resource_ref for the specified device to the initial resource. More... | |
| cuda::mr::any_resource< cuda::mr::device_accessible > | reset_current_device_resource_ref () |
Reset the device_async_resource_ref for the current device to the initial resource. More... | |
| template<typename T , typename U > | |
| bool | operator== (polymorphic_allocator< T > const &lhs, polymorphic_allocator< U > const &rhs) |
Compare two polymorphic_allocators for equality. More... | |
| template<typename T , typename U > | |
| bool | operator!= (polymorphic_allocator< T > const &lhs, polymorphic_allocator< U > const &rhs) |
Compare two polymorphic_allocators for inequality. More... | |
| template<typename A , typename O > | |
| bool | operator== (stream_allocator_adaptor< A > const &lhs, stream_allocator_adaptor< O > const &rhs) |
Compare two stream_allocator_adaptors for equality. More... | |
| template<typename A , typename O > | |
| bool | operator!= (stream_allocator_adaptor< A > const &lhs, stream_allocator_adaptor< O > const &rhs) |
Compare two stream_allocator_adaptors for inequality. More... | |
Variables | |
| template<class Resource , class = void> | |
| constexpr bool | is_resource_adaptor = false |
Concept to check whether a resource is a resource adaptor by checking for get_upstream_resource. | |
Memory Resource classes and adaptors.
The rmm::mr namespace contains all base memory resource classes that implement various CUDA memory allocation strategies, adaptors for suballocation such as pool and arena adaptors, and adaptors that add functionality such as logging, alignment, and statistics tracking to existing memory resources.