Versions in this module Expand all Collapse all v0 v0.9.2 Apr 21, 2024 v0.9.1 Apr 21, 2024 Changes in this version + const BFloat16Kind + const Bits16Kind + const Bits1x8Kind + const Bits2x4Kind + const Bits4x2Kind + const Bits8Kind + const ComplexHalfKind + const Float16Kind + const QInt32Kind + const QInt8Kind + const QUInt2x4Kind + const QUInt4x2Kind + const QUInt8Kind + var CPU Device = Device + var CUDA Cuda = Cuda + var CachedDir string = "NOT_SETTING" + var Debug bool = false + var ModelUrls map[string]string = map[string]string + func CachedPath(filenameOrUrl string, folderOpt ...string) (resolvedPath string, err error) + func CleanCache() error + func IsFloatDType(dtype DType) bool + func PrintMemStats(messageOpt ...string) + type CInt = int32 + type Cuda Device + func (cu Cuda) CudnnIsAvailable() bool + func (cu Cuda) CudnnSetBenchmark(b bool) + func (cu Cuda) DeviceCount() int64 + func (cu Cuda) IsAvailable() bool + type DType int + const BFloat16 + const Bits16 + const Bits1x8 + const Bits2x4 + const Bits4x2 + const Bits8 + const Bool + const ComplexDouble + const ComplexFloat + const ComplexHalf + const Double + const Float + const Half + const Int + const Int16 + const Int64 + const Int8 + const Invalid + const QInt32 + const QInt8 + const QUInt2x4 + const QUInt4x2 + const QUInt8 + const Uint8 + var DefaultDType DType = Float + func CKind2DType(ckind int32) DType + func DTypeFromData(data interface{}) (DType, error) + func GoKind2DType(kind reflect.Kind, opts ...DTypeOpt) (DType, error) + func SetDefaultDType(dtype DType) DType + func (dt DType) CInt() CInt + func (dt DType) CKind() CInt + func (dt DType) GoKind() reflect.Kind + func (dt DType) GoType() (reflect.Type, error) + func (dt DType) Size() uint + func (dt DType) String() string + type DTypeDevice struct + DType DType + Device Device + var DoubleCPU DTypeDevice = DTypeDevice{ ... } + var DoubleCUDA DTypeDevice = DTypeDevice{ ... } + var FloatCPU DTypeDevice = DTypeDevice{ ... } + var FloatCUDA DTypeDevice = DTypeDevice{ ... } + var Int64CPU DTypeDevice = DTypeDevice{ ... } + var Int64CUDA DTypeDevice = DTypeDevice{ ... } + type DTypeOpt func(*DTypeOptions) + func HalfDTypePref(v DType) DTypeOpt + func WithQuantized(v bool) DTypeOpt + type DTypeOptions struct + HalfDTypePref DType + Quantized bool + func DefaultDTypeOptions() *DTypeOptions + type Device struct + Name string + Value int + func CudaBuilder(v uint) Device + func CudaIfAvailable() Device + func NewCuda() Device + func (d Device) CInt() CInt + func (d Device) CudaIfAvailable() Device + func (d Device) IsCuda() bool + func (d Device) OfCInt(v CInt) Device