Registry / ai-ml / librmm-cu12

librmm-cu12

JSON →
library26.6.0pypypi✓ verified 83d ago

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-cu12
INSTALL
IMPORT
SIG · LIBRMM-CU12
L
librmm-cu12
ai-mlpythonv26.6.0
Install
2.5s avg
Import
Disk
38MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v25.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 37.3MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.5s · import 0.000s · 44MB
38MB installed
● package 38MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

load
from librmm import load
from rmm.device_buffer import DeviceBuffer
load_library
from librmm import load_library
from rmm.device_buffer import DeviceBuffer

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.

import rmm from rmm.mr import PoolMemoryResource, set_current_device_resource from rmm.device_buffer import DeviceBuffer import cupy as cp # 1. Configure RMM with a memory resource (e.g., a memory pool) pool_size_bytes = 2 * 1024**3 # 2 GB max_pool_size_bytes = 4 * 1024**3 # 4 GB # Create a PoolMemoryResource # Note: As of v26.02.00, host-only memory resources were removed. # This example uses a device-backed pool. mr = PoolMemoryResource(initial_pool_size=pool_size_bytes, maximum_pool_size=max_pool_size_bytes) set_current_device_resource(mr) print(f"Current RMM memory resource set to: {rmm.mr.get_current_device_resource()}") # 2. Allocate device memory directly with RMM db = DeviceBuffer(size=1024, dtype='uint8') print(f"Allocated DeviceBuffer of size {db.size} bytes: {db}") # 3. Use CuPy with RMM integration (CuPy will automatically use RMM) a = cp.arange(10**6, dtype=cp.float32) b = a * 2 print(f"CuPy array created using RMM: {a.shape}, dtype={a.dtype}") # Clean up (optional, as RMM resources are typically global and managed) del db del a, b # Note: The PoolMemoryResource itself will be deallocated when 'mr' goes out of scope # or when the program exits, releasing its managed memory.
Debug
Known issues
breakingStarting with RMM v25.08.00, `librmm-cu12` (and other RMM packages) explicitly require CUDA 12.0 or newer. Previous RMM versions might have supported CUDA 11.x.
fix
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`).
affects: >=25.08.00
breakingThe internal `rmm._lib` module was removed in v25.02.00. Direct imports from this path will result in `ModuleNotFoundError`.
fix
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.
affects: >=25.02.00
breakingRMM v26.02.00 removed host-only memory resources and deprecated certain legacy memory resource interfaces, standardizing on the CCCL interface. Code using `HostMemoryResource` or older `memory_resource` patterns will break.
fix
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.
affects: >=26.02.00
deprecatedDirect access to RMM's internal logger (`rmm.logger`) was deprecated in v24.12.00 and fully removed/refactored in v25.02.00/v25.04.00 to use `rapids-logger`.
fix
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.
affects: >=24.12.00
Upgrade
Version history
26.6.0latest on PyPI · released Jun 9, 2026
Audit
Dependencies
numba-cudaoptionalRequired for certain RMM functionalities and compatibility in some environments (e.g., v25.10.00 notes).
cuda-pythonrequiredUnderpins RMM's CUDA interactions; ensure compatible versions are installed.
Agent activity
20 hits · last 30 days
node
20
Resources
librmm-cu12 — pip install librmm-cu12 · libregistry