Versions in this module Expand all Collapse all v0 v0.1.0 Jan 11, 2026 v0.0.4 Jan 11, 2026 v0.0.3 Jan 10, 2026 v0.0.2 Jan 10, 2026 v0.0.1 Jan 10, 2026 Changes in this version + const ReductionMean + const ReductionNone + const ReductionSum + const VariantDType + const VariantDevice + const VariantIntPair + const VariantShape + const VariantTensor + const VariantTensorList + const VariantUintptr + var ErrCUDANotAvailable = &BackendError + var ErrNoBackend = &BackendError + var ErrShapeMismatch = errors.New("data length does not match shape") + var ErrZeroStep = errors.New("step cannot be zero") + var IdentityAbs = pipz.NewIdentity("abs", "Element-wise absolute value") + var IdentityAdaptiveAvgPool2d = pipz.NewIdentity("adaptiveavgpool2d", "Adaptive 2D average pooling") + var IdentityAdaptiveMaxPool2d = pipz.NewIdentity("adaptivemaxpool2d", "Adaptive 2D max pooling") + var IdentityAdd = pipz.NewIdentity("add", "Element-wise addition") + var IdentityArgMax = pipz.NewIdentity("argmax", "Argument maximum reduction") + var IdentityArgMin = pipz.NewIdentity("argmin", "Argument minimum reduction") + var IdentityAvgPool2d = pipz.NewIdentity("avgpool2d", "2D average pooling") + var IdentityBatchNorm2d = pipz.NewIdentity("batchnorm2d", "Batch normalization over 4D input") + var IdentityCat = pipz.NewIdentity("cat", "Concatenate tensors") + var IdentityClamp = pipz.NewIdentity("clamp", "Element-wise clamp to range") + var IdentityConv2d = pipz.NewIdentity("conv2d", "2D convolution") + var IdentityConvTranspose2d = pipz.NewIdentity("convtranspose2d", "2D transposed convolution") + var IdentityCos = pipz.NewIdentity("cos", "Element-wise cosine") + var IdentityCrossEntropyLoss = pipz.NewIdentity("cross_entropy", "Cross entropy loss") + var IdentityDiv = pipz.NewIdentity("div", "Element-wise division") + var IdentityDropout = pipz.NewIdentity("dropout", "Dropout regularization") + var IdentityEmbedding = pipz.NewIdentity("embedding", "Embedding lookup") + var IdentityExp = pipz.NewIdentity("exp", "Element-wise exponential") + var IdentityExpand = pipz.NewIdentity("expand", "Expand/broadcast tensor") + var IdentityFlatten = pipz.NewIdentity("flatten", "Flatten dimensions") + var IdentityGELU = pipz.NewIdentity("gelu", "GELU activation") + var IdentityGroupNorm = pipz.NewIdentity("groupnorm", "Group normalization") + var IdentityInstanceNorm2d = pipz.NewIdentity("instancenorm2d", "Instance normalization over 4D input") + var IdentityL1Loss = pipz.NewIdentity("l1_loss", "L1 loss") + var IdentityLayerNorm = pipz.NewIdentity("layernorm", "Layer normalization") + var IdentityLeakyReLU = pipz.NewIdentity("leaky_relu", "Leaky ReLU activation") + var IdentityLog = pipz.NewIdentity("log", "Element-wise natural logarithm") + var IdentityLogSoftmax = pipz.NewIdentity("logsoftmax", "Log softmax activation") + var IdentityMSELoss = pipz.NewIdentity("mse_loss", "Mean squared error loss") + var IdentityMatMul = pipz.NewIdentity("matmul", "Matrix multiplication") + var IdentityMax = pipz.NewIdentity("max", "Max reduction") + var IdentityMaxPool2d = pipz.NewIdentity("maxpool2d", "2D max pooling") + var IdentityMean = pipz.NewIdentity("mean", "Mean reduction") + var IdentityMin = pipz.NewIdentity("min", "Min reduction") + var IdentityMul = pipz.NewIdentity("mul", "Element-wise multiplication") + var IdentityNLLLoss = pipz.NewIdentity("nll_loss", "Negative log likelihood loss") + var IdentityNarrow = pipz.NewIdentity("narrow", "Narrow tensor along dimension") + var IdentityNeg = pipz.NewIdentity("neg", "Element-wise negation") + var IdentityPermute = pipz.NewIdentity("permute", "Permute dimensions") + var IdentityPow = pipz.NewIdentity("pow", "Element-wise power") + var IdentityProd = pipz.NewIdentity("prod", "Product reduction") + var IdentityRMSNorm = pipz.NewIdentity("rmsnorm", "Root mean square normalization") + var IdentityReLU = pipz.NewIdentity("relu", "ReLU activation") + var IdentityReshape = pipz.NewIdentity("reshape", "Reshape tensor") + var IdentitySiLU = pipz.NewIdentity("silu", "SiLU activation") + var IdentitySigmoid = pipz.NewIdentity("sigmoid", "Sigmoid activation") + var IdentitySign = pipz.NewIdentity("sign", "Element-wise sign") + var IdentitySin = pipz.NewIdentity("sin", "Element-wise sine") + var IdentitySlice = pipz.NewIdentity("slice", "Slice tensor") + var IdentitySoftmax = pipz.NewIdentity("softmax", "Softmax activation") + var IdentitySqrt = pipz.NewIdentity("sqrt", "Element-wise square root") + var IdentitySquare = pipz.NewIdentity("square", "Element-wise square") + var IdentitySqueeze = pipz.NewIdentity("squeeze", "Squeeze dimensions") + var IdentityStack = pipz.NewIdentity("stack", "Stack tensors") + var IdentityStd = pipz.NewIdentity("std", "Standard deviation reduction") + var IdentitySub = pipz.NewIdentity("sub", "Element-wise subtraction") + var IdentitySum = pipz.NewIdentity("sum", "Sum reduction") + var IdentityT = pipz.NewIdentity("t", "Transpose last two dimensions") + var IdentityTanh = pipz.NewIdentity("tanh", "Tanh activation") + var IdentityTransfer = pipz.NewIdentity("transfer", "Device transfer") + var IdentityTranspose = pipz.NewIdentity("transpose", "Matrix transpose") + var IdentityTril = pipz.NewIdentity("tril", "Lower triangular matrix extraction") + var IdentityUnsqueeze = pipz.NewIdentity("unsqueeze", "Unsqueeze dimension") + var IdentityVar = pipz.NewIdentity("var", "Variance reduction") + var IdentityView = pipz.NewIdentity("view", "View tensor with new shape") + var IdentityWhere = pipz.NewIdentity("where", "Element-wise conditional selection") + var KeyBias = capitan.NewKey[*Tensor]("bias", VariantTensor) + var KeyBytes = capitan.NewIntKey("bytes") + var KeyCondition = capitan.NewKey[*Tensor]("condition", VariantTensor) + var KeyConvStride = capitan.NewKey[[2]int]("conv_stride", VariantIntPair) + var KeyDevice = capitan.NewKey[Device]("device", VariantDevice) + var KeyDilation = capitan.NewKey[[2]int]("dilation", VariantIntPair) + var KeyDim = capitan.NewIntKey("dim") + var KeyDim0 = capitan.NewIntKey("dim0") + var KeyDim1 = capitan.NewIntKey("dim1") + var KeyDims = capitan.NewKey[[]int]("dims", VariantShape) + var KeyDstType = capitan.NewKey[DType]("dst_dtype", VariantDType) + var KeyEnd = capitan.NewIntKey("end") + var KeyEpsilon = capitan.NewFloat32Key("epsilon") + var KeyFromDevice = capitan.NewKey[Device]("from_device", VariantDevice) + var KeyGroups = capitan.NewIntKey("groups") + var KeyIndices = capitan.NewKey[*Tensor]("indices", VariantTensor) + var KeyInput = capitan.NewKey[*Tensor]("input", VariantTensor) + var KeyInputA = capitan.NewKey[*Tensor]("input_a", VariantTensor) + var KeyInputB = capitan.NewKey[*Tensor]("input_b", VariantTensor) + var KeyInputs = capitan.NewKey[[]*Tensor]("inputs", VariantTensorList) + var KeyK = capitan.NewIntKey("k") + var KeyKernelSize = capitan.NewKey[[2]int]("kernel_size", VariantIntPair) + var KeyMax = capitan.NewFloat32Key("max") + var KeyMin = capitan.NewFloat32Key("min") + var KeyMomentum = capitan.NewFloat32Key("momentum") + var KeyNormalizedShape = capitan.NewKey[[]int]("normalized_shape", VariantShape) + var KeyNumGroups = capitan.NewIntKey("num_groups") + var KeyOpName = capitan.NewStringKey("op_name") + var KeyOther = capitan.NewKey[*Tensor]("other", VariantTensor) + var KeyOutput = capitan.NewKey[*Tensor]("output", VariantTensor) + var KeyOutputPadding = capitan.NewKey[[2]int]("output_padding", VariantIntPair) + var KeyOutputSize = capitan.NewKey[[2]int]("output_size", VariantIntPair) + var KeyPadding = capitan.NewKey[[2]int]("padding", VariantIntPair) + var KeyPermutation = capitan.NewKey[[]int]("permutation", VariantShape) + var KeyPoolStride = capitan.NewKey[[2]int]("pool_stride", VariantIntPair) + var KeyReduction = capitan.NewStringKey("reduction") + var KeyRunningMean = capitan.NewKey[*Tensor]("running_mean", VariantTensor) + var KeyRunningVar = capitan.NewKey[*Tensor]("running_var", VariantTensor) + var KeyScalar = capitan.NewFloat32Key("scalar") + var KeyShape = capitan.NewKey[[]int]("shape", VariantShape) + var KeySourceDevice = capitan.NewKey[Device]("source_device", VariantDevice) + var KeySrcType = capitan.NewKey[DType]("src_dtype", VariantDType) + var KeyStart = capitan.NewIntKey("start") + var KeyTarget = capitan.NewKey[*Tensor]("target", VariantTensor) + var KeyTargetDevice = capitan.NewKey[Device]("target_device", VariantDevice) + var KeyToDevice = capitan.NewKey[Device]("to_device", VariantDevice) + var KeyTraceID = capitan.NewStringKey("trace_id") + var KeyWeight = capitan.NewKey[*Tensor]("weight", VariantTensor) + var OpAbs = capitan.NewSignal("tendo.op.abs", "Absolute value") + var OpAdaptiveAvgPool2d = capitan.NewSignal("tendo.op.adaptiveavgpool2d", "Adaptive 2D average pooling") + var OpAdaptiveMaxPool2d = capitan.NewSignal("tendo.op.adaptivemaxpool2d", "Adaptive 2D max pooling") + var OpAdd = capitan.NewSignal("tendo.op.add", "Element-wise addition") + var OpArgMax = capitan.NewSignal("tendo.op.argmax", "Argmax") + var OpArgMin = capitan.NewSignal("tendo.op.argmin", "Argmin") + var OpAvgPool2d = capitan.NewSignal("tendo.op.avgpool2d", "2D average pooling") + var OpBatchNorm = capitan.NewSignal("tendo.op.batchnorm", "Batch normalization") + var OpCast = capitan.NewSignal("tendo.op.cast", "Type cast") + var OpCat = capitan.NewSignal("tendo.op.cat", "Concatenate") + var OpClamp = capitan.NewSignal("tendo.op.clamp", "Clamp values") + var OpConv2d = capitan.NewSignal("tendo.op.conv2d", "2D convolution") + var OpConvTranspose2d = capitan.NewSignal("tendo.op.convtranspose2d", "2D transposed convolution") + var OpCos = capitan.NewSignal("tendo.op.cos", "Cosine") + var OpCrossEntropyLoss = capitan.NewSignal("tendo.op.cross_entropy", "Cross entropy loss") + var OpDiv = capitan.NewSignal("tendo.op.div", "Element-wise division") + var OpDropout = capitan.NewSignal("tendo.op.dropout", "Dropout") + var OpEmbedding = capitan.NewSignal("tendo.op.embedding", "Embedding lookup") + var OpExp = capitan.NewSignal("tendo.op.exp", "Exponential") + var OpExpand = capitan.NewSignal("tendo.op.expand", "Expand/broadcast") + var OpGELU = capitan.NewSignal("tendo.op.gelu", "GELU activation") + var OpGroupNorm = capitan.NewSignal("tendo.op.groupnorm", "Group normalization") + var OpInstanceNorm = capitan.NewSignal("tendo.op.instancenorm", "Instance normalization") + var OpL1Loss = capitan.NewSignal("tendo.op.l1_loss", "L1 loss") + var OpLayerNorm = capitan.NewSignal("tendo.op.layernorm", "Layer normalization") + var OpLeakyReLU = capitan.NewSignal("tendo.op.leaky_relu", "Leaky ReLU activation") + var OpLog = capitan.NewSignal("tendo.op.log", "Natural logarithm") + var OpLogSoftmax = capitan.NewSignal("tendo.op.logsoftmax", "Log softmax") + var OpMSELoss = capitan.NewSignal("tendo.op.mse_loss", "Mean squared error loss") + var OpMatMul = capitan.NewSignal("tendo.op.matmul", "Matrix multiplication") + var OpMax = capitan.NewSignal("tendo.op.max", "Max reduction") + var OpMaxPool2d = capitan.NewSignal("tendo.op.maxpool2d", "2D max pooling") + var OpMean = capitan.NewSignal("tendo.op.mean", "Mean reduction") + var OpMin = capitan.NewSignal("tendo.op.min", "Min reduction") + var OpMul = capitan.NewSignal("tendo.op.mul", "Element-wise multiplication") + var OpNLLLoss = capitan.NewSignal("tendo.op.nll_loss", "Negative log likelihood loss") + var OpNeg = capitan.NewSignal("tendo.op.neg", "Negation") + var OpPermute = capitan.NewSignal("tendo.op.permute", "Dimension permutation") + var OpPow = capitan.NewSignal("tendo.op.pow", "Power") + var OpProd = capitan.NewSignal("tendo.op.prod", "Product reduction") + var OpRMSNorm = capitan.NewSignal("tendo.op.rmsnorm", "RMS normalization") + var OpReLU = capitan.NewSignal("tendo.op.relu", "ReLU activation") + var OpReshape = capitan.NewSignal("tendo.op.reshape", "Reshape") + var OpSiLU = capitan.NewSignal("tendo.op.silu", "SiLU/Swish activation") + var OpSigmoid = capitan.NewSignal("tendo.op.sigmoid", "Sigmoid activation") + var OpSign = capitan.NewSignal("tendo.op.sign", "Sign function") + var OpSin = capitan.NewSignal("tendo.op.sin", "Sine") + var OpSlice = capitan.NewSignal("tendo.op.slice", "Slice") + var OpSoftmax = capitan.NewSignal("tendo.op.softmax", "Softmax") + var OpSqrt = capitan.NewSignal("tendo.op.sqrt", "Square root") + var OpSquare = capitan.NewSignal("tendo.op.square", "Square") + var OpSqueeze = capitan.NewSignal("tendo.op.squeeze", "Squeeze dimension") + var OpStack = capitan.NewSignal("tendo.op.stack", "Stack") + var OpStd = capitan.NewSignal("tendo.op.std", "Standard deviation reduction") + var OpSub = capitan.NewSignal("tendo.op.sub", "Element-wise subtraction") + var OpSum = capitan.NewSignal("tendo.op.sum", "Sum reduction") + var OpTanh = capitan.NewSignal("tendo.op.tanh", "Tanh activation") + var OpTransfer = capitan.NewSignal("tendo.op.transfer", "Device transfer") + var OpTranspose = capitan.NewSignal("tendo.op.transpose", "Transpose") + var OpTril = capitan.NewSignal("tendo.op.tril", "Lower triangular") + var OpUnsqueeze = capitan.NewSignal("tendo.op.unsqueeze", "Unsqueeze dimension") + var OpVar = capitan.NewSignal("tendo.op.var", "Variance reduction") + var OpWhere = capitan.NewSignal("tendo.op.where", "Conditional select") + var PoolAlloc = capitan.NewSignal("tendo.pool.alloc", "Memory allocated from pool") + var PoolFree = capitan.NewSignal("tendo.pool.free", "Memory returned to pool") + var TensorCreated = capitan.NewSignal("tendo.tensor.created", "Tensor allocated") + var TensorFreed = capitan.NewSignal("tendo.tensor.freed", "Tensor deallocated") + var TensorTransfer = capitan.NewSignal("tendo.tensor.transfer", "Tensor moved between devices") + func BFloat() pipz.Chainable[*Tensor] + func BFloat16SliceToFloat32(bf16 []uint16) []float32 + func BFloat16ToFloat32(b uint16) float32 + func BinaryOp(identity pipz.Identity, other *Tensor, ...) pipz.Chainable[*Tensor] + func BroadcastShapes(a, b []int) ([]int, error) + func CanBroadcast(a, b []int) bool + func ComputeStrides(shape []int) []int + func Conv2dOutputShape(inputShape, weightShape []int, config Conv2dConfig) []int + func CoordsToFlat(coords, strides []int) int + func Fallback(name string, processors ...pipz.Chainable[*Tensor]) *pipz.Fallback[*Tensor] + func Filter(name string, predicate func(context.Context, *Tensor) bool, ...) *pipz.Filter[*Tensor] + func FlatToCoords(flat int, shape []int) []int + func FlatToReducedIndex(flat int, shape, strides, outStrides []int, skipDims map[int]bool) int + func FlatToStrided(flat int, shape, stride []int, offset int) int + func Float() pipz.Chainable[*Tensor] + func Float16SliceToFloat32(f16 []uint16) []float32 + func Float16ToFloat32(h uint16) float32 + func Float32SliceToBFloat16(f32 []float32) []uint16 + func Float32SliceToFloat16(f32 []float32) []uint16 + func Float32ToBFloat16(f float32) uint16 + func Float32ToFloat16(f float32) uint16 + func Half() pipz.Chainable[*Tensor] + func InferShape(numel int, shape []int) ([]int, error) + func IsContiguous(shape, stride []int) bool + func IsTraining(ctx context.Context) bool + func IterateSlices(shape, strides []int, dim int, fn func(baseIdx, dimStride int)) + func IterateStrided(numel int, shape, stride []int, offset int, fn func(flatIdx, stridedIdx int)) + func MakeContiguous() pipz.Chainable[*Tensor] + func Numel(shape []int) int + func Op(identity pipz.Identity, fn func(context.Context, *Tensor) (*Tensor, error)) pipz.Chainable[*Tensor] + func Pin() pipz.Chainable[*Tensor] + func ReduceShapeAndStrides(shape []int, skipDims map[int]bool) (outShape, outStrides []int) + func RegisterBackend(b StorageBackend) + func RegisterMemoryAllocator(dt DeviceType, alloc MemoryAllocator) + func Sequence(name string, processors ...pipz.Chainable[*Tensor]) *pipz.Sequence[*Tensor] + func SetDefaultDType(d DType) + func SetDefaultPool(p *Pool) + func SliceBaseIndex(sliceIdx int, shape, strides []int, dim int) int + func SqueezeShape(shape []int, dim int) ([]int, error) + func Switch(name string, condition func(context.Context, *Tensor) string) *pipz.Switch[*Tensor] + func Sync() pipz.Chainable[*Tensor] + func Timeout(name string, processor pipz.Chainable[*Tensor], duration time.Duration) *pipz.Timeout[*Tensor] + func To(device Device) pipz.Chainable[*Tensor] + func ToBFloat16() pipz.Chainable[*Tensor] + func ToCPU() pipz.Chainable[*Tensor] + func ToDType(dtype DType) pipz.Chainable[*Tensor] + func ToFloat16() pipz.Chainable[*Tensor] + func ToFloat32() pipz.Chainable[*Tensor] + func ToGPU(index int) pipz.Chainable[*Tensor] + func TraceID(ctx context.Context) string + func Transform(identity pipz.Identity, fn func(context.Context, *Tensor) *Tensor) pipz.Chainable[*Tensor] + func TransposeShape(shape []int, dim0, dim1 int) ([]int, error) + func TransposeStride(stride []int, dim0, dim1 int) ([]int, error) + func UnaryOp(identity pipz.Identity, fn func(*CPUStorage) *CPUStorage) pipz.Chainable[*Tensor] + func UnaryOpGeneric(identity pipz.Identity, fn func(CPUDataAccessor) *CPUStorage) pipz.Chainable[*Tensor] + func UnaryOpInPlace(identity pipz.Identity, fn func(*CPUStorage)) pipz.Chainable[*Tensor] + func Unpin() pipz.Chainable[*Tensor] + func UnsqueezeShape(shape []int, dim int) ([]int, error) + func ValidateElementwise(a, b []int) ([]int, error) + func ValidateMatMul(a, b []int) ([]int, error) + func WithInference(ctx context.Context) context.Context + func WithPool(ctx context.Context, p *Pool) context.Context + func WithTraceID(ctx context.Context, id string) context.Context + func WithTraining(ctx context.Context) context.Context + type Abs struct + func NewAbs(backend UnaryOps) *Abs + func (a *Abs) Close() error + func (a *Abs) Identity() pipz.Identity + func (a *Abs) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (a *Abs) Schema() pipz.Node + type ActivationOps interface + Dropout func(ctx context.Context, t *Tensor, p float32, training bool) (*Tensor, error) + LeakyReLU func(ctx context.Context, t *Tensor, negativeSlope float32) (*Tensor, error) + LogSoftmax func(ctx context.Context, t *Tensor, dim int) (*Tensor, error) + Softmax func(ctx context.Context, t *Tensor, dim int) (*Tensor, error) + type AdaptiveAvgPool2d struct + func NewAdaptiveAvgPool2d(backend PoolOps, outputSize [2]int) *AdaptiveAvgPool2d + func (a *AdaptiveAvgPool2d) Close() error + func (a *AdaptiveAvgPool2d) Identity() pipz.Identity + func (a *AdaptiveAvgPool2d) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (a *AdaptiveAvgPool2d) Schema() pipz.Node + type AdaptiveMaxPool2d struct + func NewAdaptiveMaxPool2d(backend PoolOps, outputSize [2]int) *AdaptiveMaxPool2d + func (a *AdaptiveMaxPool2d) Close() error + func (a *AdaptiveMaxPool2d) Identity() pipz.Identity + func (a *AdaptiveMaxPool2d) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (a *AdaptiveMaxPool2d) Schema() pipz.Node + type Add struct + func NewAdd(backend BinaryOps, other *Tensor) *Add + func (a *Add) Close() error + func (a *Add) Identity() pipz.Identity + func (a *Add) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (a *Add) Schema() pipz.Node + type ArgMax struct + func NewArgMax(backend ReduceOps, dim int, keepdim bool) *ArgMax + func (a *ArgMax) Close() error + func (a *ArgMax) Identity() pipz.Identity + func (a *ArgMax) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (a *ArgMax) Schema() pipz.Node + type ArgMin struct + func NewArgMin(backend ReduceOps, dim int, keepdim bool) *ArgMin + func (a *ArgMin) Close() error + func (a *ArgMin) Identity() pipz.Identity + func (a *ArgMin) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (a *ArgMin) Schema() pipz.Node + type ArithmeticBackend interface + type AvgPool2d struct + func NewAvgPool2d(backend PoolOps, config Pool2dConfig) *AvgPool2d + func (a *AvgPool2d) Close() error + func (a *AvgPool2d) Identity() pipz.Identity + func (a *AvgPool2d) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (a *AvgPool2d) Schema() pipz.Node + type Backend interface + type BackendError struct + Message string + func (e *BackendError) Error() string + func (e *BackendError) Is(target error) bool + type BatchNorm2d struct + func NewBatchNorm2d(backend NormOps, weight, bias, runningMean, runningVar *Tensor, ...) *BatchNorm2d + func (b *BatchNorm2d) Close() error + func (b *BatchNorm2d) Identity() pipz.Identity + func (b *BatchNorm2d) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (b *BatchNorm2d) Schema() pipz.Node + type BinaryOps interface + Add func(ctx context.Context, a, b *Tensor) (*Tensor, error) + Div func(ctx context.Context, a, b *Tensor) (*Tensor, error) + Mul func(ctx context.Context, a, b *Tensor) (*Tensor, error) + Pow func(ctx context.Context, t *Tensor, exp float32) (*Tensor, error) + Sub func(ctx context.Context, a, b *Tensor) (*Tensor, error) + type CPUDataAccessor interface + Data func() []float32 + Fill func(value float32) + GetData func(index int) float32 + SetData func(index int, value float32) + type CPUInt64DataAccessor interface + Int64Data func() []int64 + type CPUStorage struct + func AllocCPUFromContext(ctx context.Context, numel int, dtype DType) *CPUStorage + func NewCPUInt64StorageFromSlice(data []int64) *CPUStorage + func NewCPUStorage(numel int, dtype DType) *CPUStorage + func NewCPUStorageFromSlice(data []float32, dtype DType) *CPUStorage + func (s *CPUStorage) Clone() Storage + func (s *CPUStorage) DType() DType + func (s *CPUStorage) Data() []float32 + func (s *CPUStorage) Device() Device + func (s *CPUStorage) Fill(value float32) + func (s *CPUStorage) Free() + func (s *CPUStorage) GetData(index int) float32 + func (s *CPUStorage) Int64Data() []int64 + func (s *CPUStorage) Len() int + func (s *CPUStorage) PoolKey() (numel int, dtype DType, deviceIndex int) + func (s *CPUStorage) Ptr() uintptr + func (s *CPUStorage) SetData(index int, value float32) + func (s *CPUStorage) Size() int + type CUDAError struct + Code int + Message string + func (e *CUDAError) Error() string + type Cat struct + func NewCat(backend ShapeOps, tensors []*Tensor, dim int) *Cat + func (c *Cat) Close() error + func (c *Cat) Identity() pipz.Identity + func (c *Cat) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (c *Cat) Schema() pipz.Node + type Clamp struct + func NewClamp(backend CompareOps, minVal, maxVal float32) *Clamp + func (c *Clamp) Close() error + func (c *Clamp) Identity() pipz.Identity + func (c *Clamp) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (c *Clamp) Schema() pipz.Node + type CompareBackend interface + type CompareOps interface + Clamp func(ctx context.Context, t *Tensor, minVal, maxVal float32) (*Tensor, error) + Tril func(ctx context.Context, t *Tensor, k int) (*Tensor, error) + Where func(ctx context.Context, condition, x, y *Tensor) (*Tensor, error) + type ContiguousMaker interface + MakeContiguous func(shape, stride []int, offset int) (Storage, error) + type Conv2d struct + func NewConv2d(backend ConvOps, weight *Tensor, config Conv2dConfig) *Conv2d + func NewConv2dSimple(backend ConvOps, weight *Tensor, stride int) *Conv2d + func (c *Conv2d) Close() error + func (c *Conv2d) Identity() pipz.Identity + func (c *Conv2d) Process(ctx context.Context, input *Tensor) (*Tensor, error) + func (c *Conv2d) Schema() pipz.Node + type Conv2dConfig struct + Dilation [2]int + Groups int + Padding [2]int + Stride [2]int + func DefaultConv2dConfig() Conv2dConfig + type ConvOps interface + Conv2d func(ctx context.Context, input, weight *Tensor, padding, stride, dilation [2]int, ...) (*Tensor, error) + ConvTranspose2d func(ctx context.Context, input, weight *Tensor, ...) (*Tensor, error) + type ConvTranspose2d struct + func NewConvTranspose2d(backend ConvOps, weight *Tensor, config ConvTranspose2dConfig) *ConvTranspose2d + func (c *ConvTranspose2d) Close() error + func (c *ConvTranspose2d) Identity() pipz.Identity + func (c *ConvTranspose2d) Process(ctx context.Context, input *Tensor) (*Tensor, error) + func (c *ConvTranspose2d) Schema() pipz.Node + type ConvTranspose2dConfig struct + Dilation [2]int + Groups int + OutputPadding [2]int + Padding [2]int + Stride [2]int + func DefaultConvTranspose2dConfig() ConvTranspose2dConfig + type CoreBackend interface + type Cos struct + func NewCos(backend UnaryOps) *Cos + func (c *Cos) Close() error + func (c *Cos) Identity() pipz.Identity + func (c *Cos) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (c *Cos) Schema() pipz.Node + type CrossEntropyLoss struct + func NewCrossEntropyLoss(backend LossOps, target *Tensor, reduction string) *CrossEntropyLoss + func (c *CrossEntropyLoss) Close() error + func (c *CrossEntropyLoss) Identity() pipz.Identity + func (c *CrossEntropyLoss) Process(ctx context.Context, input *Tensor) (*Tensor, error) + func (c *CrossEntropyLoss) Schema() pipz.Node + type DType uint8 + const BFloat16 + const Float16 + const Float32 + const Int64 + func DefaultDType() DType + func (d DType) Size() int + func (d DType) String() string + type Device struct + Index int + Type DeviceType + func CPUDevice() Device + func CUDADevice(index int) Device + func (d Device) IsCPU() bool + func (d Device) IsCUDA() bool + func (d Device) String() string + type DeviceError struct + Expected DeviceType + Got DeviceType + func (e *DeviceError) Error() string + func (e *DeviceError) Is(target error) bool + type DeviceInfo interface + DeviceCount func() int + DeviceType func() DeviceType + IsAvailable func() bool + type DeviceMismatchError struct + A Device + B Device + func (e *DeviceMismatchError) Error() string + func (e *DeviceMismatchError) Is(target error) bool + type DeviceType uint8 + const CPU + const CUDA + func (d DeviceType) String() string + type Div struct + func NewDiv(backend BinaryOps, other *Tensor) *Div + func (d *Div) Close() error + func (d *Div) Identity() pipz.Identity + func (d *Div) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (d *Div) Schema() pipz.Node + type Dropout struct + func NewDropout(backend ActivationOps, p float32) *Dropout + func (d *Dropout) Close() error + func (d *Dropout) Identity() pipz.Identity + func (d *Dropout) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (d *Dropout) Schema() pipz.Node + type Embedding struct + func NewEmbedding(backend EmbeddingOps, weight *Tensor) *Embedding + func (e *Embedding) Close() error + func (e *Embedding) Identity() pipz.Identity + func (e *Embedding) Process(ctx context.Context, indices *Tensor) (*Tensor, error) + func (e *Embedding) Schema() pipz.Node + type EmbeddingOps interface + Embedding func(ctx context.Context, weight, indices *Tensor) (*Tensor, error) + type ErrNotImplemented struct + Backend string + Op string + func (e *ErrNotImplemented) Error() string + type Exp struct + func NewExp(backend UnaryOps) *Exp + func (e *Exp) Close() error + func (e *Exp) Identity() pipz.Identity + func (e *Exp) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (e *Exp) Schema() pipz.Node + type Expand struct + func NewExpand(shape ...int) *Expand + func (e *Expand) Close() error + func (e *Expand) Identity() pipz.Identity + func (e *Expand) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (e *Expand) Schema() pipz.Node + type Filler interface + Fill func(value float32) error + type Flatten struct + func NewFlatten(startDim, endDim int) *Flatten + func (f *Flatten) Close() error + func (f *Flatten) Identity() pipz.Identity + func (f *Flatten) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (f *Flatten) Schema() pipz.Node + type GELU struct + func NewGELU(backend UnaryOps) *GELU + func (g *GELU) Close() error + func (g *GELU) Identity() pipz.Identity + func (g *GELU) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (g *GELU) Schema() pipz.Node + type GroupNorm struct + func NewGroupNorm(backend NormOps, numGroups int, weight, bias *Tensor, epsilon float32) *GroupNorm + func (g *GroupNorm) Close() error + func (g *GroupNorm) Identity() pipz.Identity + func (g *GroupNorm) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (g *GroupNorm) Schema() pipz.Node + type HostCopier interface + CopyToHost func() ([]float32, error) + type InstanceNorm2d struct + func NewInstanceNorm2d(backend NormOps, weight, bias *Tensor, epsilon float32) *InstanceNorm2d + func (i *InstanceNorm2d) Close() error + func (i *InstanceNorm2d) Identity() pipz.Identity + func (i *InstanceNorm2d) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (i *InstanceNorm2d) Schema() pipz.Node + type Int64HostCopier interface + CopyToHostInt64 func() ([]int64, error) + type L1Loss struct + func NewL1Loss(backend LossOps, target *Tensor, reduction string) *L1Loss + func (l *L1Loss) Close() error + func (l *L1Loss) Identity() pipz.Identity + func (l *L1Loss) Process(ctx context.Context, input *Tensor) (*Tensor, error) + func (l *L1Loss) Schema() pipz.Node + type LayerNorm struct + func NewLayerNorm(backend NormOps, normalizedShape []int, weight, bias *Tensor, epsilon float32) *LayerNorm + func (l *LayerNorm) Close() error + func (l *LayerNorm) Identity() pipz.Identity + func (l *LayerNorm) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (l *LayerNorm) Schema() pipz.Node + type LeakyReLU struct + func NewLeakyReLU(backend ActivationOps, negativeSlope float32) *LeakyReLU + func (l *LeakyReLU) Close() error + func (l *LeakyReLU) Identity() pipz.Identity + func (l *LeakyReLU) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (l *LeakyReLU) Schema() pipz.Node + type Log struct + func NewLog(backend UnaryOps) *Log + func (l *Log) Close() error + func (l *Log) Identity() pipz.Identity + func (l *Log) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (l *Log) Schema() pipz.Node + type LogSoftmax struct + func NewLogSoftmax(backend ActivationOps, dim int) *LogSoftmax + func (l *LogSoftmax) Close() error + func (l *LogSoftmax) Identity() pipz.Identity + func (l *LogSoftmax) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (l *LogSoftmax) Schema() pipz.Node + type LossOps interface + CrossEntropyLoss func(ctx context.Context, input, target *Tensor, reduction string) (*Tensor, error) + L1Loss func(ctx context.Context, input, target *Tensor, reduction string) (*Tensor, error) + MSELoss func(ctx context.Context, input, target *Tensor, reduction string) (*Tensor, error) + NLLLoss func(ctx context.Context, input, target *Tensor, reduction string) (*Tensor, error) + type MSELoss struct + func NewMSELoss(backend LossOps, target *Tensor, reduction string) *MSELoss + func (m *MSELoss) Close() error + func (m *MSELoss) Identity() pipz.Identity + func (m *MSELoss) Process(ctx context.Context, input *Tensor) (*Tensor, error) + func (m *MSELoss) Schema() pipz.Node + type MatMul struct + func NewMatMul(backend MatrixOps, other *Tensor) *MatMul + func (m *MatMul) Close() error + func (m *MatMul) Identity() pipz.Identity + func (m *MatMul) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (m *MatMul) Schema() pipz.Node + type MatrixBackend interface + type MatrixOps interface + MatMul func(ctx context.Context, a, b *Tensor) (*Tensor, error) + type Max struct + func NewMax(backend ReduceOps, keepdim bool, dims ...int) *Max + func (m *Max) Close() error + func (m *Max) Identity() pipz.Identity + func (m *Max) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (m *Max) Schema() pipz.Node + type MaxPool2d struct + func NewMaxPool2d(backend PoolOps, config Pool2dConfig) *MaxPool2d + func (m *MaxPool2d) Close() error + func (m *MaxPool2d) Identity() pipz.Identity + func (m *MaxPool2d) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (m *MaxPool2d) Schema() pipz.Node + type Mean struct + func NewMean(backend ReduceOps, keepdim bool, dims ...int) *Mean + func (m *Mean) Close() error + func (m *Mean) Identity() pipz.Identity + func (m *Mean) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (m *Mean) Schema() pipz.Node + type MemoryAllocator interface + Free func(ptr uintptr) error + Malloc func(bytes int) (uintptr, error) + func GetMemoryAllocator(dt DeviceType) (MemoryAllocator, bool) + type Min struct + func NewMin(backend ReduceOps, keepdim bool, dims ...int) *Min + func (m *Min) Close() error + func (m *Min) Identity() pipz.Identity + func (m *Min) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (m *Min) Schema() pipz.Node + type MockStorage struct + func NewMockStorage(numel int, dtype DType, device Device) *MockStorage + func (s *MockStorage) Clone() Storage + func (s *MockStorage) DType() DType + func (s *MockStorage) Device() Device + func (s *MockStorage) Free() + func (s *MockStorage) Len() int + func (s *MockStorage) Ptr() uintptr + func (s *MockStorage) Size() int + type Mul struct + func NewMul(backend BinaryOps, other *Tensor) *Mul + func (m *Mul) Close() error + func (m *Mul) Identity() pipz.Identity + func (m *Mul) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (m *Mul) Schema() pipz.Node + type NLLLoss struct + func NewNLLLoss(backend LossOps, target *Tensor, reduction string) *NLLLoss + func (n *NLLLoss) Close() error + func (n *NLLLoss) Identity() pipz.Identity + func (n *NLLLoss) Process(ctx context.Context, input *Tensor) (*Tensor, error) + func (n *NLLLoss) Schema() pipz.Node + type Narrow struct + func NewNarrow(dim, start, length int) *Narrow + func (n *Narrow) Close() error + func (n *Narrow) Identity() pipz.Identity + func (n *Narrow) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (n *Narrow) Schema() pipz.Node + type Neg struct + func NewNeg(backend UnaryOps) *Neg + func (n *Neg) Close() error + func (n *Neg) Identity() pipz.Identity + func (n *Neg) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (n *Neg) Schema() pipz.Node + type NeuralBackend interface + type NormOps interface + BatchNorm2d func(ctx context.Context, input, weight, bias, runningMean, runningVar *Tensor, ...) (*Tensor, error) + GroupNorm func(ctx context.Context, input *Tensor, numGroups int, weight, bias *Tensor, ...) (*Tensor, error) + InstanceNorm2d func(ctx context.Context, input, weight, bias *Tensor, epsilon float32) (*Tensor, error) + LayerNorm func(ctx context.Context, input *Tensor, normalizedShape []int, ...) (*Tensor, error) + RMSNorm func(ctx context.Context, input *Tensor, normalizedShape []int, weight *Tensor, ...) (*Tensor, error) + type Permute struct + func NewPermute(dims ...int) *Permute + func (p *Permute) Close() error + func (p *Permute) Identity() pipz.Identity + func (p *Permute) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (p *Permute) Schema() pipz.Node + type Pool struct + func DefaultPool() *Pool + func NewPool() *Pool + func PoolFromContext(ctx context.Context) *Pool + func (p *Pool) AllocCPU(numel int, dtype DType) *CPUStorage + func (p *Pool) AllocCUDA(numel int, dtype DType, device int) (uintptr, error) + func (p *Pool) Clear() + func (p *Pool) FreeCPU(storage *CPUStorage) + func (p *Pool) FreeCUDA(ptr uintptr, numel int, dtype DType, device int) + func (p *Pool) MaxCacheSize() int64 + func (p *Pool) SetContext(ctx context.Context) + func (p *Pool) SetMaxCacheSize(bytes int64) + func (p *Pool) Stats() PoolStats + type Pool2dConfig struct + KernelSize [2]int + Padding [2]int + Stride [2]int + type PoolAllocator interface + Alloc func(numel int, dtype DType) (Storage, error) + Clear func() + Free func(s Storage) + type PoolOps interface + AdaptiveAvgPool2d func(ctx context.Context, input *Tensor, outputSize [2]int) (*Tensor, error) + AdaptiveMaxPool2d func(ctx context.Context, input *Tensor, outputSize [2]int) (*Tensor, error) + AvgPool2d func(ctx context.Context, input *Tensor, kernelSize, stride, padding [2]int) (*Tensor, error) + MaxPool2d func(ctx context.Context, input *Tensor, kernelSize, stride, padding [2]int) (*Tensor, error) + type PoolStats struct + CPUAllocations int64 + CPUBytesCached int64 + CPUBytesInUse int64 + CPUDeallocations int64 + CUDAAllocations map[int]int64 + CUDABytesCached map[int]int64 + CUDABytesInUse map[int]int64 + CUDADeallocations map[int]int64 + type PoolableStorage interface + PoolKey func() (numel int, dtype DType, deviceIndex int) + type Pow struct + func NewPow(backend BinaryOps, exp float32) *Pow + func (p *Pow) Close() error + func (p *Pow) Identity() pipz.Identity + func (p *Pow) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (p *Pow) Schema() pipz.Node + type Prod struct + func NewProd(backend ReduceOps, keepdim bool, dims ...int) *Prod + func (p *Prod) Close() error + func (p *Prod) Identity() pipz.Identity + func (p *Prod) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (p *Prod) Schema() pipz.Node + type RMSNorm struct + func NewRMSNorm(backend NormOps, normalizedShape []int, weight *Tensor, epsilon float32) *RMSNorm + func (r *RMSNorm) Close() error + func (r *RMSNorm) Identity() pipz.Identity + func (r *RMSNorm) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (r *RMSNorm) Schema() pipz.Node + type ReLU struct + func NewReLU(backend UnaryOps) *ReLU + func (r *ReLU) Close() error + func (r *ReLU) Identity() pipz.Identity + func (r *ReLU) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (r *ReLU) Schema() pipz.Node + type ReduceBackend interface + type ReduceOps interface + ArgMax func(ctx context.Context, t *Tensor, dim int, keepdim bool) (*Tensor, error) + ArgMin func(ctx context.Context, t *Tensor, dim int, keepdim bool) (*Tensor, error) + Max func(ctx context.Context, t *Tensor, dims []int, keepdim bool) (*Tensor, error) + Mean func(ctx context.Context, t *Tensor, dims []int, keepdim bool) (*Tensor, error) + Min func(ctx context.Context, t *Tensor, dims []int, keepdim bool) (*Tensor, error) + Prod func(ctx context.Context, t *Tensor, dims []int, keepdim bool) (*Tensor, error) + Std func(ctx context.Context, t *Tensor, dims []int, keepdim bool, correction int) (*Tensor, error) + Sum func(ctx context.Context, t *Tensor, dims []int, keepdim bool) (*Tensor, error) + Var func(ctx context.Context, t *Tensor, dims []int, keepdim bool, correction int) (*Tensor, error) + type Reshape struct + func NewReshape(shape ...int) *Reshape + func (r *Reshape) Close() error + func (r *Reshape) Identity() pipz.Identity + func (r *Reshape) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (r *Reshape) Schema() pipz.Node + type SafeTensorInfo struct + DType DType + Name string + Shape []int + type SafeTensorsFile struct + func OpenSafeTensors(path string) (*SafeTensorsFile, error) + func (f *SafeTensorsFile) Close() error + func (f *SafeTensorsFile) Load(name string, backend StorageBackend, targetDType *DType) (*Tensor, error) + func (f *SafeTensorsFile) LoadCPU(name string, targetDType *DType) (*Tensor, error) + func (f *SafeTensorsFile) NumTensors() int + func (f *SafeTensorsFile) Path() string + func (f *SafeTensorsFile) TensorInfo(name string) *SafeTensorInfo + func (f *SafeTensorsFile) Tensors() map[string]SafeTensorInfo + type ShapeError struct + Message string + Op string + ShapeA []int + ShapeB []int + func (e *ShapeError) Error() string + func (e *ShapeError) Is(target error) bool + type ShapeOps interface + Cat func(ctx context.Context, tensors []*Tensor, dim int) (*Tensor, error) + Stack func(ctx context.Context, tensors []*Tensor, dim int) (*Tensor, error) + type SiLU struct + func NewSiLU(backend UnaryOps) *SiLU + func (s *SiLU) Close() error + func (s *SiLU) Identity() pipz.Identity + func (s *SiLU) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (s *SiLU) Schema() pipz.Node + type Sigmoid struct + func NewSigmoid(backend UnaryOps) *Sigmoid + func (s *Sigmoid) Close() error + func (s *Sigmoid) Identity() pipz.Identity + func (s *Sigmoid) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (s *Sigmoid) Schema() pipz.Node + type Sign struct + func NewSign(backend UnaryOps) *Sign + func (s *Sign) Close() error + func (s *Sign) Identity() pipz.Identity + func (s *Sign) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (s *Sign) Schema() pipz.Node + type Sin struct + func NewSin(backend UnaryOps) *Sin + func (s *Sin) Close() error + func (s *Sin) Identity() pipz.Identity + func (s *Sin) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (s *Sin) Schema() pipz.Node + type Slice struct + func NewSlice(dim, start, end int) *Slice + func (sl *Slice) Close() error + func (sl *Slice) Identity() pipz.Identity + func (sl *Slice) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (sl *Slice) Schema() pipz.Node + type Softmax struct + func NewSoftmax(backend ActivationOps, dim int) *Softmax + func (s *Softmax) Close() error + func (s *Softmax) Identity() pipz.Identity + func (s *Softmax) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (s *Softmax) Schema() pipz.Node + type Sqrt struct + func NewSqrt(backend UnaryOps) *Sqrt + func (s *Sqrt) Close() error + func (s *Sqrt) Identity() pipz.Identity + func (s *Sqrt) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (s *Sqrt) Schema() pipz.Node + type Square struct + func NewSquare(backend UnaryOps) *Square + func (s *Square) Close() error + func (s *Square) Identity() pipz.Identity + func (s *Square) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (s *Square) Schema() pipz.Node + type Squeeze struct + func NewSqueeze() *Squeeze + func NewSqueezeDim(dim int) *Squeeze + func (s *Squeeze) Close() error + func (s *Squeeze) Identity() pipz.Identity + func (s *Squeeze) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (s *Squeeze) Schema() pipz.Node + type Stack struct + func NewStack(backend ShapeOps, tensors []*Tensor, dim int) *Stack + func (s *Stack) Close() error + func (s *Stack) Identity() pipz.Identity + func (s *Stack) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (s *Stack) Schema() pipz.Node + type Std struct + func NewStd(backend ReduceOps, keepdim bool, correction int, dims ...int) *Std + func (s *Std) Close() error + func (s *Std) Identity() pipz.Identity + func (s *Std) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (s *Std) Schema() pipz.Node + type Storage interface + Clone func() Storage + DType func() DType + Device func() Device + Free func() + Len func() int + Ptr func() uintptr + Size func() int + type StorageBackend interface + DeviceType func() DeviceType + NewStorage func(numel int, dtype DType, deviceIndex int) (Storage, error) + NewStorageFromSlice func(data []float32, dtype DType, deviceIndex int) (Storage, error) + func GetBackend(dt DeviceType) (StorageBackend, bool) + type StorageOps interface + CopyFrom func(t *Tensor) (*Tensor, error) + NewStorage func(numel int, dtype DType, deviceIndex int) (Storage, error) + NewStorageFromSlice func(data []float32, dtype DType, deviceIndex int) (Storage, error) + type Sub struct + func NewSub(backend BinaryOps, other *Tensor) *Sub + func (s *Sub) Close() error + func (s *Sub) Identity() pipz.Identity + func (s *Sub) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (s *Sub) Schema() pipz.Node + type Sum struct + func NewSum(backend ReduceOps, keepdim bool, dims ...int) *Sum + func (s *Sum) Close() error + func (s *Sum) Identity() pipz.Identity + func (s *Sum) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (s *Sum) Schema() pipz.Node + type Syncer interface + Sync func() error + type T struct + func NewT() *T + func (t *T) Close() error + func (t *T) Identity() pipz.Identity + func (t *T) Process(ctx context.Context, in *Tensor) (*Tensor, error) + func (t *T) Schema() pipz.Node + type Tanh struct + func NewTanh(backend UnaryOps) *Tanh + func (t *Tanh) Close() error + func (t *Tanh) Identity() pipz.Identity + func (t *Tanh) Process(ctx context.Context, in *Tensor) (*Tensor, error) + func (t *Tanh) Schema() pipz.Node + type Tensor struct + func Arange(start, end, step float32) (*Tensor, error) + func ArangeOn(backend Backend, start, end, step float32) (*Tensor, error) + func Empty(shape ...int) (*Tensor, error) + func EmptyLike(t *Tensor) (*Tensor, error) + func EmptyLikeOn(backend Backend, t *Tensor) (*Tensor, error) + func EmptyOn(backend Backend, shape ...int) (*Tensor, error) + func Eye(n int) (*Tensor, error) + func EyeOn(backend Backend, n int) (*Tensor, error) + func FromSlice(data []float32, shape ...int) (*Tensor, error) + func FromSliceOn(backend Backend, data []float32, shape ...int) (*Tensor, error) + func Full(value float32, shape ...int) (*Tensor, error) + func FullOn(backend Backend, value float32, shape ...int) (*Tensor, error) + func Linspace(start, end float32, n int) (*Tensor, error) + func LinspaceOn(backend Backend, start, end float32, n int) (*Tensor, error) + func MustArange(start, end, step float32) *Tensor + func MustArangeOn(backend Backend, start, end, step float32) *Tensor + func MustEmpty(shape ...int) *Tensor + func MustEmptyLike(t *Tensor) *Tensor + func MustEmptyOn(backend Backend, shape ...int) *Tensor + func MustEye(n int) *Tensor + func MustEyeOn(backend Backend, n int) *Tensor + func MustFromSlice(data []float32, shape ...int) *Tensor + func MustFromSliceOn(backend Backend, data []float32, shape ...int) *Tensor + func MustFull(value float32, shape ...int) *Tensor + func MustFullOn(backend Backend, value float32, shape ...int) *Tensor + func MustLinspace(start, end float32, n int) *Tensor + func MustLinspaceOn(backend Backend, start, end float32, n int) *Tensor + func MustOnes(shape ...int) *Tensor + func MustOnesLike(t *Tensor) *Tensor + func MustOnesOn(backend Backend, shape ...int) *Tensor + func MustRand(shape ...int) *Tensor + func MustRandLike(t *Tensor) *Tensor + func MustRandN(shape ...int) *Tensor + func MustRandNLike(t *Tensor) *Tensor + func MustRandNOn(backend Backend, shape ...int) *Tensor + func MustRandOn(backend Backend, shape ...int) *Tensor + func MustZeros(shape ...int) *Tensor + func MustZerosLike(t *Tensor) *Tensor + func MustZerosOn(backend Backend, shape ...int) *Tensor + func NewTensor(storage Storage, shape []int, stride []int) *Tensor + func NewTensorFromContext(ctx context.Context, shape []int, dtype DType) *Tensor + func NewTensorFromPool(pool *Pool, shape []int, dtype DType) *Tensor + func Ones(shape ...int) (*Tensor, error) + func OnesLike(t *Tensor) (*Tensor, error) + func OnesLikeOn(backend Backend, t *Tensor) (*Tensor, error) + func OnesOn(backend Backend, shape ...int) (*Tensor, error) + func Rand(shape ...int) (*Tensor, error) + func RandLike(t *Tensor) (*Tensor, error) + func RandLikeOn(backend Backend, t *Tensor) (*Tensor, error) + func RandN(shape ...int) (*Tensor, error) + func RandNLike(t *Tensor) (*Tensor, error) + func RandNLikeOn(backend Backend, t *Tensor) (*Tensor, error) + func RandNOn(backend Backend, shape ...int) (*Tensor, error) + func RandOn(backend Backend, shape ...int) (*Tensor, error) + func Zeros(shape ...int) (*Tensor, error) + func ZerosLike(t *Tensor) (*Tensor, error) + func ZerosLikeOn(backend Backend, t *Tensor) (*Tensor, error) + func ZerosOn(backend Backend, shape ...int) (*Tensor, error) + func (t *Tensor) Clone() *Tensor + func (t *Tensor) Contiguous() *Tensor + func (t *Tensor) DType() DType + func (t *Tensor) Data() ([]float32, error) + func (t *Tensor) Device() Device + func (t *Tensor) Dim() int + func (t *Tensor) Free() + func (t *Tensor) Int64Data() ([]int64, error) + func (t *Tensor) IsContiguous() bool + func (t *Tensor) MustData() []float32 + func (t *Tensor) MustInt64Data() []int64 + func (t *Tensor) Numel() int + func (t *Tensor) Offset() int + func (t *Tensor) Pool() *Pool + func (t *Tensor) Reshape(shape ...int) (*Tensor, error) + func (t *Tensor) SetPool(p *Pool) + func (t *Tensor) Shape() []int + func (t *Tensor) Size(dim int) int + func (t *Tensor) Storage() Storage + func (t *Tensor) Stride() []int + func (t *Tensor) String() string + func (t *Tensor) View(shape ...int) (*Tensor, error) + type TensorFactory interface + Arange func(start, end, step float32) (*Tensor, error) + Empty func(shape ...int) (*Tensor, error) + Eye func(n int) (*Tensor, error) + FromSlice func(data []float32, shape ...int) (*Tensor, error) + Full func(value float32, shape ...int) (*Tensor, error) + Linspace func(start, end float32, n int) (*Tensor, error) + Ones func(shape ...int) (*Tensor, error) + Rand func(shape ...int) (*Tensor, error) + RandN func(shape ...int) (*Tensor, error) + Zeros func(shape ...int) (*Tensor, error) + type Transfer struct + func NewTransfer(target Backend) *Transfer + func (t *Transfer) Close() error + func (t *Transfer) Identity() pipz.Identity + func (t *Transfer) Process(ctx context.Context, tensor *Tensor) (*Tensor, error) + func (t *Transfer) Schema() pipz.Node + type Transpose struct + func NewTranspose(dim0, dim1 int) *Transpose + func (tr *Transpose) Close() error + func (tr *Transpose) Identity() pipz.Identity + func (tr *Transpose) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (tr *Transpose) Schema() pipz.Node + type Tril struct + func NewTril(backend CompareOps, k int) *Tril + func (tr *Tril) Close() error + func (tr *Tril) Identity() pipz.Identity + func (tr *Tril) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (tr *Tril) Schema() pipz.Node + type UnaryOps interface + Abs func(ctx context.Context, t *Tensor) (*Tensor, error) + Cos func(ctx context.Context, t *Tensor) (*Tensor, error) + Exp func(ctx context.Context, t *Tensor) (*Tensor, error) + GELU func(ctx context.Context, t *Tensor) (*Tensor, error) + Log func(ctx context.Context, t *Tensor) (*Tensor, error) + Neg func(ctx context.Context, t *Tensor) (*Tensor, error) + ReLU func(ctx context.Context, t *Tensor) (*Tensor, error) + SiLU func(ctx context.Context, t *Tensor) (*Tensor, error) + Sigmoid func(ctx context.Context, t *Tensor) (*Tensor, error) + Sign func(ctx context.Context, t *Tensor) (*Tensor, error) + Sin func(ctx context.Context, t *Tensor) (*Tensor, error) + Sqrt func(ctx context.Context, t *Tensor) (*Tensor, error) + Square func(ctx context.Context, t *Tensor) (*Tensor, error) + Tanh func(ctx context.Context, t *Tensor) (*Tensor, error) + type Unsqueeze struct + func NewUnsqueeze(dim int) *Unsqueeze + func (u *Unsqueeze) Close() error + func (u *Unsqueeze) Identity() pipz.Identity + func (u *Unsqueeze) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (u *Unsqueeze) Schema() pipz.Node + type Var struct + func NewVar(backend ReduceOps, keepdim bool, correction int, dims ...int) *Var + func (v *Var) Close() error + func (v *Var) Identity() pipz.Identity + func (v *Var) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (v *Var) Schema() pipz.Node + type View struct + func NewView(shape ...int) *View + func (v *View) Close() error + func (v *View) Identity() pipz.Identity + func (v *View) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (v *View) Schema() pipz.Node + type Where struct + func NewWhere(backend CompareOps, condition, other *Tensor) *Where + func (w *Where) Close() error + func (w *Where) Identity() pipz.Identity + func (w *Where) Process(ctx context.Context, t *Tensor) (*Tensor, error) + func (w *Where) Schema() pipz.Node + type Zeroer interface + Zero func() error