RMM (RAPIDS Memory Manager) provides a C++ library and Python bindings for managing GPU device memory. It offers various memory resources, including pooling allocators, to improve performance and reduce fragmentation for CUDA-enabled applications. The `librmm-cu12` package is specifically built for CUDA 12.x environments. It follows the RAPIDS release cadence, typically releasing new versions monthly.
pip install librmm-cu12Verified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to configure RMM with a `PoolMemoryResource` for efficient GPU memory management and how to allocate memory directly using `DeviceBuffer` or implicitly through libraries like CuPy. Ensure you have CuPy installed (`pip install cupy-cuda12x`) to run the CuPy example.
Ensure your system has CUDA Toolkit 12.x installed and that your `cuda-python` and `cupy-cuda12x` installations match this version. If using older CUDA, you must use an older RMM package (e.g., `librmm-cu11`).
Refactor your code to use the public APIs available directly under `import rmm` or `from rmm.mr import ...`. Most functionality previously in `_lib` is now exposed through these public interfaces.
Update memory resource instantiation and usage to align with the new interfaces. Primarily, device-backed memory resources (e.g., `CudaMemoryResource`, `PoolMemoryResource`) should be used. Review RMM documentation for the latest `rmm.mr` API.
Migrate logging configurations to use the `rapids-logger` library directly or rely on `rmm`'s exposed logging configuration methods if available. Avoid attempting to access `rmm.logger` directly.