Class blazing_device_memory_resource

Inheritance Relationships

Base Type

Class Documentation

class blazing_device_memory_resource : public BlazingMemoryResource

RMM blazing_device_memory_resource class maintains the device memory manager context, including the RMM event log, configuration options, and registered streams.

———————————————————————-* blazing_device_memory_resource is a singleton class, and should be accessed via getInstance().

Public Functions

virtual size_t get_memory_used()
size_t get_max_memory_used()
virtual size_t get_total_memory()
virtual size_t get_from_driver_used_memory()
virtual size_t get_memory_limit()
std::string get_type()
std::string get_full_memory_summary()
void reset_max_memory_used(size_t to = 0)
void initialize(std::string allocation_mode, std::size_t initial_pool_size, std::size_t maximum_pool_size, std::string allocator_logging_file, float device_mem_resouce_consumption_thresh)

Initialize RMM options.

——————————————————————–* allocator : “managed” or “default” or “existing”, where “managed” uses Unified Virtual Memory (UVM) and may use system memory if GPU memory runs out, “default” uses the default Cuda allocation and “existing” assumes rmm allocator is already set and does not initialize it. “managed” is the BlazingSQL default, since it provides the most robustness against OOM errors. pool : if True, BlazingContext will self-allocate a GPU memory pool. can greatly improve performance. initial_pool_size : initial size of memory pool in bytes (if pool=True). if None, and pool=True, defaults to 1/2 GPU memory. maximum_pool_size : maximum size of memory pool in bytes (if pool=True). if None, and pool=True, defaults to all the GPU memory. allocator_logging_file : File that would be used by the allocator logger. If empty, then no allocator logging will be enabled. device_mem_resouce_consumption_thresh : The percent (as a decimal) of total GPU memory that the memory resource

void finalize()


bool isInitialized()

Check whether the blazing_device_memory_resource has been initialized.



true if blazing_device_memory_resource has been initialized.

Public Static Functions

static inline blazing_device_memory_resource &getInstance()

Get the blazing_device_memory_resource instance singleton object.