Faiss

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | List of all members
faiss::gpu::StandardGpuResources Class Reference

`#include <StandardGpuResources.h>`

Inheritance diagram for faiss::gpu::StandardGpuResources:

## 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
Public Member Functions inherited from faiss::gpu::GpuResources
cublasHandle_t | getBlasHandleCurrentDevice ()
cudaStream_t | getDefaultStreamCurrentDevice ()
std::vector< cudaStream_t > | getAlternateStreamsCurrentDevice ()
DeviceMemory & | getMemoryManagerCurrentDevice ()
cudaStream_t | getAsyncCopyStreamCurrentDevice ()

## Detailed Description

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.

## Member Function Documentation

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.

The documentation for this class was generated from the following files:

- StandardGpuResources.h
- StandardGpuResources.cpp