Class RMMAllocator
Defined in File rmm_allocator.hpp
Base Type
public holoscan::CudaAllocator(Class CudaAllocator)
- 
class RMMAllocator : public holoscan::CudaAllocator
 RMM (RAPIDS memory manager) allocator.
This is a memory pool which provides a user-specified number of equally sized blocks of memory.
This allocator supports simultaneous memory pools for CUDA device memory and pinned host memory.
Because it is a CudaAllocator it supports both synchronous (
allocate,free) and asynchronous (allocate_asyncandfree_async) APIs for memory allocation.The values for the memory parameters, such as
device_memory_initial_sizemust be specified in the form of a string containing a non-negative integer value followed by a suffix representing the units. Supported units are B, KB, MB, GB and TB where the values are powers of 1024 bytes (e.g., MB = 1024 * 1024 bytes). Examples of valid units are “512MB”, “256 KB”, “1 GB”. If a floating point number is specified that decimal portion will be truncated (i.e. the value is rounded down to the nearest integer).==Parameters==
device_memory_initial_size (std::string, optional): The initial size of the device memory pool. See above for the format accepted. Defaults to “8MB” on aarch64 and “16MB” on x86_64.
device_memory_max_size (std::string, optional): The maximum size of the device memory pool. See above for the format accepted. The default is to use twice the value set for
device_memory_initial_size.host_memory_initial_size (std::string, optional): The initial size of the host memory pool. See above for the format accepted. Defaults to “8MB” on aarch64 and “16MB” on x86_64.
host_memory_max_size (std::string, optional): The maximum size of the host memory pool. See above for the format accepted. The default is to use twice the value set for
device_memory_initial_size.dev_id (int32_t, optional): The CUDA device id specifying which device the memory pool will use (Default: 0).
Public Functions
- 
template<typename ArgT, typename ...ArgsT, typename = std::enable_if_t<!std::is_base_of_v<::holoscan::Resource, std::decay_t<ArgT>> && (std::is_same_v<::holoscan::Arg, std::decay_t<ArgT>> || std::is_same_v<::holoscan::ArgList, std::decay_t<ArgT>>)>>
inline explicit RMMAllocator(ArgT &&arg, ArgsT&&... args) 
- 
RMMAllocator() = default
 
- 
inline RMMAllocator(const std::string &device_memory_initial_size, const std::string &device_memory_max_size, const std::string &host_memory_initial_size, const std::string &host_memory_max_size, int32_t dev_id = 0)
 
- 
RMMAllocator(const std::string &name, nvidia::gxf::RMMAllocator *component)
 
- 
inline virtual const char *gxf_typename() const override
 
- 
virtual void setup(ComponentSpec &spec) override
 Define the resource specification.
- Parameters
 spec – The reference to the component specification.
- 
nvidia::gxf::RMMAllocator *get() const