Manages temporary memory allocations on a GPU device. More...
#include <DeviceMemory.h>
Public Member Functions | |
virtual int | getDevice () const =0 |
Returns the device we are managing memory for. | |
virtual DeviceMemoryReservation | getMemory (cudaStream_t stream, size_t size)=0 |
virtual size_t | getSizeAvailable () const =0 |
Returns the current size available without calling cudaMalloc. | |
virtual std::string | toString () const =0 |
Returns a string containing our current memory manager state. | |
virtual size_t | getHighWaterCudaMalloc () const =0 |
Protected Member Functions | |
virtual void | returnAllocation (DeviceMemoryReservation &m)=0 |
Friends | |
class | DeviceMemoryReservation |
Manages temporary memory allocations on a GPU device.
Definition at line 47 of file DeviceMemory.h.
|
pure virtual |
Returns the high-water mark of cudaMalloc allocations for our device
Implemented in faiss::gpu::StackDeviceMemory.
|
pure virtual |
Obtains a temporary memory allocation for our device, whose usage is ordered with respect to the given stream.
Implemented in faiss::gpu::StackDeviceMemory.