Documentation
¶
Index ¶
- func NewTPUIndexImpl(cfg types.GPUConfig) (types.Index, error)
- type HBMManager
- type TPUBackend
- type TPUIndex
- func (i *TPUIndex) Add(ids []int64, vectors []float32) error
- func (i *TPUIndex) AddPQ(ids []int64, codes []byte, m int) error
- func (i *TPUIndex) AddTurboQuant(ids []int64, tqData []byte, bitsPerAngle int) error
- func (i *TPUIndex) AssignToClusters(vectors []float32, centroids []float32) ([]uint32, error)
- func (i *TPUIndex) Backend() types.GPUBackend
- func (i *TPUIndex) Clear() error
- func (i *TPUIndex) Close() error
- func (i *TPUIndex) DeviceID() int32
- func (i *TPUIndex) EncodePQ(vectors []float32) ([]byte, error)
- func (i *TPUIndex) GetDeviceInfo() (*types.GPUInfo, error)
- func (i *TPUIndex) GetMemoryInfo() (total, free, used int64, err error)
- func (i *TPUIndex) GetUtilization() (float32, error)
- func (i *TPUIndex) GraphExpand(seeds []uint32, depth int, alpha float32) ([]uint32, []float32, error)
- func (i *TPUIndex) HaversineSearch(centerLat, centerLon float32, points []float32, earthRadius float32) ([]float32, error)
- func (i *TPUIndex) NormBatch(vectors []float32, dims int) ([]float32, error)
- func (i *TPUIndex) PruneNeighbors(candidateIds []uint32, candidateDists []float32, maxNeighbors int, ...) ([]uint32, error)
- func (i *TPUIndex) Reset() error
- func (i *TPUIndex) Search(vector []float32, k int) ([]int64, []float32, error)
- func (i *TPUIndex) SearchBatch(vectors [][]float32, k int) ([][]int64, [][]float32, error)
- func (i *TPUIndex) SearchBatchDistances(query []float32, candidateIDs []uint32) ([]float32, error)
- func (i *TPUIndex) SearchComplex64(vector []uint16, k int) ([]int64, []float32, error)
- func (i *TPUIndex) SearchComplex128(vector []float32, k int) ([]int64, []float32, error)
- func (i *TPUIndex) SearchFloat16(vector []uint16, k int) ([]int64, []float32, error)
- func (i *TPUIndex) SearchGreedy(query []float32, entryPoint uint32, entryDist float32) (uint32, float32, error)
- func (i *TPUIndex) SearchInt8(vector []int8, k int) ([]int64, []float32, error)
- func (i *TPUIndex) SearchInt16(vector []int16, k int) ([]int64, []float32, error)
- func (i *TPUIndex) SearchPQ(lookupTable []float32, m int, k int) ([]int64, []float32, error)
- func (i *TPUIndex) SearchTurboQuant(vector []float32, k int, bitsPerAngle int) ([]int64, []float32, error)
- func (i *TPUIndex) SearchUint8(vector []uint8, k int) ([]int64, []float32, error)
- func (i *TPUIndex) SearchUint16(vector []uint16, k int) ([]int64, []float32, error)
- func (i *TPUIndex) Sync() error
- func (i *TPUIndex) TrainPQ(vectors []float32, m int, k int) error
- func (i *TPUIndex) UpdateGraph(offsets []uint32, neighbors []uint32, weights []float32) error
- type VMEMManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HBMManager ¶
type HBMManager struct {
// contains filtered or unexported fields
}
HBMManager manages High Bandwidth Memory on the TPU. It uses a slab-like allocation strategy to minimize fragmentation.
func NewHBMManager ¶
func NewHBMManager(total int64) *HBMManager
type TPUBackend ¶
type TPUBackend struct {
// contains filtered or unexported fields
}
func NewTPUBackend ¶
func NewTPUBackend(deviceID int32) (*TPUBackend, error)
func (*TPUBackend) GetDeviceInfo ¶
func (b *TPUBackend) GetDeviceInfo() (*types.GPUInfo, error)
func (*TPUBackend) Initialize ¶
func (b *TPUBackend) Initialize() error
type TPUIndex ¶
type TPUIndex struct {
// contains filtered or unexported fields
}
func (*TPUIndex) AddTurboQuant ¶
func (*TPUIndex) AssignToClusters ¶
func (*TPUIndex) Backend ¶
func (i *TPUIndex) Backend() types.GPUBackend
func (*TPUIndex) GetMemoryInfo ¶
func (*TPUIndex) GetUtilization ¶
func (*TPUIndex) GraphExpand ¶
func (*TPUIndex) HaversineSearch ¶
func (*TPUIndex) PruneNeighbors ¶
func (*TPUIndex) SearchBatch ¶
func (*TPUIndex) SearchBatchDistances ¶
func (*TPUIndex) SearchComplex64 ¶
func (*TPUIndex) SearchComplex128 ¶
func (*TPUIndex) SearchFloat16 ¶
func (*TPUIndex) SearchGreedy ¶
func (*TPUIndex) SearchInt8 ¶
func (*TPUIndex) SearchInt16 ¶
func (*TPUIndex) SearchTurboQuant ¶
func (*TPUIndex) SearchUint8 ¶
func (*TPUIndex) SearchUint16 ¶
type VMEMManager ¶
type VMEMManager struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.