cuVS Package
Go package: cuvs
Sources: go
Constants
CuvsMemoryNew Constants
Source: go/memory_resource.go:12
Supported Distance Metrics
Supported distance metrics
Source: go/distance.go:14
Variables
CDistances
Maps cuvs Go distances to C distances
Source: go/distance.go:38
DeviceDataPointer
Source: go/dlpack.go:219
NewDeviceDataPointer
Source: go/dlpack.go:274
Types
CuvsError
Source: go/exceptions.go:7
CuvsMemoryCommand
Source: go/memory_resource.go:10
CuvsPoolMemory
Source: go/memory_resource.go:17
Distance
Source: go/distance.go:11
Resource
Resources are objects that are shared between function calls, and includes things like CUDA streams, cuBLAS handles and other resources that are expensive to create.
Source: go/resources.go:11
Tensor
ManagedTensor is a wrapper around a dlpack DLManagedTensor object. This lets you pass matrices in device or host memory into cuvs.
Source: go/dlpack.go:21
TensorNumberType
Source: go/dlpack.go:15
Functions
CheckCuda
Wrapper function to convert cuda error to Go error
Source: go/exceptions.go:18
CheckCuvs
Wrapper function to convert cuvs error to Go error
Source: go/exceptions.go:10
Example
Source: go/memory_resource.go:81
NewCuvsPoolMemory
Creates new CuvsPoolMemory struct initial_pool_size_percent is the initial size of the pool in percent of total available device memory max_pool_size_percent is the maximum size of the pool in percent of total available device memory managed is whether to use CUDA managed memory
Source: go/memory_resource.go:29
NewResource
Returns a new Resource object
Source: go/resources.go:16
NewTensor
Creates a new Tensor on the host and copies the data into it.
Source: go/dlpack.go:27
NewTensorOnDevice
Creates a new Tensor with uninitialized data on the current device.
Source: go/dlpack.go:131
NewVector
Source: go/dlpack.go:79
PairwiseDistance
Computes the pairwise distance between two vectors.
Source: go/distance.go:62
Methods
CuvsPoolMemory.Close
Disables pool memory
Source: go/memory_resource.go:73
Resource.Close
Source: go/resources.go:50
Resource.GetCudaStream
Gets the current cuda stream
Source: go/resources.go:39
Resource.Sync
Syncs the current cuda stream
Source: go/resources.go:34
Tensor.Close
Destroys Tensor, freeing the memory it was allocated on.
Source: go/dlpack.go:184
Tensor.Expand
Expands the Tensor by adding newData to the end of the current data. The Tensor must be on the device.
Source: go/dlpack.go:250
Tensor.Shape
Returns the shape of the Tensor.
Source: go/dlpack.go:244
Tensor.Slice
Returns a slice of the data in the Tensor. The Tensor must be on the host.
Source: go/dlpack.go:358
Tensor.ToDevice
Transfers the data in the Tensor to the device.
Source: go/dlpack.go:216
Tensor.ToHost
Transfers the data in the Tensor to the host.
Source: go/dlpack.go:325