Struct faiss::gpu::AllocRequest

struct AllocRequest : public faiss::gpu::AllocInfo

Information on what/where an allocation is, along with how big it should be.

Public Functions

inline AllocRequest()
inline AllocRequest(const AllocInfo &info, size_t sz)
inline AllocRequest(AllocType at, int dev, MemorySpace sp, cudaStream_t st, size_t sz)
std::string toString() const

Returns a string representation of this request.

Public Members

size_t size = 0

The size in bytes of the allocation.

AllocType type = AllocType::Other

The internal category of the allocation.

int device = 0

The device on which the allocation is happening.

MemorySpace space = MemorySpace::Device

The memory space of the allocation.

cudaStream_t stream = nullptr

The stream on which new work on the memory will be ordered (e.g., if a piece of memory cached and to be returned for this call was last used on stream 3 and a new memory request is for stream 4, the memory manager will synchronize stream 4 to wait for the completion of stream 3 via events or other stream synchronization.

The memory manager guarantees that the returned memory is free to use without data races on this stream specified.