rmm.pylibrmm#
This module contains the low-level Cython bindings for RMM. Some components from this module are re-exported through the top-level rmm module for convenience, while others are available only through this module.
Overview#
rmm.pylibrmm provides the Cython layer that wraps RMM’s C++ functionality:
DeviceBuffer- GPU memory buffer (available asrmm.DeviceBuffer)memory_resource- Memory resource implementations (available asrmm.mr)Logging utilities (available through
rmm)CUDA stream wrappers (documented below)
CUDA Stream Classes#
The stream classes are available only through rmm.pylibrmm and provide low-level CUDA stream management.
rmm.pylibrmm.stream#
- class rmm.pylibrmm.stream.Stream(obj=None)#
Bases:
objectA Stream represents a CUDA stream.
- Parameters:
- obj: optional
If None (the default), a new CUDA stream is created.
If a Numba or CuPy stream is provided, we make a thin wrapper around it.
Methods
is_default(self)Check if we are the default CUDA stream
synchronize(self)Synchronize the CUDA stream
- is_default(self)#
Check if we are the default CUDA stream
- synchronize(self)#
Synchronize the CUDA stream
rmm.pylibrmm.cuda_stream#
- class rmm.pylibrmm.cuda_stream.CudaStream#
Bases:
objectWrapper around a CUDA stream with RAII semantics. When a CudaStream instance is GC’d, the underlying CUDA stream is destroyed.
- class rmm.pylibrmm.cuda_stream.CudaStreamFlags(*values)#
Bases:
IntEnumEnumeration of CUDA stream creation flags.
- Attributes:
- SYNC_DEFAULTint
Created stream synchronizes with the default stream.
- NON_BLOCKINGint
Created stream does not synchronize with the default stream.
Methods
as_integer_ratio(/)Return a pair of integers, whose ratio is equal to the original int.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugate(/)Returns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
is_integer(/)Returns True.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- NON_BLOCKING = 1#
- SYNC_DEFAULT = 0#