#include <StandardGpuResources.h>
Public Member Functions | |
void | noTempMemory () |
void | setTempMemory (size_t size) |
void | setTempMemoryFraction (float fraction) |
void | setPinnedMemory (size_t size) |
void | initializeForDevice (int device) override |
Internal system calls. | |
cublasHandle_t | getBlasHandle (int device) override |
cudaStream_t | getDefaultStream (int device) override |
std::vector< cudaStream_t > | getAlternateStreams (int device) override |
DeviceMemory & | getMemoryManager (int device) override |
std::pair< void *, size_t > | getPinnedMemory () override |
cudaStream_t | getAsyncCopyStream (int device) override |
![]() | |
cublasHandle_t | getBlasHandleCurrentDevice () |
cudaStream_t | getDefaultStreamCurrentDevice () |
std::vector< cudaStream_t > | getAlternateStreamsCurrentDevice () |
DeviceMemory & | getMemoryManagerCurrentDevice () |
cudaStream_t | getAsyncCopyStreamCurrentDevice () |
Default implementation of GpuResources that allocates a cuBLAS stream and 2 streams for use, as well as temporary memory
Definition at line 24 of file StandardGpuResources.h.
void faiss::gpu::StandardGpuResources::noTempMemory | ( | ) |
Disable allocation of temporary memory; all temporary memory requests will call cudaMalloc / cudaFree at the point of use
Definition at line 72 of file StandardGpuResources.cpp.
void faiss::gpu::StandardGpuResources::setPinnedMemory | ( | size_t | size | ) |
Set amount of pinned memory to allocate, for async GPU <-> CPU transfers
Definition at line 90 of file StandardGpuResources.cpp.
void faiss::gpu::StandardGpuResources::setTempMemory | ( | size_t | size | ) |
Specify that we wish to use a certain fixed size of memory on all devices as temporary memory
Definition at line 77 of file StandardGpuResources.cpp.
void faiss::gpu::StandardGpuResources::setTempMemoryFraction | ( | float | fraction | ) |
Specify that we wish to use a certain fraction of memory on all devices as temporary memory
Definition at line 83 of file StandardGpuResources.cpp.