Memory Resources#

The <cuda/experimental/memory_resource.cuh> header provides:
  • any_synchronous_resource and any_resource type erased memory resources similar to std::any. In contrast to resource_ref they own the contained resource.

  • device_memory_resource A standard C++ interface for heterogeneous, stream-ordered memory allocation tailored to the needs of CUDA C++ developers. This design builds off of the success of the RAPIDS Memory Manager (RMM) project and evolves the design based on lessons learned.

  • shared_resource a type erased reference counted memory resource. In contrast to any_resource it additionally provides shared ownership semantics.

<cuda/experimental/memory_resource.cuh> is not intended to replace RMM, but instead moves the definition of the memory allocation interface to a more centralized home in CCCL. RMM will remain as a collection of implementations of the cuda::mr interfaces.