vt::Mempool#
-
void vt::check_cuda_errors(cudaError_t err, const std::string &message)#
Check the CUDA errors.
- Parameters:
err – The CUDA error code.
message – The error message.
-
int vt::get_number_of_gpus()#
Get the number of GPUs.
- Returns:
int: The number of GPUs.
-
class Mempool#
A class that manages a memory pool for the current GPU.
Public Functions
-
class MempoolImpl#
Private implementation pointer. This could reduce compilation time for RMM headers.
-
class MempoolImpl#
-
class PinnedMempool#
A class that manages a pinned memory pool.
Public Functions
-
PinnedMempool(size_t initial_pinned_pool_size, size_t pinned_pool_size)#
Construct a PinnedMempool object.
- Parameters:
initial_pinned_pool_size – The initial size of the pinned memory pool.
pinned_pool_size – The size of the pinned memory pool.
-
~PinnedMempool()#
Destroy the PinnedMempool object.
-
void deallocate(void *ptr, size_t size)#
Deallocate the memory for the given pointer and size.
- Parameters:
ptr – The pointer to the memory.
size – The size of the memory.
-
void *allocate(size_t size)#
Allocate the memory for the given size.
- Parameters:
size – The size of the memory.
- Returns:
void*: The pointer to the allocated memory.
-
class PinnedMempoolImpl#
Private implementation pointer for PinnedMempool. This could reduce compilation time for RMM headers.
-
PinnedMempool(size_t initial_pinned_pool_size, size_t pinned_pool_size)#
-
class GlobalMempool#
Singleton class for global memory pool management.
Public Static Functions
-
static GlobalMempool &get_instance(size_t pool_size)#
Get the Instance object. It returns the singleton instance of the global memory pool.
- Parameters:
pool_size – The size of the memory pool.
- Returns:
GlobalMempool&: The global memory pool instance.
-
static GlobalMempool &get_instance(size_t pool_size)#
-
class GlobalMempoolInitializer#
Global memory pool initializer for VTensor.