graphimpl

package
v0.28.41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package graphimpl contains the internal computation-graph engine for GoMLX: NodeImpl, GraphImpl, FunctionImpl, ExecImpl, auto-generated backend ops, and fused/backend-level graph primitives.

End-users should use package github.com/gomlx/gomlx/core/graph (and core/autodiff).

Index

Constants

View Source
const AliasScopeSeparator = "/"

AliasScopeSeparator joins alias scope segments.

View Source
const DefaultExecMaxCacheSize = 32

DefaultExecMaxCacheSize is the default max cache size for new ExecImpl instances.

View Source
const FusionEnv = "GOMLX_FUSION"

FusionEnv is the environment variable that controls whether fused ops are used (default true).

View Source
const InvalidNodeId = NodeId(-1)

InvalidNodeId indicates a node that failed to be created.

View Source
const InvalidParameterHandle = ParameterHandle(-1)

InvalidParameterHandle represents an invalid (or non-existent) parameter.

View Source
const MainName = compute.MainName

MainName is the name of the main function created with each graph.

View Source
const MaxSizeToPrint = 5

Variables

View Source
var (
	UnwrapNodeHook     func(any) *NodeImpl
	WrapNodeHook       func(*NodeImpl) any
	UnwrapGraphHook    func(any) *GraphImpl
	WrapGraphHook      func(*GraphImpl) any
	UnwrapFunctionHook func(any) *FunctionImpl
	WrapFunctionHook   func(*FunctionImpl) any
	UnwrapExecHook     func(any) *ExecImpl
	WrapExecHook       func(*ExecImpl) any

	// GradientHook is registered by core/autodiff.init() as a temporary stop-gap for
	// the deprecated graph.Gradient forwarding wrapper.
	GradientHook func(output *NodeImpl, gradientNodes ...*NodeImpl) []*NodeImpl
)

Wrapper hooks registered by core/graph.init() so internal/graphbridge can convert between public (*graph.Node, *graph.Graph, *graph.Function, *graph.Exec) and internal (*NodeImpl, *GraphImpl, *FunctionImpl, *ExecImpl) types without introducing import cycles or exporting internal accessors on public types.

View Source
var ErrExecFinalized = errors.New("exec is finalized")

ErrExecFinalized is returned when calling or compiling a finalized ExecImpl.

View Source
var MinConstValueSizeToKeep = 32

MinConstValueSizeToKeep defines the element-count threshold below which constant values are retained on the node for debugging/introspection.

Functions

func BackendFusedScaledDotProductAttention

func BackendFusedScaledDotProductAttention(query *NodeImpl, key *NodeImpl, value *NodeImpl, axesLayout compute.AttentionAxesLayout, options *compute.ScaledDotProductAttentionConfig) (
	output *NodeImpl, statesForVJP []*NodeImpl)

BackendFusedScaledDotProductAttention is an internal GraphImpl wrapper for the compute.Function.FusedScaledDotProductAttention method.

func DefaultNodeLogger

func DefaultNodeLogger(g *GraphImpl, messages []string, values []*tensors.Tensor, nodes []NodeId)

DefaultNodeLogger logs marked nodes during execution.

func DonateTensorBuffer

func DonateTensorBuffer(t *tensors.Tensor, backend compute.Backend, deviceNum compute.DeviceNum) (any, error)

DonateTensorBuffer creates a donation wrapper for a tensor's device buffer.

func FinalizeConstantValue

func FinalizeConstantValue(val compute.Value)

FinalizeConstantValue releases backend resources held by a shared constant compute.Value.

func MustAdjustAxis

func MustAdjustAxis(axis int, operand shapes.HasShape) int

MustAdjustAxis returns the positive axis for operand's shape, adjusting negative axes.

func NodeTypeStrings

func NodeTypeStrings() []string

NodeTypeStrings returns a slice of all String values of the enum

Types

type CanonicalExecGraphFn

type CanonicalExecGraphFn func(*GraphImpl, []*NodeImpl) []*NodeImpl

CanonicalExecGraphFn is the canonical graph-building function type for ExecImpl.

type ExecImpl

type ExecImpl struct {
	// contains filtered or unexported fields
}

ExecImpl manages graph creation, compilation, caching, and execution across input shapes.

func NewExecCanonicalImpl

func NewExecCanonicalImpl(backend compute.Backend, graphFn CanonicalExecGraphFn, numInputs, numOutputs int, inputIsGraph, inputAsSlice, outputAsSlice bool) (*ExecImpl, error)

NewExecCanonicalImpl constructs a new ExecImpl.

func (*ExecImpl) AggregateShards

func (e *ExecImpl) AggregateShards(shards []*tensors.Tensor) ([]*dtensor.Tensor, error)

func (*ExecImpl) AutoSharding

func (e *ExecImpl) AutoSharding(meshes ...*distributed.DeviceMesh) *ExecImpl

func (*ExecImpl) CacheLen

func (e *ExecImpl) CacheLen() int

CacheLen returns the current number of cached compiled graphs (used in tests).

func (*ExecImpl) Call

func (e *ExecImpl) Call(args ...any) ([]*tensors.Tensor, error)

func (*ExecImpl) CallOnDevice

func (e *ExecImpl) CallOnDevice(defaultDevice compute.DeviceNum, args ...any) ([]*tensors.Tensor, error)

func (*ExecImpl) CallWithGraph

func (e *ExecImpl) CallWithGraph(args ...any) ([]*tensors.Tensor, *GraphImpl, error)

func (*ExecImpl) CallWithGraphOnDevice

func (e *ExecImpl) CallWithGraphOnDevice(defaultDevice compute.DeviceNum, args ...any) ([]*tensors.Tensor, *GraphImpl, error)

func (*ExecImpl) Compile

func (e *ExecImpl) Compile(inputShapes ...shapes.Shape) (*GraphImpl, error)

func (*ExecImpl) CompileStandalone

func (e *ExecImpl) CompileStandalone(inputShapes ...shapes.Shape) (*GraphImpl, error)

func (*ExecImpl) DeviceAssignment

func (e *ExecImpl) DeviceAssignment() []compute.DeviceNum

func (*ExecImpl) DistributedCall

func (e *ExecImpl) DistributedCall(args ...any) ([]*dtensor.Tensor, error)

func (*ExecImpl) DistributionStrategy

func (e *ExecImpl) DistributionStrategy() distributed.Strategy

func (*ExecImpl) Finalize

func (e *ExecImpl) Finalize()

func (*ExecImpl) GetNodeLogger

func (e *ExecImpl) GetNodeLogger() LoggerFn

func (*ExecImpl) Meshes

func (e *ExecImpl) Meshes() []*distributed.DeviceMesh

func (*ExecImpl) Name

func (e *ExecImpl) Name() string

func (*ExecImpl) NumDevices

func (e *ExecImpl) NumDevices() int

func (*ExecImpl) Public

func (e *ExecImpl) Public() any

Public returns the canonical *graph.Exec wrapper (stored as any), or nil.

func (*ExecImpl) SPMD

func (e *ExecImpl) SPMD(mesh *distributed.DeviceMesh) *ExecImpl

func (*ExecImpl) SetMaxCache

func (e *ExecImpl) SetMaxCache(maxCacheSize int) *ExecImpl

func (*ExecImpl) SetNodeLogger

func (e *ExecImpl) SetNodeLogger(loggerFn LoggerFn)

func (*ExecImpl) SetPublic

func (e *ExecImpl) SetPublic(pub any)

SetPublic records the canonical *graph.Exec wrapper on e.

func (*ExecImpl) SetSideParamsHook

func (e *ExecImpl) SetSideParamsHook(fn SideParamsFn) *ExecImpl

func (*ExecImpl) WithDeviceAssignment

func (e *ExecImpl) WithDeviceAssignment(devices []compute.DeviceNum) *ExecImpl

func (*ExecImpl) WithDynamicAxes

func (e *ExecImpl) WithDynamicAxes(axisNames ...[]string) *ExecImpl

func (*ExecImpl) WithInputShardingSpecs

func (e *ExecImpl) WithInputShardingSpecs(specs ...*distributed.ShardingSpec) *ExecImpl

func (*ExecImpl) WithName

func (e *ExecImpl) WithName(name string) *ExecImpl

func (*ExecImpl) WithOutputShardingSpecs

func (e *ExecImpl) WithOutputShardingSpecs(specs ...*distributed.ShardingSpec) *ExecImpl

type FunctionImpl

type FunctionImpl struct {
	// contains filtered or unexported fields
}

FunctionImpl is the internal representation of a function or closure in a graph.

func NewClosure

func NewClosure(g *GraphImpl, funcDef func(g *GraphImpl) []*NodeImpl) *FunctionImpl

NewClosure creates a new closure in g.

func NewClosureWithSharding

func NewClosureWithSharding(g *GraphImpl, funcDef func(g *GraphImpl) ([]*NodeImpl, []*distributed.ShardingSpec)) *FunctionImpl

NewClosureWithSharding creates a new closure in g with optional output shardings.

func NewFunction

func NewFunction(g *GraphImpl, name string, funcDef func(g *GraphImpl) []*NodeImpl) *FunctionImpl

NewFunction creates a new top-level function in g.

func NewFunctionWithSharding

func NewFunctionWithSharding(g *GraphImpl, name string, funcDef func(g *GraphImpl) ([]*NodeImpl, []*distributed.ShardingSpec)) *FunctionImpl

NewFunctionWithSharding creates a new top-level function in g with optional output shardings.

func (*FunctionImpl) BackendFunc

func (f *FunctionImpl) BackendFunc() compute.Function

BackendFunc returns the underlying compute.Function.

func (*FunctionImpl) Call

func (f *FunctionImpl) Call(inputs ...*NodeImpl) []*NodeImpl

Call invokes function f with the given inputs.

func (*FunctionImpl) IsAncestorOf

func (f *FunctionImpl) IsAncestorOf(leafFunc *FunctionImpl) bool

IsAncestorOf checks whether f is an ancestor of leafFunc (including f == leafFunc).

func (*FunctionImpl) IsClosure

func (f *FunctionImpl) IsClosure() bool

IsClosure returns whether this is a closure.

func (*FunctionImpl) IsMain

func (f *FunctionImpl) IsMain() bool

IsMain returns whether this is the main function.

func (*FunctionImpl) Name

func (f *FunctionImpl) Name() string

Name returns the name of the function ("" for closures).

func (*FunctionImpl) Parent

func (f *FunctionImpl) Parent() *FunctionImpl

Parent returns the parent function of a closure, or nil.

func (*FunctionImpl) Path

func (f *FunctionImpl) Path() string

Path returns the slash-separated scope path from the root function.

func (*FunctionImpl) Public

func (f *FunctionImpl) Public() any

Public returns the canonical *graph.Function wrapper (stored as any), or nil.

func (*FunctionImpl) Return

func (f *FunctionImpl) Return(outputs []*NodeImpl, outputShardings []*distributed.ShardingSpec)

Return sets the return values of this function.

func (*FunctionImpl) SetPublic

func (f *FunctionImpl) SetPublic(pub any)

SetPublic records the canonical *graph.Function wrapper on f.

type GraphId

type GraphId int

GraphId is globally unique across graphs.

type GraphImpl

type GraphImpl struct {
	// contains filtered or unexported fields
}

GraphImpl is the internal representation of a computation graph.

func NewGraphImpl

func NewGraphImpl(backend compute.Backend, name string) *GraphImpl

NewGraphImpl constructs an empty GraphImpl.

func ValidateBuildingGraphFromInputs

func ValidateBuildingGraphFromInputs(inputs ...*NodeImpl) (g *GraphImpl)

ValidateBuildingGraphFromInputs checks that all inputs belong to the same building GraphImpl.

func (*GraphImpl) AssertBuilding

func (g *GraphImpl) AssertBuilding()

AssertBuilding panics if the graph cannot be built; enters building state if configuring.

func (*GraphImpl) AssertCompiled

func (g *GraphImpl) AssertCompiled()

AssertCompiled panics if the graph is not compiled yet.

func (*GraphImpl) AssertConfiguring

func (g *GraphImpl) AssertConfiguring()

AssertConfiguring panics if the graph is not in configuring mode.

func (*GraphImpl) AssertNotReturned

func (g *GraphImpl) AssertNotReturned()

AssertNotReturned panics if the current function already returned or graph is compiled.

func (*GraphImpl) AssertValid

func (g *GraphImpl) AssertValid()

AssertValid panics if the graph is nil or finalized.

func (*GraphImpl) AttachState

func (g *GraphImpl) AttachState(key any, value any)

AttachState attaches an arbitrary opaque state object to the graph.

func (*GraphImpl) Backend

func (g *GraphImpl) Backend() compute.Backend

Backend returns the compute.Backend used by this GraphImpl.

func (*GraphImpl) Builder

func (g *GraphImpl) Builder() compute.Builder

Builder returns the compute.Builder used by this GraphImpl (nil if not yet building or finalized).

func (*GraphImpl) CheckValid

func (g *GraphImpl) CheckValid() error

CheckValid returns an error if the graph is nil or finalized.

func (*GraphImpl) Compile

func (g *GraphImpl) Compile(outputs ...*NodeImpl) error

Compile compiles the graph with the given outputs.

func (*GraphImpl) CompileWithSharding

func (g *GraphImpl) CompileWithSharding(outputs []*NodeImpl, outputShardings []*distributed.ShardingSpec) error

CompileWithSharding compiles the graph with outputs and optional output shardings.

func (*GraphImpl) CurrentFunc

func (g *GraphImpl) CurrentFunc() *FunctionImpl

CurrentFunc returns the current function scope.

func (*GraphImpl) DeviceAssignment

func (g *GraphImpl) DeviceAssignment() []compute.DeviceNum

DeviceAssignment returns the DeviceAssignment configured for this graph.

func (*GraphImpl) DeviceMeshes

func (g *GraphImpl) DeviceMeshes() []*distributed.DeviceMesh

DeviceMeshes returns the DeviceMeshes configured for this graph.

func (*GraphImpl) DistributedStrategy

func (g *GraphImpl) DistributedStrategy() distributed.Strategy

DistributedStrategy returns the distributed strategy configured for this graph.

func (*GraphImpl) DynamicDimDType

func (g *GraphImpl) DynamicDimDType() dtypes.DType

DynamicDimDType returns the DType used by the backend for dynamic dimensions.

func (*GraphImpl) Executable

func (g *GraphImpl) Executable() compute.Executable

Executable returns the compiled compute.Executable, or nil.

func (*GraphImpl) Finalize

func (g *GraphImpl) Finalize()

Finalize frees resources associated with the graph.

func (*GraphImpl) GetNodeByAlias

func (g *GraphImpl) GetNodeByAlias(alias string) *NodeImpl

GetNodeByAlias returns a node with the given alias or nil if not found.

func (*GraphImpl) GetParameterByHandle

func (g *GraphImpl) GetParameterByHandle(handle ParameterHandle) *NodeImpl

GetParameterByHandle returns the ii-th parameter registered for this graph.

func (*GraphImpl) GetParameterByName

func (g *GraphImpl) GetParameterByName(name string) (node *NodeImpl)

GetParameterByName returns the parameter registered with the given name, or nil.

func (*GraphImpl) GetScalarConst

func (g *GraphImpl) GetScalarConst(dtype dtypes.DType, value float64) (output *NodeImpl)

GetScalarConst returns or creates a cached scalar constant node in the current function scope.

func (*GraphImpl) GraphId

func (g *GraphImpl) GraphId() GraphId

GraphId returns the globally unique id of the graph.

func (*GraphImpl) IsBuilding

func (g *GraphImpl) IsBuilding() bool

IsBuilding returns whether the GraphImpl is in building mode.

func (*GraphImpl) IsCompiled

func (g *GraphImpl) IsCompiled() bool

IsCompiled returns whether the graph has been compiled.

func (*GraphImpl) IsMainFunc

func (g *GraphImpl) IsMainFunc() bool

IsMainFunc returns whether the current function scope is the main function.

func (*GraphImpl) IsValid

func (g *GraphImpl) IsValid() bool

IsValid returns whether the GraphImpl is valid (not nil and not finalized).

func (*GraphImpl) IterAliasedNodes

func (g *GraphImpl) IterAliasedNodes() iter.Seq2[string, *NodeImpl]

IterAliasedNodes yields pairs (alias, node) sorted by alias.

func (*GraphImpl) LastNode

func (g *GraphImpl) LastNode() *NodeImpl

LastNode returns the last node created, or nil.

func (*GraphImpl) LoggedNodes

func (g *GraphImpl) LoggedNodes() (nodes []*NodeImpl)

LoggedNodes returns all nodes marked to be logged.

func (*GraphImpl) Name

func (g *GraphImpl) Name() string

Name returns the name of the GraphImpl.

func (*GraphImpl) NodeById

func (g *GraphImpl) NodeById(id NodeId) *NodeImpl

NodeById returns the node for the given id.

func (*GraphImpl) Nodes

func (g *GraphImpl) Nodes() []*NodeImpl

Nodes returns the slice of all nodes in this graph.

func (*GraphImpl) NumDevices

func (g *GraphImpl) NumDevices() int

NumDevices returns the number of devices configured for this graph.

func (*GraphImpl) NumParameters

func (g *GraphImpl) NumParameters() int

NumParameters returns the number of parameters created for this graph.

func (*GraphImpl) PopAliasScope

func (g *GraphImpl) PopAliasScope()

PopAliasScope removes the scope previously pushed with PushAliasScope.

func (*GraphImpl) Public

func (g *GraphImpl) Public() any

Public returns the canonical *graph.Graph wrapper (stored as any), or nil.

func (*GraphImpl) PushAliasScope

func (g *GraphImpl) PushAliasScope(scope string)

PushAliasScope pushes another scope to the current alias scope for new aliases.

func (*GraphImpl) Run

func (g *GraphImpl) Run(inputs ...any) (outputs []*tensors.Tensor)

Run executes the compiled graph with the given inputs on device 0.

func (*GraphImpl) RunOnDevice

func (g *GraphImpl) RunOnDevice(defaultDeviceNum compute.DeviceNum, inputs ...any) (outputs []*tensors.Tensor)

RunOnDevice executes the compiled graph on defaultDeviceNum.

func (*GraphImpl) RunWithBuffers

func (g *GraphImpl) RunWithBuffers(inputs []compute.Buffer, donate []bool, defaultDevice compute.DeviceNum) (
	outputs []*tensors.Tensor)

RunWithBuffers executes the graph using on-device buffers.

func (*GraphImpl) RunWithMap

func (g *GraphImpl) RunWithMap(inputs ParamsMap) (outputs []*tensors.Tensor)

RunWithMap executes the compiled graph using a map of parameter nodes to values.

func (*GraphImpl) SetAutoSharding

func (g *GraphImpl) SetAutoSharding(meshes ...*distributed.DeviceMesh) error

SetAutoSharding sets the distributed strategy to AutoSharding and sets the device meshes.

func (*GraphImpl) SetDeviceAssignment

func (g *GraphImpl) SetDeviceAssignment(devices []compute.DeviceNum) error

SetDeviceAssignment specifies which concrete devices to use for the graph.

func (*GraphImpl) SetPublic

func (g *GraphImpl) SetPublic(pub any)

SetPublic records the canonical *graph.Graph wrapper on g.

func (*GraphImpl) SetSPMD

func (g *GraphImpl) SetSPMD(mesh *distributed.DeviceMesh) error

SetSPMD sets the distributed strategy to SPMD.

func (*GraphImpl) SetTraced

func (g *GraphImpl) SetTraced(traced bool)

SetTraced enables or disables stack-trace capture at node creation.

func (*GraphImpl) State

func (g *GraphImpl) State(key any) any

State retrieves an opaque state object attached to the graph.

func (*GraphImpl) String

func (g *GraphImpl) String() string

String returns a human-readable summary of the graph.

func (*GraphImpl) UniqueName

func (g *GraphImpl) UniqueName(base string) string

UniqueName generates a graph-unique name with the given prefix.

func (*GraphImpl) WithName

func (g *GraphImpl) WithName(name string) *GraphImpl

WithName sets the name of the GraphImpl.

type LoggerFn

type LoggerFn func(graph *GraphImpl, messages []string, values []*tensors.Tensor, nodes []NodeId)

LoggerFn logs marked nodes after ExecImpl execution.

type NodeId

type NodeId int

NodeId is a unique NodeId within a GraphImpl.

type NodeImpl

type NodeImpl struct {
	// contains filtered or unexported fields
}

NodeImpl is the internal representation of a node in a computation graph.

func Abs

func Abs(x *NodeImpl) (
	node *NodeImpl)

Abs returns the Op that represents the output of the corresponding operation.

func Add

func Add(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

Add returns the element-wise sum of the two values. Standard broadcasting rules apply (see documentation).

func Atan2

func Atan2(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

Atan2 returns element-wise the arc tangent of y/x, using the signs of both arguments to determine the correct quadrant of the result. Standard broadcasting rules apply (see documentation).

func BackendAllReduce

func BackendAllReduce(operands []*NodeImpl, reductionType ReduceOpType, replicaGroups [][]int) []*NodeImpl

BackendAllReduce is an internal GraphImpl wrapper for the compute.Function.AllReduce method.

func BackendArgMinMax

func BackendArgMinMax(x *NodeImpl, axis int, outputDType dtypes.DType, isMin bool) (
	node *NodeImpl)

BackendArgMinMax is an internal GraphImpl wrapper for the compute.Function.ArgMinMax method.

func BackendBatchNormForInference

func BackendBatchNormForInference(operand *NodeImpl, scale *NodeImpl, offset *NodeImpl, mean *NodeImpl, variance *NodeImpl, epsilon float32, featureAxis int) (
	node *NodeImpl)

BackendBatchNormForInference is an internal GraphImpl wrapper for the compute.Function.BatchNormForInference method.

func BackendBatchNormForTraining

func BackendBatchNormForTraining(operand *NodeImpl, scale *NodeImpl, offset *NodeImpl, epsilon float32, featureAxis int) (
	normalized, batchMean, batchVariance *NodeImpl)

BackendBatchNormForTraining is an internal GraphImpl wrapper for the compute.Function.BatchNormForTraining method.

func BackendBatchNormGradient

func BackendBatchNormGradient(operand *NodeImpl, scale *NodeImpl, mean *NodeImpl, variance *NodeImpl, gradOutput *NodeImpl, epsilon float32, featureAxis int) (
	gradOperand, gradScale, gradOffset *NodeImpl)

BackendBatchNormGradient is an internal GraphImpl wrapper for the compute.Function.BatchNormGradient method.

func BackendBroadcastInDim

func BackendBroadcastInDim(operand *NodeImpl, outputShape shapes.Shape, broadcastAxes []int) (
	node *NodeImpl)

BackendBroadcastInDim is an internal GraphImpl wrapper for the compute.Function.BroadcastInDim method.

func BackendCeil

func BackendCeil(x *NodeImpl) (
	node *NodeImpl)

BackendCeil is an internal GraphImpl wrapper for the compute.Function.Ceil method.

func BackendConcatenate

func BackendConcatenate(axis int, operands ...*NodeImpl) (
	node *NodeImpl)

BackendConcatenate is an internal GraphImpl wrapper for the compute.Function.Concatenate method.

func BackendConvGeneral

func BackendConvGeneral(input *NodeImpl, kernel *NodeImpl, axes compute.ConvolveAxesConfig, strides []int, paddings [][2]int, inputDilations []int, kernelDilations []int, channelGroupCount int, batchGroupCount int) (
	node *NodeImpl)

BackendConvGeneral is an internal GraphImpl wrapper for the compute.Function.ConvGeneral method.

func BackendConvertDType

func BackendConvertDType(x *NodeImpl, dtype dtypes.DType) (
	node *NodeImpl)

BackendConvertDType is an internal GraphImpl wrapper for the compute.Function.ConvertDType method.

func BackendCumMax

func BackendCumMax(operand *NodeImpl, axis int, options compute.CumSumOptions) (
	node *NodeImpl)

BackendCumMax is an internal GraphImpl wrapper for the compute.Function.CumMax method.

func BackendCumSum

func BackendCumSum(operand *NodeImpl, axis int, options compute.CumSumOptions) (
	node *NodeImpl)

BackendCumSum is an internal GraphImpl wrapper for the compute.Function.CumSum method.

func BackendDotGeneral

func BackendDotGeneral(lhs *NodeImpl, lhsContractingAxes []int, lhsBatchAxes []int, rhs *NodeImpl, rhsContractingAxes []int, rhsBatchAxes []int, config compute.DotGeneralConfig) (
	node *NodeImpl)

BackendDotGeneral is an internal GraphImpl wrapper for the compute.Function.DotGeneral method.

func BackendDynamicBroadcastInDim

func BackendDynamicBroadcastInDim(operand *NodeImpl, broadcastAxes []int, dimensions ...compute.DynamicDimensionSpec) (
	node *NodeImpl)

BackendDynamicBroadcastInDim is an internal GraphImpl wrapper for the compute.Function.DynamicBroadcastInDim method.

func BackendDynamicDimensionSize

func BackendDynamicDimensionSize(operand *NodeImpl, axis int) (
	node *NodeImpl)

BackendDynamicDimensionSize is an internal GraphImpl wrapper for the compute.Function.DynamicDimensionSize method.

func BackendDynamicIota

func BackendDynamicIota(g *GraphImpl, dtype dtypes.DType, iotaAxis int, dimensions ...compute.DynamicDimensionSpec) (
	node *NodeImpl)

BackendDynamicIota is an internal GraphImpl wrapper for the compute.Function.DynamicIota method.

func BackendDynamicPad

func BackendDynamicPad(x *NodeImpl, fillValue *NodeImpl, axesConfig ...compute.DynamicPadAxis) (
	node *NodeImpl)

BackendDynamicPad is an internal GraphImpl wrapper for the compute.Function.DynamicPad method.

func BackendDynamicReshape

func BackendDynamicReshape(operand *NodeImpl, dimensions ...compute.DynamicDimensionSpec) (
	node *NodeImpl)

BackendDynamicReshape is an internal GraphImpl wrapper for the compute.Function.DynamicReshape method.

func BackendFFT

func BackendFFT(operand *NodeImpl, fftType compute.FFTType, fftLength []int) (
	node *NodeImpl)

BackendFFT is an internal GraphImpl wrapper for the compute.Function.FFT method.

func BackendFloor

func BackendFloor(x *NodeImpl) (
	node *NodeImpl)

BackendFloor is an internal GraphImpl wrapper for the compute.Function.Floor method.

func BackendFusedActivation

func BackendFusedActivation(x *NodeImpl, cfg compute.ActivationConfig) (
	node *NodeImpl)

BackendFusedActivation is an internal GraphImpl wrapper for the compute.Function.FusedActivation method.

func BackendFusedActivationVJP

func BackendFusedActivationVJP(y *NodeImpl, x *NodeImpl, dOutput *NodeImpl, cfg compute.ActivationConfig) (
	node *NodeImpl)

BackendFusedActivationVJP is an internal GraphImpl wrapper for the compute.Function.FusedActivationVJP method.

func BackendFusedAttentionQKVProjection

func BackendFusedAttentionQKVProjection(x *NodeImpl, wQKV *NodeImpl, biasQ *NodeImpl, biasK *NodeImpl, biasV *NodeImpl, queryDim int, keyValueDim int) (
	query, key, value *NodeImpl)

BackendFusedAttentionQKVProjection is an internal GraphImpl wrapper for the compute.Function.FusedAttentionQKVProjection method.

func BackendFusedDense

func BackendFusedDense(x *NodeImpl, weight *NodeImpl, bias *NodeImpl, options compute.DenseConfig) (
	node *NodeImpl)

BackendFusedDense is an internal GraphImpl wrapper for the compute.Function.FusedDense method.

func BackendFusedDenseVJP

func BackendFusedDenseVJP(x, weight, bias, y, dOutput *NodeImpl, options compute.DenseConfig) (dx, dWeight, dBias *NodeImpl)

BackendFusedDenseVJP computes the VJP of FusedDense.

func BackendFusedLayerNorm

func BackendFusedLayerNorm(x *NodeImpl, axes []int, epsilon float64, gamma *NodeImpl, beta *NodeImpl) (
	node *NodeImpl)

BackendFusedLayerNorm is an internal GraphImpl wrapper for the compute.Function.FusedLayerNorm method.

func BackendFusedLayerNormVJP

func BackendFusedLayerNormVJP(x, dOutput *NodeImpl, axes []int, epsilon float64, gamma, beta *NodeImpl) (dx, dGamma, dBeta *NodeImpl)

BackendFusedLayerNormVJP computes the VJP of FusedLayerNorm.

func BackendFusedQuantizedDense

func BackendFusedQuantizedDense(x, weight, bias *NodeImpl, cfg QuantizedDenseConfig) *NodeImpl

BackendFusedQuantizedDense performs fused quantized matmul + optional bias + optional activation.

func BackendFusedQuantizedDenseVJP

func BackendFusedQuantizedDenseVJP(x, weight, bias, y, dOutput *NodeImpl, cfg QuantizedDenseConfig) (dx, dBias *NodeImpl)

BackendFusedQuantizedDenseVJP computes the VJP of FusedQuantizedDense.

func BackendFusedScaledDotProductAttentionVJP

func BackendFusedScaledDotProductAttentionVJP(query *NodeImpl, key *NodeImpl, value *NodeImpl, axesLayout compute.AttentionAxesLayout, options *compute.ScaledDotProductAttentionConfig, output *NodeImpl, statesForVJP []*NodeImpl, dOutput *NodeImpl) (
	dQuery, dKey, dValue *NodeImpl)

BackendFusedScaledDotProductAttentionVJP is an internal GraphImpl wrapper for the compute.Function.FusedScaledDotProductAttentionVJP method.

func BackendFusedSoftmax

func BackendFusedSoftmax(x *NodeImpl, axis int) (
	node *NodeImpl)

BackendFusedSoftmax is an internal GraphImpl wrapper for the compute.Function.FusedSoftmax method.

func BackendFusedTopK

func BackendFusedTopK(operand *NodeImpl, k int, cfg compute.FusedTopKConfig) (
	values, indices *NodeImpl)

BackendFusedTopK is an internal GraphImpl wrapper for the compute.Function.FusedTopK method.

func BackendGather

func BackendGather(operand *NodeImpl, startIndices *NodeImpl, indexVectorAxis int, offsetOutputAxes []int, collapsedSliceAxes []int, startIndexMap []int, sliceSizes []int, indicesAreSorted bool) (
	node *NodeImpl)

BackendGather is an internal GraphImpl wrapper for the compute.Function.Gather method.

func BackendIota

func BackendIota(g *GraphImpl, shape shapes.Shape, iotaAxis int) (
	node *NodeImpl)

BackendIota is an internal GraphImpl wrapper for the compute.Function.Iota method.

func BackendNonZero

func BackendNonZero(operand *NodeImpl, cfg compute.NonZeroConfig) (
	node *NodeImpl)

BackendNonZero is an internal GraphImpl wrapper for the compute.Function.NonZero method.

func BackendOptimizationBarrier

func BackendOptimizationBarrier(operands ...*NodeImpl) []*NodeImpl

BackendOptimizationBarrier is an internal GraphImpl wrapper for the compute.Function.OptimizationBarrier method.

func BackendQuantizedGather

func BackendQuantizedGather(x, indices *NodeImpl, tq *Quantization) *NodeImpl

BackendQuantizedGather performs a quantized row gather.

func BackendRNGBitGenerator

func BackendRNGBitGenerator(state *NodeImpl, shape shapes.Shape, algorithm compute.RNGAlgorithm) (
	newState, values *NodeImpl)

BackendRNGBitGenerator is an internal GraphImpl wrapper for the compute.Function.RNGBitGenerator method.

func BackendReduceBitwiseAnd

func BackendReduceBitwiseAnd(x *NodeImpl, axes ...int) (
	node *NodeImpl)

BackendReduceBitwiseAnd is an internal GraphImpl wrapper for the compute.Function.ReduceBitwiseAnd method.

func BackendReduceBitwiseOr

func BackendReduceBitwiseOr(x *NodeImpl, axes ...int) (
	node *NodeImpl)

BackendReduceBitwiseOr is an internal GraphImpl wrapper for the compute.Function.ReduceBitwiseOr method.

func BackendReduceBitwiseXor

func BackendReduceBitwiseXor(x *NodeImpl, axes ...int) (
	node *NodeImpl)

BackendReduceBitwiseXor is an internal GraphImpl wrapper for the compute.Function.ReduceBitwiseXor method.

func BackendReduceLogicalAnd

func BackendReduceLogicalAnd(x *NodeImpl, axes ...int) (
	node *NodeImpl)

BackendReduceLogicalAnd is an internal GraphImpl wrapper for the compute.Function.ReduceLogicalAnd method.

func BackendReduceLogicalOr

func BackendReduceLogicalOr(x *NodeImpl, axes ...int) (
	node *NodeImpl)

BackendReduceLogicalOr is an internal GraphImpl wrapper for the compute.Function.ReduceLogicalOr method.

func BackendReduceLogicalXor

func BackendReduceLogicalXor(x *NodeImpl, axes ...int) (
	node *NodeImpl)

BackendReduceLogicalXor is an internal GraphImpl wrapper for the compute.Function.ReduceLogicalXor method.

func BackendReduceMax

func BackendReduceMax(x *NodeImpl, axes ...int) (
	node *NodeImpl)

BackendReduceMax is an internal GraphImpl wrapper for the compute.Function.ReduceMax method.

func BackendReduceMin

func BackendReduceMin(x *NodeImpl, axes ...int) (
	node *NodeImpl)

BackendReduceMin is an internal GraphImpl wrapper for the compute.Function.ReduceMin method.

func BackendReduceProduct

func BackendReduceProduct(x *NodeImpl, axes ...int) (
	node *NodeImpl)

BackendReduceProduct is an internal GraphImpl wrapper for the compute.Function.ReduceProduct method.

func BackendReduceSum

func BackendReduceSum(x *NodeImpl, axes ...int) (
	node *NodeImpl)

BackendReduceSum is an internal GraphImpl wrapper for the compute.Function.ReduceSum method.

func BackendReduceWindow

func BackendReduceWindow(input *NodeImpl, reductionType ReduceOpType, windowDimensions []int, strides []int, inputDilations []int, windowDilations []int, paddings [][2]int) (
	node *NodeImpl)

BackendReduceWindow is an internal GraphImpl wrapper for the compute.Function.ReduceWindow method.

func BackendReshape

func BackendReshape(x *NodeImpl, dimensions ...int) (
	node *NodeImpl)

BackendReshape is an internal GraphImpl wrapper for the compute.Function.Reshape method.

func BackendReverse

func BackendReverse(x *NodeImpl, axes ...int) (
	node *NodeImpl)

BackendReverse is an internal GraphImpl wrapper for the compute.Function.Reverse method.

func BackendScatterMax

func BackendScatterMax(operand *NodeImpl, scatterIndices *NodeImpl, updates *NodeImpl, indexVectorAxis int, updateWindowAxes []int, insertedWindowAxes []int, scatterAxesToOperandAxes []int, indicesAreSorted bool, uniqueIndices bool) (
	node *NodeImpl)

BackendScatterMax is an internal GraphImpl wrapper for the compute.Function.ScatterMax method.

func BackendScatterMin

func BackendScatterMin(operand *NodeImpl, scatterIndices *NodeImpl, updates *NodeImpl, indexVectorAxis int, updateWindowAxes []int, insertedWindowAxes []int, scatterAxesToOperandAxes []int, indicesAreSorted bool, uniqueIndices bool) (
	node *NodeImpl)

BackendScatterMin is an internal GraphImpl wrapper for the compute.Function.ScatterMin method.

func BackendScatterSum

func BackendScatterSum(operand *NodeImpl, scatterIndices *NodeImpl, updates *NodeImpl, indexVectorAxis int, updateWindowAxes []int, insertedWindowAxes []int, scatterAxesToOperandAxes []int, indicesAreSorted bool, uniqueIndices bool) (
	node *NodeImpl)

BackendScatterSum is an internal GraphImpl wrapper for the compute.Function.ScatterSum method.

func BackendSelectAndScatterMax

func BackendSelectAndScatterMax(operand *NodeImpl, source *NodeImpl, windowDimensions []int, windowStrides []int, paddings [][2]int) (
	node *NodeImpl)

BackendSelectAndScatterMax is an internal GraphImpl wrapper for the compute.Function.SelectAndScatterMax method.

func BackendSelectAndScatterMin

func BackendSelectAndScatterMin(operand *NodeImpl, source *NodeImpl, windowDimensions []int, windowStrides []int, paddings [][2]int) (
	node *NodeImpl)

BackendSelectAndScatterMin is an internal GraphImpl wrapper for the compute.Function.SelectAndScatterMin method.

func BackendShiftLeft

func BackendShiftLeft(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

BackendShiftLeft is an internal GraphImpl wrapper for the compute.Function.ShiftLeft method.

func BackendShiftRightArithmetic

func BackendShiftRightArithmetic(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

BackendShiftRightArithmetic is an internal GraphImpl wrapper for the compute.Function.ShiftRightArithmetic method.

func BackendShiftRightLogical

func BackendShiftRightLogical(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

BackendShiftRightLogical is an internal GraphImpl wrapper for the compute.Function.ShiftRightLogical method.

func BackendSign

func BackendSign(x *NodeImpl) (
	node *NodeImpl)

BackendSign is an internal GraphImpl wrapper for the compute.Function.Sign method.

func BackendSlice

func BackendSlice(x *NodeImpl, starts []int, limits []int, strides []int) (
	node *NodeImpl)

BackendSlice is an internal GraphImpl wrapper for the compute.Function.Slice method.

func BackendTranspose

func BackendTranspose(x *NodeImpl, permutation ...int) (
	node *NodeImpl)

BackendTranspose is an internal GraphImpl wrapper for the compute.Function.Transpose method.

func BackendWhere

func BackendWhere(condition *NodeImpl, onTrue *NodeImpl, onFalse *NodeImpl) (
	node *NodeImpl)

BackendWhere is an internal GraphImpl wrapper for the compute.Function.Where method.

func BatchNormForInference

func BatchNormForInference(operand, scale, offset, mean, variance *NodeImpl, epsilon float32, axis int) *NodeImpl

BatchNormForInference wraps the backend BatchNormForInference operation.

func BatchNormForTraining

func BatchNormForTraining(operand, scale, offset *NodeImpl, epsilon float32, axis int) (normalized, batchMean, batchVariance *NodeImpl)

BatchNormForTraining wraps the backend BatchNormForTraining operation.

func BatchNormGradient

func BatchNormGradient(operand, scale, mean, variance, gradOutput *NodeImpl, epsilon float32, axis int) (gradOperand, gradScale, gradOffset *NodeImpl)

BatchNormGradient wraps the backend BatchNormGradient operation.

func BitCount

func BitCount(operand *NodeImpl) (
	node *NodeImpl)

BitCount returns the number of bits that are set to one. Also known as Population Count ("Popcnt") or Hamming Weight.

func Bitcast

func Bitcast(operand *NodeImpl, targetDType dtypes.DType) (
	node *NodeImpl)

Bitcast performs an elementwise bitcast operation from a dtype to another dtype.

The Bitcast doesn't "convert", rather it just reinterprets the bits from operand.DType() to the targetDType.

If the element sizes (in bytes/bits) differ, the last dimension is adjusted:

  • Smaller target: a new trailing axis of size (srcBits / dstBits) is appended, so rank is increased by 1.
  • Larger target: the last axis must be equal to (dstBits / srcBits), and the resultign rank is decreased by 1 ("squeezed").

E.g:

Bitcast([1]uint32{0xdeadbeef}, dtypes.UInt16) -> [1][2]uint16{{0xbeef, 0xdead}} // Little-endian encoding.
Bitcast([1][2]uint16{{0xbeef, 0xdead}}, dtypes.UInt32) -> [1]uint32{0xdeadbeef}

Dynamic shapes: Bitcasting that collapses or expands a dynamic dimension is currently not supported (requires axis expressions).

func BitwiseAnd

func BitwiseAnd(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

BitwiseAnd returns the element-wise bitwise AND operation.

func BitwiseNot

func BitwiseNot(x *NodeImpl) (
	node *NodeImpl)

BitwiseNot returns the element-wise bitwise AND operation.

func BitwiseOr

func BitwiseOr(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

BitwiseOr returns the element-wise bitwise OR operation.

func BitwiseXor

func BitwiseXor(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

BitwiseXor returns the element-wise bitwise XOR operator.

func Clamp

func Clamp(min *NodeImpl, x *NodeImpl, max *NodeImpl) (
	node *NodeImpl)

Clamp returns the element-wise clamping operation.

The values max and min can either be a scalar or have the same shape as x.

func Clz

func Clz(x *NodeImpl) (
	node *NodeImpl)

Clz returns element-wise the "count leading zeros" bits of input node x -- for integer values.

func Complex

func Complex(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

Complex returns the complex number taking x0 as the real part and x1 as the imaginary part. The real (x0) and imaginary (x1) must have the same dtype, and they must be either `dtypes.Float32` or `dtypes.Float64`. The output will be either `dtypes.Complex64` or `dtypes.Complex128`, depending on x0 and x1 dtypes. The shapes of `real` or `imaginary` must be the same, or one must be a scalar, in which case the value is broadcast to every other value.

func Conj

func Conj(x *NodeImpl) (
	node *NodeImpl)

Conj returns the conjugate of a complex number. E.g: Conj(1+3i) = 1-3i

func Const

func Const(g *GraphImpl, x any) *NodeImpl

Const creates a constant node in g from a tensor, scalar, or multidimensional slice.

func ConstBuffer

func ConstBuffer(g *GraphImpl, buf compute.Buffer, donate bool) *NodeImpl

ConstBuffer returns a newly created constant node backed by buf.

func ConstDonatedTensor

func ConstDonatedTensor(g *GraphImpl, t *tensors.Tensor) *NodeImpl

ConstDonatedTensor creates a constant node adopting t's device buffer when possible, finalizing t.

func ConstTensor

func ConstTensor(g *GraphImpl, t *tensors.Tensor) (node *NodeImpl)

ConstTensor returns a cached constant node for t in the current function scope.

func Cos

func Cos(x *NodeImpl) (
	node *NodeImpl)

Cos returns the Op that represents the output of the corresponding operation.

func Div

func Div(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

Div returns the element-wise division of the two values. Standard broadcasting rules apply (see documentation).

func DynamicShape

func DynamicShape(operand *NodeImpl) (
	node *NodeImpl)

DynamicShape returns the shape of the operand as a dynamic 1D tensor. This is only supported by backends that support dynamic shapes (see Capabilities.DynamicShapes).

The returned 1D tensor has dtype Capabilities.DynamicDimDType (typically Int64, or backend-dependent).

func DynamicSlice

func DynamicSlice(operand *NodeImpl, startIndices []*NodeImpl, sliceDims []int) (
	node *NodeImpl)

DynamicSlice extracts a slice from the operand at the startIndices position and the given sliceSizes.

- operand: tensor from where to take the slice. - startIndices: scalar tensors, one per axis of operand: len(startIndices) == operand.Rank(). - sliceSizes: static values and fixed to keep the shape of the output static.

The startIndices are adjusted as follows:

adjustedStartIndices[i] = clamp(0, StartIndices[i], operand.Dimensions[i] - sliceSizes[i])

See description in https://openxla.org/xla/operation_semantics#dynamicslice

func DynamicUpdateSlice

func DynamicUpdateSlice(operand *NodeImpl, update *NodeImpl, startIndices []*NodeImpl) (
	node *NodeImpl)

DynamicUpdateSlice updates the operand with the values given in update, at the position given by startIndices.

- operand: original value that to be updated. - update: values to "paste" on top of operand, at position startIndices. - startIndices: scalar tensors, one per axis of operand: len(startIndices) == operand.Rank(). - sliceSizes: static values and fixed to keep the shape of the output static.

It returns a value with the same shape as the operand, with the values updated.

The startIndices are adjusted as follows:

adjustedStartIndices[i] = clamp(0, StartIndices[i], operand.Dimensions[i] - update.Dimensions[i])

func Equal

func Equal(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

Equal performs element-wise equality check, returns boolean results with the same dimensions as input.

func EqualTotalOrder

func EqualTotalOrder(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

EqualTotalOrder returns the element-wise operation. Standard broadcasting rules apply (see documentation). The "TotalOrder" version of the operation enforces `-NaN < -Inf < -Finite < -0 < +0 < +Finite < +Inf < +NaN`.

func Erf

func Erf(x *NodeImpl) (
	node *NodeImpl)

Erf returns the "error function", defined as erf(x) = 2/Pi * \int_{0}^{x}{e^{-t^2}dt}.

func Exp

func Exp(x *NodeImpl) (
	node *NodeImpl)

Exp returns the Op that represents the output of the corresponding operation.

func Expm1

func Expm1(x *NodeImpl) (
	node *NodeImpl)

Expm1 returns the Op that represents the output of the corresponding operation.

func FusedOpCaller

func FusedOpCaller(fused, decomposed func() *NodeImpl, useDecomposedAlternateVJP bool) (output *NodeImpl, opFused bool)

FusedOpCaller attempts to call fused, falling back to decomposed on compute.ErrNotImplemented.

func FusedOpCallerMulti

func FusedOpCallerMulti(fused, decomposed func() []*NodeImpl, useDecomposedAlternateVJP bool) (outputs []*NodeImpl, opFused bool)

FusedOpCallerMulti is the multi-output counterpart of FusedOpCaller.

func GreaterOrEqual

func GreaterOrEqual(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

GreaterOrEqual performs element-wise comparison, returns boolean results with the same dimensions as input.

func GreaterOrEqualTotalOrder

func GreaterOrEqualTotalOrder(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

GreaterOrEqualTotalOrder returns the element-wise operation. Standard broadcasting rules apply (see documentation). The "TotalOrder" version of the operation enforces `-NaN < -Inf < -Finite < -0 < +0 < +Finite < +Inf < +NaN`.

func GreaterThan

func GreaterThan(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

GreaterThan performs element-wise comparison, returns boolean results with the same dimensions as input.

func GreaterThanTotalOrder

func GreaterThanTotalOrder(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

GreaterThanTotalOrder returns the element-wise operation. Standard broadcasting rules apply (see documentation). The "TotalOrder" version of the operation enforces `-NaN < -Inf < -Finite < -0 < +0 < +Finite < +Inf < +NaN`.

func Identity

func Identity(x *NodeImpl) (
	node *NodeImpl)

Identity returns an Op whose output is the same as its input. It's a no-op that can serve as a place-holder.

func If

func If(pred *NodeImpl, trueBranch, falseBranch *FunctionImpl) []*NodeImpl

If executes trueBranch or falseBranch based on scalar boolean pred.

func Imag

func Imag(x *NodeImpl) (
	node *NodeImpl)

Imag returns the imaginary part of a complex number. It returns 0 if the x is a float number.

func IsFinite

func IsFinite(x *NodeImpl) (
	node *NodeImpl)

IsFinite tests whether each element of operand is finite, i.e., if it is not positive nor negative infinity, and it is not NaN. It returns the same shape as the input, but with boolean values where each element is true if and only if the corresponding input element is finite.

func IsNaN

func IsNaN(x *NodeImpl) (
	node *NodeImpl)

IsNaN tests whether each element of operand is NaN, i.e., if it is not a finite number.

func LessOrEqual

func LessOrEqual(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

LessOrEqual performs element-wise comparison, returns boolean results with the same dimensions as input.

func LessOrEqualTotalOrder

func LessOrEqualTotalOrder(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

LessOrEqualTotalOrder returns the element-wise operation. Standard broadcasting rules apply (see documentation). The "TotalOrder" version of the operation enforces `-NaN < -Inf < -Finite < -0 < +0 < +Finite < +Inf < +NaN`.

func LessThan

func LessThan(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

LessThan performs element-wise comparison, returns boolean results with the same dimensions as input.

func LessThanTotalOrder

func LessThanTotalOrder(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

LessThanTotalOrder returns the element-wise operation. Standard broadcasting rules apply (see documentation). The "TotalOrder" version of the operation enforces `-NaN < -Inf < -Finite < -0 < +0 < +Finite < +Inf < +NaN`.

func Log

func Log(x *NodeImpl) (
	node *NodeImpl)

Log returns the Op that represents the output of the corresponding operation.

func Log1p

func Log1p(x *NodeImpl) (
	node *NodeImpl)

Log1p returns the expression log(x+1).

func LogicalAnd

func LogicalAnd(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

LogicalAnd returns the element-wise logical AND operation.

func LogicalNot

func LogicalNot(x *NodeImpl) (
	node *NodeImpl)

LogicalNot returns the Op that represents the output of the corresponding operation.

func LogicalOr

func LogicalOr(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

LogicalOr returns the element-wise logical OR operation.

func LogicalXor

func LogicalXor(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

LogicalXor returns the element-wise logical XOR operator.

func Logistic

func Logistic(x *NodeImpl) (
	node *NodeImpl)

Logistic returns the element-wise expression 1/(1+exp(-x)). Also known as the Sigmoid function.

func Max

func Max(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

Max returns the element-wise highest value among the two.

func Min

func Min(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

Min returns the element-wise smallest value among the two.

func Mul

func Mul(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

Mul returns the element-wise multiplication of the two values. Standard broadcasting rules apply (see documentation).

func Neg

func Neg(x *NodeImpl) (
	node *NodeImpl)

Neg returns the Op that represents the output of the corresponding operation.

func NewNode

func NewNode(g *GraphImpl, outputOps []compute.Value, outputShapes []shapes.Shape, inputs NodeInputs, inputNodes []*NodeImpl) *NodeImpl

NewNode constructs and registers a NodeImpl in g with the given outputs and inputs.

func NotEqual

func NotEqual(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

NotEqual performs element-wise inequality check, returns boolean results with the same dimensions as input.

func NotEqualTotalOrder

func NotEqualTotalOrder(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

NotEqualTotalOrder returns the element-wise operation. Standard broadcasting rules apply (see documentation). The "TotalOrder" version of the operation enforces `-NaN < -Inf < -Finite < -0 < +0 < +Finite < +Inf < +NaN`.

func OptimizationBarrier

func OptimizationBarrier(operand *NodeImpl) *NodeImpl

OptimizationBarrier prevents the compiler from optimizing across operand.

func OptimizationBarriers

func OptimizationBarriers(operands ...*NodeImpl) []*NodeImpl

OptimizationBarriers creates an optimization barrier for multiple operands.

func Pad

func Pad(x *NodeImpl, fillValue *NodeImpl, axesConfig ...compute.PadAxis) (
	node *NodeImpl)

Pad injects padding on the start, end, or interior (in between each element) of the given operand. There must be at most `operand.Rank()` axesConfig values. Missing PadAxis are assumed to be zeros, that is, no padding for those axes.

For each axis i:

  • `Interior` elements of `fillValue` are first inserted between consecutive elements along the axis (only when `x.Dimensions[i] > 1`). `Interior` cannot be negative (`Interior >= 0`).
  • `Start` and `End` specify padding at the start and end of the axis. They can be negative, in which case elements are truncated (cropped) from the start or end of the axis (after interior padding is applied).
  • The resulting dimension size for axis i is: `output.Dimensions[i] = x.Dimensions[i] + max(x.Dimensions[i]-1, 0)*Interior + Start + End` which must be non-negative (`>= 0`).

Examples (for 1D `x = [1, 2, 3]` and `fillValue = 0`):

  • `PadAxis{Start: 1, End: 2}` -> `[0, 1, 2, 3, 0, 0]` (shape `[6]`)
  • `PadAxis{Interior: 1}` -> `[1, 0, 2, 0, 3]` (shape `[5]`)
  • `PadAxis{Start: -1, End: -1}` -> `[2]` (shape `[1]`)
  • `PadAxis{Start: -1, End: 1, Interior: 1}` -> `[0, 2, 0, 3, 0]` (shape `[5]`)

Dynamic shapes: Padding on a dynamic axis is currently not supported if the padding is non-zero, because the resulting size cannot be represented symbolically yet (requires axis expressions).

func Parameter

func Parameter(g *GraphImpl, name string, shape shapes.Shape) *NodeImpl

Parameter registers an input parameter on g.

func Pow

func Pow(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

Pow returns the Op that represents the output of the corresponding operation.

func Real

func Real(x *NodeImpl) (
	node *NodeImpl)

Real return the real part of a complex number. It returns x if the x is a float number.

func Rem

func Rem(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

Rem returns the remainder operation, also known as modulo (or Mod for short). Notice despite the name XLA implements Mod not IEEE754 Remainder operation.

func Round

func Round(x *NodeImpl) (
	node *NodeImpl)

Round returns the Op that represents the output of the corresponding operation. This operation rounds to the nearest even.

func Rsqrt

func Rsqrt(x *NodeImpl) (
	node *NodeImpl)

Rsqrt returns the element-wise reciprocal of square root operation 1/sqrt(x).

func SchedulingBarrier

func SchedulingBarrier(operand *NodeImpl, dependencies ...*NodeImpl) (
	node *NodeImpl)

SchedulingBarrier introduces a scheduling barrier. Returned value is identity to the operand, but it is guaranteed to depend on all the dependencies.

func ShardedParameter

func ShardedParameter(g *GraphImpl, name string, shape shapes.Shape, sharding *distributed.ShardingSpec) (node *NodeImpl)

ShardedParameter registers a parameter with an optional sharding specification on g.

func SharedConstant

func SharedConstant(g *GraphImpl, val compute.Value) *NodeImpl

SharedConstant creates a Constant node reusing a shared backend constant compute.Value.

func Sin

func Sin(x *NodeImpl) (
	node *NodeImpl)

Sin returns the Op that represents the output of the corresponding operation.

func SortFunc

func SortFunc(comparator *FunctionImpl, axis int, isStable bool, inputs ...*NodeImpl) []*NodeImpl

SortFunc sorts one or more tensors along axis using comparator.

func SplitNode

func SplitNode(multiOutputNode *NodeImpl) (splitNodes []*NodeImpl)

SplitNode splits a multi-output NodeImpl into single-output NodeImpls.

func Sqrt

func Sqrt(x *NodeImpl) (
	node *NodeImpl)

Sqrt returns the Op that represents the output of the corresponding operation.

func StopGradient

func StopGradient(x *NodeImpl) *NodeImpl

StopGradient creates an Identity node with stopGradient set to true.

func Sub

func Sub(lhs *NodeImpl, rhs *NodeImpl) (
	node *NodeImpl)

Sub returns the element-wise subtraction of the two values. Standard broadcasting rules apply (see documentation).

func Tanh

func Tanh(x *NodeImpl) (
	node *NodeImpl)

Tanh returns the Op that represents the output of the corresponding operation.

func While

func While(cond, body *FunctionImpl, initialState ...*NodeImpl) []*NodeImpl

While executes a loop while cond returns true.

func (*NodeImpl) AssertValid

func (n *NodeImpl) AssertValid()

AssertValid panics if n is nil or its graph is invalid.

func (*NodeImpl) CloneWithInputs

func (n *NodeImpl) CloneWithInputs(newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs creates a clone of the node using newInputs instead of the original ones.

func (*NodeImpl) ConstantValue

func (n *NodeImpl) ConstantValue() *tensors.Tensor

ConstantValue returns the tensor stored in a constant node (when size < MinConstValueSizeToKeep).

func (*NodeImpl) CustomVJP

func (n *NodeImpl) CustomVJP() any

CustomVJP returns the registered custom gradient function (stored as any), if any.

func (*NodeImpl) DType

func (n *NodeImpl) DType() dtypes.DType

DType returns the DType of the node's shape.

func (*NodeImpl) Function

func (n *NodeImpl) Function() *FunctionImpl

Function returns the FunctionImpl scope that holds this node.

func (*NodeImpl) GetAlias

func (n *NodeImpl) GetAlias() string

GetAlias returns the alias of the current node, or "".

func (*NodeImpl) GetParameterHandle

func (n *NodeImpl) GetParameterHandle() ParameterHandle

GetParameterHandle returns the parameter id in the graph.

func (*NodeImpl) GetParameterName

func (n *NodeImpl) GetParameterName() string

GetParameterName returns the parameter name.

func (*NodeImpl) Graph

func (n *NodeImpl) Graph() *GraphImpl

Graph returns the GraphImpl that holds this node.

func (*NodeImpl) Id

func (n *NodeImpl) Id() NodeId

Id returns the unique id of this node within the GraphImpl.

func (*NodeImpl) Inputs

func (n *NodeImpl) Inputs() []*NodeImpl

Inputs returns the direct input nodes.

func (*NodeImpl) IsCheckpointed

func (n *NodeImpl) IsCheckpointed() bool

IsCheckpointed reports whether this node is a checkpoint boundary.

func (*NodeImpl) IsLogged

func (n *NodeImpl) IsLogged() bool

IsLogged returns whether node is marked to be logged.

func (*NodeImpl) IsScalar

func (n *NodeImpl) IsScalar() bool

IsScalar returns whether the node's shape is a scalar.

func (*NodeImpl) LogMessage

func (n *NodeImpl) LogMessage() string

LogMessage returns the log message associated with the node, if any.

func (*NodeImpl) NeedsRematerialization

func (n *NodeImpl) NeedsRematerialization() bool

NeedsRematerialization reports whether this node's inputs must be rematerialized during backward pass.

func (*NodeImpl) NodeInputs

func (n *NodeImpl) NodeInputs() NodeInputs

NodeInputs returns the NodeInputs descriptor for this node.

func (*NodeImpl) NumOutputs

func (n *NodeImpl) NumOutputs() int

NumOutputs returns the number of outputs for this node.

func (*NodeImpl) OutputOps

func (n *NodeImpl) OutputOps() []compute.Value

OutputOps returns the underlying backend values produced by this node.

func (*NodeImpl) OutputShapes

func (n *NodeImpl) OutputShapes() []shapes.Shape

OutputShapes returns the output shapes produced by this node.

func (*NodeImpl) Public

func (n *NodeImpl) Public() any

Public returns the canonical *graph.Node wrapper (stored as any), or nil.

func (*NodeImpl) Rank

func (n *NodeImpl) Rank() int

Rank returns the rank of the node's shape.

func (*NodeImpl) SetCheckpointed

func (n *NodeImpl) SetCheckpointed(isCheckpointed, needsRematerialization bool)

SetCheckpointed sets the checkpoint boundary flags on this node.

func (*NodeImpl) SetCustomVJP

func (n *NodeImpl) SetCustomVJP(vjp any)

SetCustomVJP sets the custom gradient function (stored as any).

func (*NodeImpl) SetInputNodes

func (n *NodeImpl) SetInputNodes(inputs []*NodeImpl)

SetInputNodes overrides the tracked inputNodes slice on n (e.g. for DynamicPad).

func (*NodeImpl) SetLogged

func (n *NodeImpl) SetLogged(message string)

SetLogged marks a node to be logged by executors with the given message.

func (*NodeImpl) SetLoggedf

func (n *NodeImpl) SetLoggedf(format string, args ...any)

SetLoggedf marks a node to be logged with a formatted message.

func (*NodeImpl) SetOutputShape

func (n *NodeImpl) SetOutputShape(idx int, shape shapes.Shape)

SetOutputShape overrides the output shape at idx on n (e.g. to preserve dynamic axis names).

func (*NodeImpl) SetPublic

func (n *NodeImpl) SetPublic(pub any)

SetPublic records the canonical *graph.Node wrapper on n.

func (*NodeImpl) SetStopGradient

func (n *NodeImpl) SetStopGradient(stop bool)

SetStopGradient sets the stopGradient flag.

func (*NodeImpl) SetVJPAlternateOutputs

func (n *NodeImpl) SetVJPAlternateOutputs(alts []*NodeImpl)

SetVJPAlternateOutputs sets the decomposed alternate outputs for VJP computation.

func (*NodeImpl) Shape

func (n *NodeImpl) Shape() shapes.Shape

Shape returns the Shape of the node's output (empty for multi-output nodes).

func (*NodeImpl) StopGradient

func (n *NodeImpl) StopGradient() bool

StopGradient returns whether node is marked with StopGradient.

func (*NodeImpl) String

func (n *NodeImpl) String() (str string)

String implements fmt.Stringer.

func (*NodeImpl) Trace

func (n *NodeImpl) Trace() error

Trace returns the stack-trace error of when the node was created, if Graph.SetTraced(true) was set.

func (*NodeImpl) Type

func (n *NodeImpl) Type() NodeType

Type returns the NodeType of this node.

func (*NodeImpl) VJPAlternateOutputs

func (n *NodeImpl) VJPAlternateOutputs() []*NodeImpl

VJPAlternateOutputs returns the decomposed alternate outputs for VJP computation.

func (*NodeImpl) WithAlias

func (n *NodeImpl) WithAlias(alias string) *NodeImpl

WithAlias sets an alias in the GraphImpl for the node.

type NodeInputs

type NodeInputs interface {
	Type() NodeType
	String() string
	CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl
}

NodeInputs represents the inputs to a NodeImpl.

type NodeInputsAbs

type NodeInputsAbs struct {
	X *NodeImpl
}

NodeInputsAbs holds the inputs used for the call to compute.Abs.

func (*NodeInputsAbs) CloneWithInputs

func (ni *NodeInputsAbs) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsAbs) String

func (ni *NodeInputsAbs) String() string

String implements the interface NodeInputs.

func (*NodeInputsAbs) Type

func (ni *NodeInputsAbs) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsAdd

type NodeInputsAdd struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsAdd holds the inputs used for the call to compute.Add.

func (*NodeInputsAdd) CloneWithInputs

func (ni *NodeInputsAdd) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsAdd) String

func (ni *NodeInputsAdd) String() string

String implements the interface NodeInputs.

func (*NodeInputsAdd) Type

func (ni *NodeInputsAdd) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsAllReduce

type NodeInputsAllReduce struct {
	Operands      []*NodeImpl
	ReductionType ReduceOpType
	ReplicaGroups [][]int
}

NodeInputsAllReduce holds the inputs used for the call to compute.AllReduce.

func (*NodeInputsAllReduce) CloneWithInputs

func (ni *NodeInputsAllReduce) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsAllReduce) String

func (ni *NodeInputsAllReduce) String() string

String implements the interface NodeInputs.

func (*NodeInputsAllReduce) Type

func (ni *NodeInputsAllReduce) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsArgMinMax

type NodeInputsArgMinMax struct {
	X           *NodeImpl
	Axis        int
	OutputDType dtypes.DType
	IsMin       bool
}

NodeInputsArgMinMax holds the inputs used for the call to compute.ArgMinMax.

func (*NodeInputsArgMinMax) CloneWithInputs

func (ni *NodeInputsArgMinMax) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsArgMinMax) String

func (ni *NodeInputsArgMinMax) String() string

String implements the interface NodeInputs.

func (*NodeInputsArgMinMax) Type

func (ni *NodeInputsArgMinMax) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsAtan2

type NodeInputsAtan2 struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsAtan2 holds the inputs used for the call to compute.Atan2.

func (*NodeInputsAtan2) CloneWithInputs

func (ni *NodeInputsAtan2) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsAtan2) String

func (ni *NodeInputsAtan2) String() string

String implements the interface NodeInputs.

func (*NodeInputsAtan2) Type

func (ni *NodeInputsAtan2) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsBatchNormForInference

type NodeInputsBatchNormForInference struct {
	Operand     *NodeImpl
	Scale       *NodeImpl
	Offset      *NodeImpl
	Mean        *NodeImpl
	Variance    *NodeImpl
	Epsilon     float32
	FeatureAxis int
}

NodeInputsBatchNormForInference holds the inputs used for the call to compute.BatchNormForInference.

func (*NodeInputsBatchNormForInference) CloneWithInputs

func (ni *NodeInputsBatchNormForInference) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsBatchNormForInference) String

String implements the interface NodeInputs.

func (*NodeInputsBatchNormForInference) Type

Type implements the interface NodeInputs.

type NodeInputsBatchNormForTraining

type NodeInputsBatchNormForTraining struct {
	Operand     *NodeImpl
	Scale       *NodeImpl
	Offset      *NodeImpl
	Epsilon     float32
	FeatureAxis int
}

NodeInputsBatchNormForTraining holds the inputs used for the call to compute.BatchNormForTraining.

func (*NodeInputsBatchNormForTraining) CloneWithInputs

func (ni *NodeInputsBatchNormForTraining) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsBatchNormForTraining) String

String implements the interface NodeInputs.

func (*NodeInputsBatchNormForTraining) Type

Type implements the interface NodeInputs.

type NodeInputsBatchNormGradient

type NodeInputsBatchNormGradient struct {
	Operand     *NodeImpl
	Scale       *NodeImpl
	Mean        *NodeImpl
	Variance    *NodeImpl
	GradOutput  *NodeImpl
	Epsilon     float32
	FeatureAxis int
}

NodeInputsBatchNormGradient holds the inputs used for the call to compute.BatchNormGradient.

func (*NodeInputsBatchNormGradient) CloneWithInputs

func (ni *NodeInputsBatchNormGradient) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsBatchNormGradient) String

func (ni *NodeInputsBatchNormGradient) String() string

String implements the interface NodeInputs.

func (*NodeInputsBatchNormGradient) Type

Type implements the interface NodeInputs.

type NodeInputsBitCount

type NodeInputsBitCount struct {
	Operand *NodeImpl
}

NodeInputsBitCount holds the inputs used for the call to compute.BitCount.

func (*NodeInputsBitCount) CloneWithInputs

func (ni *NodeInputsBitCount) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsBitCount) String

func (ni *NodeInputsBitCount) String() string

String implements the interface NodeInputs.

func (*NodeInputsBitCount) Type

func (ni *NodeInputsBitCount) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsBitcast

type NodeInputsBitcast struct {
	Operand     *NodeImpl
	TargetDType dtypes.DType
}

NodeInputsBitcast holds the inputs used for the call to compute.Bitcast.

func (*NodeInputsBitcast) CloneWithInputs

func (ni *NodeInputsBitcast) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsBitcast) String

func (ni *NodeInputsBitcast) String() string

String implements the interface NodeInputs.

func (*NodeInputsBitcast) Type

func (ni *NodeInputsBitcast) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsBitwiseAnd

type NodeInputsBitwiseAnd struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsBitwiseAnd holds the inputs used for the call to compute.BitwiseAnd.

func (*NodeInputsBitwiseAnd) CloneWithInputs

func (ni *NodeInputsBitwiseAnd) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsBitwiseAnd) String

func (ni *NodeInputsBitwiseAnd) String() string

String implements the interface NodeInputs.

func (*NodeInputsBitwiseAnd) Type

func (ni *NodeInputsBitwiseAnd) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsBitwiseNot

type NodeInputsBitwiseNot struct {
	X *NodeImpl
}

NodeInputsBitwiseNot holds the inputs used for the call to compute.BitwiseNot.

func (*NodeInputsBitwiseNot) CloneWithInputs

func (ni *NodeInputsBitwiseNot) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsBitwiseNot) String

func (ni *NodeInputsBitwiseNot) String() string

String implements the interface NodeInputs.

func (*NodeInputsBitwiseNot) Type

func (ni *NodeInputsBitwiseNot) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsBitwiseOr

type NodeInputsBitwiseOr struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsBitwiseOr holds the inputs used for the call to compute.BitwiseOr.

func (*NodeInputsBitwiseOr) CloneWithInputs

func (ni *NodeInputsBitwiseOr) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsBitwiseOr) String

func (ni *NodeInputsBitwiseOr) String() string

String implements the interface NodeInputs.

func (*NodeInputsBitwiseOr) Type

func (ni *NodeInputsBitwiseOr) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsBitwiseXor

type NodeInputsBitwiseXor struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsBitwiseXor holds the inputs used for the call to compute.BitwiseXor.

func (*NodeInputsBitwiseXor) CloneWithInputs

func (ni *NodeInputsBitwiseXor) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsBitwiseXor) String

func (ni *NodeInputsBitwiseXor) String() string

String implements the interface NodeInputs.

func (*NodeInputsBitwiseXor) Type

func (ni *NodeInputsBitwiseXor) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsBroadcastInDim

type NodeInputsBroadcastInDim struct {
	Operand       *NodeImpl
	OutputShape   shapes.Shape
	BroadcastAxes []int
}

NodeInputsBroadcastInDim holds the inputs used for the call to compute.BroadcastInDim.

func (*NodeInputsBroadcastInDim) CloneWithInputs

func (ni *NodeInputsBroadcastInDim) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsBroadcastInDim) String

func (ni *NodeInputsBroadcastInDim) String() string

String implements the interface NodeInputs.

func (*NodeInputsBroadcastInDim) Type

Type implements the interface NodeInputs.

type NodeInputsCall

type NodeInputsCall struct {
	F      *FunctionImpl
	Inputs []*NodeImpl
}

NodeInputsCall holds the inputs for compute.Function.Call.

func (*NodeInputsCall) CloneWithInputs

func (ni *NodeInputsCall) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

func (*NodeInputsCall) String

func (ni *NodeInputsCall) String() string

func (*NodeInputsCall) Type

func (ni *NodeInputsCall) Type() NodeType

type NodeInputsCeil

type NodeInputsCeil struct {
	X *NodeImpl
}

NodeInputsCeil holds the inputs used for the call to compute.Ceil.

func (*NodeInputsCeil) CloneWithInputs

func (ni *NodeInputsCeil) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsCeil) String

func (ni *NodeInputsCeil) String() string

String implements the interface NodeInputs.

func (*NodeInputsCeil) Type

func (ni *NodeInputsCeil) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsClamp

type NodeInputsClamp struct {
	Min *NodeImpl
	X   *NodeImpl
	Max *NodeImpl
}

NodeInputsClamp holds the inputs used for the call to compute.Clamp.

func (*NodeInputsClamp) CloneWithInputs

func (ni *NodeInputsClamp) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsClamp) String

func (ni *NodeInputsClamp) String() string

String implements the interface NodeInputs.

func (*NodeInputsClamp) Type

func (ni *NodeInputsClamp) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsClz

type NodeInputsClz struct {
	X *NodeImpl
}

NodeInputsClz holds the inputs used for the call to compute.Clz.

func (*NodeInputsClz) CloneWithInputs

func (ni *NodeInputsClz) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsClz) String

func (ni *NodeInputsClz) String() string

String implements the interface NodeInputs.

func (*NodeInputsClz) Type

func (ni *NodeInputsClz) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsComplex

type NodeInputsComplex struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsComplex holds the inputs used for the call to compute.Complex.

func (*NodeInputsComplex) CloneWithInputs

func (ni *NodeInputsComplex) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsComplex) String

func (ni *NodeInputsComplex) String() string

String implements the interface NodeInputs.

func (*NodeInputsComplex) Type

func (ni *NodeInputsComplex) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsConcatenate

type NodeInputsConcatenate struct {
	Axis     int
	Operands []*NodeImpl
}

NodeInputsConcatenate holds the inputs used for the call to compute.Concatenate.

func (*NodeInputsConcatenate) CloneWithInputs

func (ni *NodeInputsConcatenate) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsConcatenate) String

func (ni *NodeInputsConcatenate) String() string

String implements the interface NodeInputs.

func (*NodeInputsConcatenate) Type

func (ni *NodeInputsConcatenate) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsConj

type NodeInputsConj struct {
	X *NodeImpl
}

NodeInputsConj holds the inputs used for the call to compute.Conj.

func (*NodeInputsConj) CloneWithInputs

func (ni *NodeInputsConj) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsConj) String

func (ni *NodeInputsConj) String() string

String implements the interface NodeInputs.

func (*NodeInputsConj) Type

func (ni *NodeInputsConj) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsConstant

type NodeInputsConstant struct {
	Shape  shapes.Shape
	Tensor *tensors.Tensor
}

NodeInputsConstant holds the inputs for a constant node.

func (*NodeInputsConstant) CloneWithInputs

func (ni *NodeInputsConstant) CloneWithInputs(originalNode *NodeImpl, _ ...*NodeImpl) *NodeImpl

func (*NodeInputsConstant) String

func (ni *NodeInputsConstant) String() string

func (*NodeInputsConstant) Type

func (ni *NodeInputsConstant) Type() NodeType

type NodeInputsConvGeneral

type NodeInputsConvGeneral struct {
	Input             *NodeImpl
	Kernel            *NodeImpl
	Axes              compute.ConvolveAxesConfig
	Strides           []int
	Paddings          [][2]int
	InputDilations    []int
	KernelDilations   []int
	ChannelGroupCount int
	BatchGroupCount   int
}

NodeInputsConvGeneral holds the inputs used for the call to compute.ConvGeneral.

func (*NodeInputsConvGeneral) CloneWithInputs

func (ni *NodeInputsConvGeneral) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsConvGeneral) String

func (ni *NodeInputsConvGeneral) String() string

String implements the interface NodeInputs.

func (*NodeInputsConvGeneral) Type

func (ni *NodeInputsConvGeneral) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsConvertDType

type NodeInputsConvertDType struct {
	X     *NodeImpl
	Dtype dtypes.DType
}

NodeInputsConvertDType holds the inputs used for the call to compute.ConvertDType.

func (*NodeInputsConvertDType) CloneWithInputs

func (ni *NodeInputsConvertDType) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsConvertDType) String

func (ni *NodeInputsConvertDType) String() string

String implements the interface NodeInputs.

func (*NodeInputsConvertDType) Type

func (ni *NodeInputsConvertDType) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsCos

type NodeInputsCos struct {
	X *NodeImpl
}

NodeInputsCos holds the inputs used for the call to compute.Cos.

func (*NodeInputsCos) CloneWithInputs

func (ni *NodeInputsCos) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsCos) String

func (ni *NodeInputsCos) String() string

String implements the interface NodeInputs.

func (*NodeInputsCos) Type

func (ni *NodeInputsCos) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsCumMax

type NodeInputsCumMax struct {
	Operand *NodeImpl
	Axis    int
	Options compute.CumSumOptions
}

NodeInputsCumMax holds the inputs used for the call to compute.CumMax.

func (*NodeInputsCumMax) CloneWithInputs

func (ni *NodeInputsCumMax) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsCumMax) String

func (ni *NodeInputsCumMax) String() string

String implements the interface NodeInputs.

func (*NodeInputsCumMax) Type

func (ni *NodeInputsCumMax) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsCumSum

type NodeInputsCumSum struct {
	Operand *NodeImpl
	Axis    int
	Options compute.CumSumOptions
}

NodeInputsCumSum holds the inputs used for the call to compute.CumSum.

func (*NodeInputsCumSum) CloneWithInputs

func (ni *NodeInputsCumSum) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsCumSum) String

func (ni *NodeInputsCumSum) String() string

String implements the interface NodeInputs.

func (*NodeInputsCumSum) Type

func (ni *NodeInputsCumSum) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsDiv

type NodeInputsDiv struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsDiv holds the inputs used for the call to compute.Div.

func (*NodeInputsDiv) CloneWithInputs

func (ni *NodeInputsDiv) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsDiv) String

func (ni *NodeInputsDiv) String() string

String implements the interface NodeInputs.

func (*NodeInputsDiv) Type

func (ni *NodeInputsDiv) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsDotGeneral

type NodeInputsDotGeneral struct {
	Lhs                *NodeImpl
	LhsContractingAxes []int
	LhsBatchAxes       []int
	Rhs                *NodeImpl
	RhsContractingAxes []int
	RhsBatchAxes       []int
	Config             compute.DotGeneralConfig
}

NodeInputsDotGeneral holds the inputs used for the call to compute.DotGeneral.

func (*NodeInputsDotGeneral) CloneWithInputs

func (ni *NodeInputsDotGeneral) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsDotGeneral) String

func (ni *NodeInputsDotGeneral) String() string

String implements the interface NodeInputs.

func (*NodeInputsDotGeneral) Type

func (ni *NodeInputsDotGeneral) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsDynamicBroadcastInDim

type NodeInputsDynamicBroadcastInDim struct {
	Operand       *NodeImpl
	BroadcastAxes []int
	Dimensions    []compute.DynamicDimensionSpec
}

NodeInputsDynamicBroadcastInDim holds the inputs used for the call to compute.DynamicBroadcastInDim.

func (*NodeInputsDynamicBroadcastInDim) CloneWithInputs

func (ni *NodeInputsDynamicBroadcastInDim) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsDynamicBroadcastInDim) String

String implements the interface NodeInputs.

func (*NodeInputsDynamicBroadcastInDim) Type

Type implements the interface NodeInputs.

type NodeInputsDynamicDimensionSize

type NodeInputsDynamicDimensionSize struct {
	Operand *NodeImpl
	Axis    int
}

NodeInputsDynamicDimensionSize holds the inputs used for the call to compute.DynamicDimensionSize.

func (*NodeInputsDynamicDimensionSize) CloneWithInputs

func (ni *NodeInputsDynamicDimensionSize) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsDynamicDimensionSize) String

String implements the interface NodeInputs.

func (*NodeInputsDynamicDimensionSize) Type

Type implements the interface NodeInputs.

type NodeInputsDynamicIota

type NodeInputsDynamicIota struct {
	Dtype      dtypes.DType
	IotaAxis   int
	Dimensions []compute.DynamicDimensionSpec
}

NodeInputsDynamicIota holds the inputs used for the call to compute.DynamicIota.

func (*NodeInputsDynamicIota) CloneWithInputs

func (ni *NodeInputsDynamicIota) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsDynamicIota) String

func (ni *NodeInputsDynamicIota) String() string

String implements the interface NodeInputs.

func (*NodeInputsDynamicIota) Type

func (ni *NodeInputsDynamicIota) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsDynamicPad

type NodeInputsDynamicPad struct {
	X          *NodeImpl
	FillValue  *NodeImpl
	AxesConfig []compute.DynamicPadAxis
}

NodeInputsDynamicPad holds the inputs used for the call to compute.DynamicPad.

func (*NodeInputsDynamicPad) CloneWithInputs

func (ni *NodeInputsDynamicPad) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsDynamicPad) String

func (ni *NodeInputsDynamicPad) String() string

String implements the interface NodeInputs.

func (*NodeInputsDynamicPad) Type

func (ni *NodeInputsDynamicPad) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsDynamicReshape

type NodeInputsDynamicReshape struct {
	Operand    *NodeImpl
	Dimensions []compute.DynamicDimensionSpec
}

NodeInputsDynamicReshape holds the inputs used for the call to compute.DynamicReshape.

func (*NodeInputsDynamicReshape) CloneWithInputs

func (ni *NodeInputsDynamicReshape) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsDynamicReshape) String

func (ni *NodeInputsDynamicReshape) String() string

String implements the interface NodeInputs.

func (*NodeInputsDynamicReshape) Type

Type implements the interface NodeInputs.

type NodeInputsDynamicShape

type NodeInputsDynamicShape struct {
	Operand *NodeImpl
}

NodeInputsDynamicShape holds the inputs used for the call to compute.DynamicShape.

func (*NodeInputsDynamicShape) CloneWithInputs

func (ni *NodeInputsDynamicShape) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsDynamicShape) String

func (ni *NodeInputsDynamicShape) String() string

String implements the interface NodeInputs.

func (*NodeInputsDynamicShape) Type

func (ni *NodeInputsDynamicShape) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsDynamicSlice

type NodeInputsDynamicSlice struct {
	Operand      *NodeImpl
	StartIndices []*NodeImpl
	SliceDims    []int
}

NodeInputsDynamicSlice holds the inputs used for the call to compute.DynamicSlice.

func (*NodeInputsDynamicSlice) CloneWithInputs

func (ni *NodeInputsDynamicSlice) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsDynamicSlice) String

func (ni *NodeInputsDynamicSlice) String() string

String implements the interface NodeInputs.

func (*NodeInputsDynamicSlice) Type

func (ni *NodeInputsDynamicSlice) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsDynamicUpdateSlice

type NodeInputsDynamicUpdateSlice struct {
	Operand      *NodeImpl
	Update       *NodeImpl
	StartIndices []*NodeImpl
}

NodeInputsDynamicUpdateSlice holds the inputs used for the call to compute.DynamicUpdateSlice.

func (*NodeInputsDynamicUpdateSlice) CloneWithInputs

func (ni *NodeInputsDynamicUpdateSlice) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsDynamicUpdateSlice) String

func (ni *NodeInputsDynamicUpdateSlice) String() string

String implements the interface NodeInputs.

func (*NodeInputsDynamicUpdateSlice) Type

Type implements the interface NodeInputs.

type NodeInputsEqual

type NodeInputsEqual struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsEqual holds the inputs used for the call to compute.Equal.

func (*NodeInputsEqual) CloneWithInputs

func (ni *NodeInputsEqual) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsEqual) String

func (ni *NodeInputsEqual) String() string

String implements the interface NodeInputs.

func (*NodeInputsEqual) Type

func (ni *NodeInputsEqual) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsEqualTotalOrder

type NodeInputsEqualTotalOrder struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsEqualTotalOrder holds the inputs used for the call to compute.EqualTotalOrder.

func (*NodeInputsEqualTotalOrder) CloneWithInputs

func (ni *NodeInputsEqualTotalOrder) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsEqualTotalOrder) String

func (ni *NodeInputsEqualTotalOrder) String() string

String implements the interface NodeInputs.

func (*NodeInputsEqualTotalOrder) Type

Type implements the interface NodeInputs.

type NodeInputsErf

type NodeInputsErf struct {
	X *NodeImpl
}

NodeInputsErf holds the inputs used for the call to compute.Erf.

func (*NodeInputsErf) CloneWithInputs

func (ni *NodeInputsErf) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsErf) String

func (ni *NodeInputsErf) String() string

String implements the interface NodeInputs.

func (*NodeInputsErf) Type

func (ni *NodeInputsErf) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsExp

type NodeInputsExp struct {
	X *NodeImpl
}

NodeInputsExp holds the inputs used for the call to compute.Exp.

func (*NodeInputsExp) CloneWithInputs

func (ni *NodeInputsExp) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsExp) String

func (ni *NodeInputsExp) String() string

String implements the interface NodeInputs.

func (*NodeInputsExp) Type

func (ni *NodeInputsExp) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsExpm1

type NodeInputsExpm1 struct {
	X *NodeImpl
}

NodeInputsExpm1 holds the inputs used for the call to compute.Expm1.

func (*NodeInputsExpm1) CloneWithInputs

func (ni *NodeInputsExpm1) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsExpm1) String

func (ni *NodeInputsExpm1) String() string

String implements the interface NodeInputs.

func (*NodeInputsExpm1) Type

func (ni *NodeInputsExpm1) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsFFT

type NodeInputsFFT struct {
	Operand   *NodeImpl
	FftType   compute.FFTType
	FftLength []int
}

NodeInputsFFT holds the inputs used for the call to compute.FFT.

func (*NodeInputsFFT) CloneWithInputs

func (ni *NodeInputsFFT) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsFFT) String

func (ni *NodeInputsFFT) String() string

String implements the interface NodeInputs.

func (*NodeInputsFFT) Type

func (ni *NodeInputsFFT) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsFloor

type NodeInputsFloor struct {
	X *NodeImpl
}

NodeInputsFloor holds the inputs used for the call to compute.Floor.

func (*NodeInputsFloor) CloneWithInputs

func (ni *NodeInputsFloor) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsFloor) String

func (ni *NodeInputsFloor) String() string

String implements the interface NodeInputs.

func (*NodeInputsFloor) Type

func (ni *NodeInputsFloor) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsFusedActivation

type NodeInputsFusedActivation struct {
	X   *NodeImpl
	Cfg compute.ActivationConfig
}

NodeInputsFusedActivation holds the inputs used for the call to compute.FusedActivation.

func (*NodeInputsFusedActivation) CloneWithInputs

func (ni *NodeInputsFusedActivation) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsFusedActivation) String

func (ni *NodeInputsFusedActivation) String() string

String implements the interface NodeInputs.

func (*NodeInputsFusedActivation) Type

Type implements the interface NodeInputs.

type NodeInputsFusedActivationVJP

type NodeInputsFusedActivationVJP struct {
	Y       *NodeImpl
	X       *NodeImpl
	DOutput *NodeImpl
	Cfg     compute.ActivationConfig
}

NodeInputsFusedActivationVJP holds the inputs used for the call to compute.FusedActivationVJP.

func (*NodeInputsFusedActivationVJP) CloneWithInputs

func (ni *NodeInputsFusedActivationVJP) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsFusedActivationVJP) String

func (ni *NodeInputsFusedActivationVJP) String() string

String implements the interface NodeInputs.

func (*NodeInputsFusedActivationVJP) Type

Type implements the interface NodeInputs.

type NodeInputsFusedAttentionQKVProjection

type NodeInputsFusedAttentionQKVProjection struct {
	X           *NodeImpl
	WQKV        *NodeImpl
	BiasQ       *NodeImpl
	BiasK       *NodeImpl
	BiasV       *NodeImpl
	QueryDim    int
	KeyValueDim int
}

NodeInputsFusedAttentionQKVProjection holds the inputs used for the call to compute.FusedAttentionQKVProjection.

func (*NodeInputsFusedAttentionQKVProjection) CloneWithInputs

func (ni *NodeInputsFusedAttentionQKVProjection) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsFusedAttentionQKVProjection) String

String implements the interface NodeInputs.

func (*NodeInputsFusedAttentionQKVProjection) Type

Type implements the interface NodeInputs.

type NodeInputsFusedDense

type NodeInputsFusedDense struct {
	X       *NodeImpl
	Weight  *NodeImpl
	Bias    *NodeImpl
	Options compute.DenseConfig
}

NodeInputsFusedDense holds the inputs used for the call to compute.FusedDense.

func (*NodeInputsFusedDense) CloneWithInputs

func (ni *NodeInputsFusedDense) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsFusedDense) String

func (ni *NodeInputsFusedDense) String() string

String implements the interface NodeInputs.

func (*NodeInputsFusedDense) Type

func (ni *NodeInputsFusedDense) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsFusedDenseVJP

type NodeInputsFusedDenseVJP struct {
	X       *NodeImpl
	Weight  *NodeImpl
	Bias    *NodeImpl
	Y       *NodeImpl
	DOutput *NodeImpl
	Options compute.DenseConfig
}

NodeInputsFusedDenseVJP holds the inputs for compute.FusedDenseVJP.

func (*NodeInputsFusedDenseVJP) CloneWithInputs

func (ni *NodeInputsFusedDenseVJP) CloneWithInputs(_ *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

func (*NodeInputsFusedDenseVJP) String

func (ni *NodeInputsFusedDenseVJP) String() string

func (*NodeInputsFusedDenseVJP) Type

func (ni *NodeInputsFusedDenseVJP) Type() NodeType

type NodeInputsFusedLayerNorm

type NodeInputsFusedLayerNorm struct {
	X       *NodeImpl
	Axes    []int
	Epsilon float64
	Gamma   *NodeImpl
	Beta    *NodeImpl
}

NodeInputsFusedLayerNorm holds the inputs used for the call to compute.FusedLayerNorm.

func (*NodeInputsFusedLayerNorm) CloneWithInputs

func (ni *NodeInputsFusedLayerNorm) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsFusedLayerNorm) String

func (ni *NodeInputsFusedLayerNorm) String() string

String implements the interface NodeInputs.

func (*NodeInputsFusedLayerNorm) Type

Type implements the interface NodeInputs.

type NodeInputsFusedLayerNormVJP

type NodeInputsFusedLayerNormVJP struct {
	X       *NodeImpl
	DOutput *NodeImpl
	Axes    []int
	Epsilon float64
	Gamma   *NodeImpl
	Beta    *NodeImpl
}

NodeInputsFusedLayerNormVJP holds the inputs for compute.FusedLayerNormVJP.

func (*NodeInputsFusedLayerNormVJP) CloneWithInputs

func (ni *NodeInputsFusedLayerNormVJP) CloneWithInputs(_ *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

func (*NodeInputsFusedLayerNormVJP) String

func (ni *NodeInputsFusedLayerNormVJP) String() string

func (*NodeInputsFusedLayerNormVJP) Type

type NodeInputsFusedQuantizedDense

type NodeInputsFusedQuantizedDense struct {
	X      *NodeImpl
	Weight *NodeImpl
	Bias   *NodeImpl
	Cfg    QuantizedDenseConfig
}

NodeInputsFusedQuantizedDense holds the inputs for compute.FusedQuantizedDense.

func (*NodeInputsFusedQuantizedDense) CloneWithInputs

func (ni *NodeInputsFusedQuantizedDense) CloneWithInputs(_ *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

func (*NodeInputsFusedQuantizedDense) String

func (*NodeInputsFusedQuantizedDense) Type

type NodeInputsFusedQuantizedDenseVJP

type NodeInputsFusedQuantizedDenseVJP struct {
	X       *NodeImpl
	Weight  *NodeImpl
	Bias    *NodeImpl
	Y       *NodeImpl
	DOutput *NodeImpl
	Cfg     QuantizedDenseConfig
}

NodeInputsFusedQuantizedDenseVJP holds the inputs for compute.FusedQuantizedDenseVJP.

func (*NodeInputsFusedQuantizedDenseVJP) CloneWithInputs

func (ni *NodeInputsFusedQuantizedDenseVJP) CloneWithInputs(_ *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

func (*NodeInputsFusedQuantizedDenseVJP) String

func (*NodeInputsFusedQuantizedDenseVJP) Type

type NodeInputsFusedScaledDotProductAttention

type NodeInputsFusedScaledDotProductAttention struct {
	Query      *NodeImpl
	Key        *NodeImpl
	Value      *NodeImpl
	AxesLayout compute.AttentionAxesLayout
	Options    *compute.ScaledDotProductAttentionConfig
}

NodeInputsFusedScaledDotProductAttention holds the inputs used for the call to compute.FusedScaledDotProductAttention.

func (*NodeInputsFusedScaledDotProductAttention) CloneWithInputs

func (ni *NodeInputsFusedScaledDotProductAttention) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsFusedScaledDotProductAttention) String

String implements the interface NodeInputs.

func (*NodeInputsFusedScaledDotProductAttention) Type

Type implements the interface NodeInputs.

type NodeInputsFusedScaledDotProductAttentionVJP

type NodeInputsFusedScaledDotProductAttentionVJP struct {
	Query        *NodeImpl
	Key          *NodeImpl
	Value        *NodeImpl
	AxesLayout   compute.AttentionAxesLayout
	Options      *compute.ScaledDotProductAttentionConfig
	Output       *NodeImpl
	StatesForVJP []*NodeImpl
	DOutput      *NodeImpl
}

NodeInputsFusedScaledDotProductAttentionVJP holds the inputs used for the call to compute.FusedScaledDotProductAttentionVJP.

func (*NodeInputsFusedScaledDotProductAttentionVJP) CloneWithInputs

func (ni *NodeInputsFusedScaledDotProductAttentionVJP) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsFusedScaledDotProductAttentionVJP) String

String implements the interface NodeInputs.

func (*NodeInputsFusedScaledDotProductAttentionVJP) Type

Type implements the interface NodeInputs.

type NodeInputsFusedSoftmax

type NodeInputsFusedSoftmax struct {
	X    *NodeImpl
	Axis int
}

NodeInputsFusedSoftmax holds the inputs used for the call to compute.FusedSoftmax.

func (*NodeInputsFusedSoftmax) CloneWithInputs

func (ni *NodeInputsFusedSoftmax) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsFusedSoftmax) String

func (ni *NodeInputsFusedSoftmax) String() string

String implements the interface NodeInputs.

func (*NodeInputsFusedSoftmax) Type

func (ni *NodeInputsFusedSoftmax) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsFusedTopK

type NodeInputsFusedTopK struct {
	Operand *NodeImpl
	K       int
	Cfg     compute.FusedTopKConfig
}

NodeInputsFusedTopK holds the inputs used for the call to compute.FusedTopK.

func (*NodeInputsFusedTopK) CloneWithInputs

func (ni *NodeInputsFusedTopK) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsFusedTopK) String

func (ni *NodeInputsFusedTopK) String() string

String implements the interface NodeInputs.

func (*NodeInputsFusedTopK) Type

func (ni *NodeInputsFusedTopK) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsGather

type NodeInputsGather struct {
	Operand            *NodeImpl
	StartIndices       *NodeImpl
	IndexVectorAxis    int
	OffsetOutputAxes   []int
	CollapsedSliceAxes []int
	StartIndexMap      []int
	SliceSizes         []int
	IndicesAreSorted   bool
}

NodeInputsGather holds the inputs used for the call to compute.Gather.

func (*NodeInputsGather) CloneWithInputs

func (ni *NodeInputsGather) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsGather) String

func (ni *NodeInputsGather) String() string

String implements the interface NodeInputs.

func (*NodeInputsGather) Type

func (ni *NodeInputsGather) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsGreaterOrEqual

type NodeInputsGreaterOrEqual struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsGreaterOrEqual holds the inputs used for the call to compute.GreaterOrEqual.

func (*NodeInputsGreaterOrEqual) CloneWithInputs

func (ni *NodeInputsGreaterOrEqual) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsGreaterOrEqual) String

func (ni *NodeInputsGreaterOrEqual) String() string

String implements the interface NodeInputs.

func (*NodeInputsGreaterOrEqual) Type

Type implements the interface NodeInputs.

type NodeInputsGreaterOrEqualTotalOrder

type NodeInputsGreaterOrEqualTotalOrder struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsGreaterOrEqualTotalOrder holds the inputs used for the call to compute.GreaterOrEqualTotalOrder.

func (*NodeInputsGreaterOrEqualTotalOrder) CloneWithInputs

func (ni *NodeInputsGreaterOrEqualTotalOrder) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsGreaterOrEqualTotalOrder) String

String implements the interface NodeInputs.

func (*NodeInputsGreaterOrEqualTotalOrder) Type

Type implements the interface NodeInputs.

type NodeInputsGreaterThan

type NodeInputsGreaterThan struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsGreaterThan holds the inputs used for the call to compute.GreaterThan.

func (*NodeInputsGreaterThan) CloneWithInputs

func (ni *NodeInputsGreaterThan) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsGreaterThan) String

func (ni *NodeInputsGreaterThan) String() string

String implements the interface NodeInputs.

func (*NodeInputsGreaterThan) Type

func (ni *NodeInputsGreaterThan) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsGreaterThanTotalOrder

type NodeInputsGreaterThanTotalOrder struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsGreaterThanTotalOrder holds the inputs used for the call to compute.GreaterThanTotalOrder.

func (*NodeInputsGreaterThanTotalOrder) CloneWithInputs

func (ni *NodeInputsGreaterThanTotalOrder) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsGreaterThanTotalOrder) String

String implements the interface NodeInputs.

func (*NodeInputsGreaterThanTotalOrder) Type

Type implements the interface NodeInputs.

type NodeInputsIdentity

type NodeInputsIdentity struct {
	X *NodeImpl
}

NodeInputsIdentity holds the inputs used for the call to compute.Identity.

func (*NodeInputsIdentity) CloneWithInputs

func (ni *NodeInputsIdentity) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsIdentity) String

func (ni *NodeInputsIdentity) String() string

String implements the interface NodeInputs.

func (*NodeInputsIdentity) Type

func (ni *NodeInputsIdentity) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsIf

type NodeInputsIf struct {
	Pred        *NodeImpl
	TrueBranch  *FunctionImpl
	FalseBranch *FunctionImpl
}

NodeInputsIf holds the inputs for an If operation.

func (*NodeInputsIf) CloneWithInputs

func (ni *NodeInputsIf) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

func (*NodeInputsIf) String

func (ni *NodeInputsIf) String() string

func (*NodeInputsIf) Type

func (ni *NodeInputsIf) Type() NodeType

type NodeInputsImag

type NodeInputsImag struct {
	X *NodeImpl
}

NodeInputsImag holds the inputs used for the call to compute.Imag.

func (*NodeInputsImag) CloneWithInputs

func (ni *NodeInputsImag) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsImag) String

func (ni *NodeInputsImag) String() string

String implements the interface NodeInputs.

func (*NodeInputsImag) Type

func (ni *NodeInputsImag) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsIota

type NodeInputsIota struct {
	Shape    shapes.Shape
	IotaAxis int
}

NodeInputsIota holds the inputs used for the call to compute.Iota.

func (*NodeInputsIota) CloneWithInputs

func (ni *NodeInputsIota) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsIota) String

func (ni *NodeInputsIota) String() string

String implements the interface NodeInputs.

func (*NodeInputsIota) Type

func (ni *NodeInputsIota) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsIsFinite

type NodeInputsIsFinite struct {
	X *NodeImpl
}

NodeInputsIsFinite holds the inputs used for the call to compute.IsFinite.

func (*NodeInputsIsFinite) CloneWithInputs

func (ni *NodeInputsIsFinite) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsIsFinite) String

func (ni *NodeInputsIsFinite) String() string

String implements the interface NodeInputs.

func (*NodeInputsIsFinite) Type

func (ni *NodeInputsIsFinite) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsIsNaN

type NodeInputsIsNaN struct {
	X *NodeImpl
}

NodeInputsIsNaN holds the inputs used for the call to compute.IsNaN.

func (*NodeInputsIsNaN) CloneWithInputs

func (ni *NodeInputsIsNaN) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsIsNaN) String

func (ni *NodeInputsIsNaN) String() string

String implements the interface NodeInputs.

func (*NodeInputsIsNaN) Type

func (ni *NodeInputsIsNaN) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsLessOrEqual

type NodeInputsLessOrEqual struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsLessOrEqual holds the inputs used for the call to compute.LessOrEqual.

func (*NodeInputsLessOrEqual) CloneWithInputs

func (ni *NodeInputsLessOrEqual) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsLessOrEqual) String

func (ni *NodeInputsLessOrEqual) String() string

String implements the interface NodeInputs.

func (*NodeInputsLessOrEqual) Type

func (ni *NodeInputsLessOrEqual) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsLessOrEqualTotalOrder

type NodeInputsLessOrEqualTotalOrder struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsLessOrEqualTotalOrder holds the inputs used for the call to compute.LessOrEqualTotalOrder.

func (*NodeInputsLessOrEqualTotalOrder) CloneWithInputs

func (ni *NodeInputsLessOrEqualTotalOrder) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsLessOrEqualTotalOrder) String

String implements the interface NodeInputs.

func (*NodeInputsLessOrEqualTotalOrder) Type

Type implements the interface NodeInputs.

type NodeInputsLessThan

type NodeInputsLessThan struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsLessThan holds the inputs used for the call to compute.LessThan.

func (*NodeInputsLessThan) CloneWithInputs

func (ni *NodeInputsLessThan) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsLessThan) String

func (ni *NodeInputsLessThan) String() string

String implements the interface NodeInputs.

func (*NodeInputsLessThan) Type

func (ni *NodeInputsLessThan) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsLessThanTotalOrder

type NodeInputsLessThanTotalOrder struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsLessThanTotalOrder holds the inputs used for the call to compute.LessThanTotalOrder.

func (*NodeInputsLessThanTotalOrder) CloneWithInputs

func (ni *NodeInputsLessThanTotalOrder) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsLessThanTotalOrder) String

func (ni *NodeInputsLessThanTotalOrder) String() string

String implements the interface NodeInputs.

func (*NodeInputsLessThanTotalOrder) Type

Type implements the interface NodeInputs.

type NodeInputsLog

type NodeInputsLog struct {
	X *NodeImpl
}

NodeInputsLog holds the inputs used for the call to compute.Log.

func (*NodeInputsLog) CloneWithInputs

func (ni *NodeInputsLog) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsLog) String

func (ni *NodeInputsLog) String() string

String implements the interface NodeInputs.

func (*NodeInputsLog) Type

func (ni *NodeInputsLog) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsLog1p

type NodeInputsLog1p struct {
	X *NodeImpl
}

NodeInputsLog1p holds the inputs used for the call to compute.Log1p.

func (*NodeInputsLog1p) CloneWithInputs

func (ni *NodeInputsLog1p) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsLog1p) String

func (ni *NodeInputsLog1p) String() string

String implements the interface NodeInputs.

func (*NodeInputsLog1p) Type

func (ni *NodeInputsLog1p) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsLogicalAnd

type NodeInputsLogicalAnd struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsLogicalAnd holds the inputs used for the call to compute.LogicalAnd.

func (*NodeInputsLogicalAnd) CloneWithInputs

func (ni *NodeInputsLogicalAnd) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsLogicalAnd) String

func (ni *NodeInputsLogicalAnd) String() string

String implements the interface NodeInputs.

func (*NodeInputsLogicalAnd) Type

func (ni *NodeInputsLogicalAnd) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsLogicalNot

type NodeInputsLogicalNot struct {
	X *NodeImpl
}

NodeInputsLogicalNot holds the inputs used for the call to compute.LogicalNot.

func (*NodeInputsLogicalNot) CloneWithInputs

func (ni *NodeInputsLogicalNot) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsLogicalNot) String

func (ni *NodeInputsLogicalNot) String() string

String implements the interface NodeInputs.

func (*NodeInputsLogicalNot) Type

func (ni *NodeInputsLogicalNot) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsLogicalOr

type NodeInputsLogicalOr struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsLogicalOr holds the inputs used for the call to compute.LogicalOr.

func (*NodeInputsLogicalOr) CloneWithInputs

func (ni *NodeInputsLogicalOr) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsLogicalOr) String

func (ni *NodeInputsLogicalOr) String() string

String implements the interface NodeInputs.

func (*NodeInputsLogicalOr) Type

func (ni *NodeInputsLogicalOr) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsLogicalXor

type NodeInputsLogicalXor struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsLogicalXor holds the inputs used for the call to compute.LogicalXor.

func (*NodeInputsLogicalXor) CloneWithInputs

func (ni *NodeInputsLogicalXor) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsLogicalXor) String

func (ni *NodeInputsLogicalXor) String() string

String implements the interface NodeInputs.

func (*NodeInputsLogicalXor) Type

func (ni *NodeInputsLogicalXor) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsLogistic

type NodeInputsLogistic struct {
	X *NodeImpl
}

NodeInputsLogistic holds the inputs used for the call to compute.Logistic.

func (*NodeInputsLogistic) CloneWithInputs

func (ni *NodeInputsLogistic) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsLogistic) String

func (ni *NodeInputsLogistic) String() string

String implements the interface NodeInputs.

func (*NodeInputsLogistic) Type

func (ni *NodeInputsLogistic) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsMax

type NodeInputsMax struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsMax holds the inputs used for the call to compute.Max.

func (*NodeInputsMax) CloneWithInputs

func (ni *NodeInputsMax) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsMax) String

func (ni *NodeInputsMax) String() string

String implements the interface NodeInputs.

func (*NodeInputsMax) Type

func (ni *NodeInputsMax) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsMin

type NodeInputsMin struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsMin holds the inputs used for the call to compute.Min.

func (*NodeInputsMin) CloneWithInputs

func (ni *NodeInputsMin) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsMin) String

func (ni *NodeInputsMin) String() string

String implements the interface NodeInputs.

func (*NodeInputsMin) Type

func (ni *NodeInputsMin) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsMul

type NodeInputsMul struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsMul holds the inputs used for the call to compute.Mul.

func (*NodeInputsMul) CloneWithInputs

func (ni *NodeInputsMul) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsMul) String

func (ni *NodeInputsMul) String() string

String implements the interface NodeInputs.

func (*NodeInputsMul) Type

func (ni *NodeInputsMul) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsNeg

type NodeInputsNeg struct {
	X *NodeImpl
}

NodeInputsNeg holds the inputs used for the call to compute.Neg.

func (*NodeInputsNeg) CloneWithInputs

func (ni *NodeInputsNeg) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsNeg) String

func (ni *NodeInputsNeg) String() string

String implements the interface NodeInputs.

func (*NodeInputsNeg) Type

func (ni *NodeInputsNeg) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsNonZero

type NodeInputsNonZero struct {
	Operand *NodeImpl
	Cfg     compute.NonZeroConfig
}

NodeInputsNonZero holds the inputs used for the call to compute.NonZero.

func (*NodeInputsNonZero) CloneWithInputs

func (ni *NodeInputsNonZero) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsNonZero) String

func (ni *NodeInputsNonZero) String() string

String implements the interface NodeInputs.

func (*NodeInputsNonZero) Type

func (ni *NodeInputsNonZero) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsNotEqual

type NodeInputsNotEqual struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsNotEqual holds the inputs used for the call to compute.NotEqual.

func (*NodeInputsNotEqual) CloneWithInputs

func (ni *NodeInputsNotEqual) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsNotEqual) String

func (ni *NodeInputsNotEqual) String() string

String implements the interface NodeInputs.

func (*NodeInputsNotEqual) Type

func (ni *NodeInputsNotEqual) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsNotEqualTotalOrder

type NodeInputsNotEqualTotalOrder struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsNotEqualTotalOrder holds the inputs used for the call to compute.NotEqualTotalOrder.

func (*NodeInputsNotEqualTotalOrder) CloneWithInputs

func (ni *NodeInputsNotEqualTotalOrder) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsNotEqualTotalOrder) String

func (ni *NodeInputsNotEqualTotalOrder) String() string

String implements the interface NodeInputs.

func (*NodeInputsNotEqualTotalOrder) Type

Type implements the interface NodeInputs.

type NodeInputsOptimizationBarrier

type NodeInputsOptimizationBarrier struct {
	Operands []*NodeImpl
}

NodeInputsOptimizationBarrier holds the inputs used for the call to compute.OptimizationBarrier.

func (*NodeInputsOptimizationBarrier) CloneWithInputs

func (ni *NodeInputsOptimizationBarrier) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsOptimizationBarrier) String

String implements the interface NodeInputs.

func (*NodeInputsOptimizationBarrier) Type

Type implements the interface NodeInputs.

type NodeInputsPad

type NodeInputsPad struct {
	X          *NodeImpl
	FillValue  *NodeImpl
	AxesConfig []compute.PadAxis
}

NodeInputsPad holds the inputs used for the call to compute.Pad.

func (*NodeInputsPad) CloneWithInputs

func (ni *NodeInputsPad) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsPad) String

func (ni *NodeInputsPad) String() string

String implements the interface NodeInputs.

func (*NodeInputsPad) Type

func (ni *NodeInputsPad) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsParameter

type NodeInputsParameter struct {
	Name     string
	Shape    shapes.Shape
	Sharding *distributed.ShardingSpec
	Handle   ParameterHandle
}

NodeInputsParameter holds the inputs for compute.Parameter.

func (*NodeInputsParameter) CloneWithInputs

func (ni *NodeInputsParameter) CloneWithInputs(originalNode *NodeImpl, _ ...*NodeImpl) *NodeImpl

func (*NodeInputsParameter) String

func (ni *NodeInputsParameter) String() string

func (*NodeInputsParameter) Type

func (ni *NodeInputsParameter) Type() NodeType

type NodeInputsPow

type NodeInputsPow struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsPow holds the inputs used for the call to compute.Pow.

func (*NodeInputsPow) CloneWithInputs

func (ni *NodeInputsPow) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsPow) String

func (ni *NodeInputsPow) String() string

String implements the interface NodeInputs.

func (*NodeInputsPow) Type

func (ni *NodeInputsPow) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsQuantizedGather

type NodeInputsQuantizedGather struct {
	X       *NodeImpl
	Indices *NodeImpl
	TQ      *Quantization
}

NodeInputsQuantizedGather holds the inputs for compute.QuantizedGather.

func (*NodeInputsQuantizedGather) CloneWithInputs

func (ni *NodeInputsQuantizedGather) CloneWithInputs(_ *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

func (*NodeInputsQuantizedGather) String

func (ni *NodeInputsQuantizedGather) String() string

func (*NodeInputsQuantizedGather) Type

type NodeInputsRNGBitGenerator

type NodeInputsRNGBitGenerator struct {
	State     *NodeImpl
	Shape     shapes.Shape
	Algorithm compute.RNGAlgorithm
}

NodeInputsRNGBitGenerator holds the inputs used for the call to compute.RNGBitGenerator.

func (*NodeInputsRNGBitGenerator) CloneWithInputs

func (ni *NodeInputsRNGBitGenerator) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsRNGBitGenerator) String

func (ni *NodeInputsRNGBitGenerator) String() string

String implements the interface NodeInputs.

func (*NodeInputsRNGBitGenerator) Type

Type implements the interface NodeInputs.

type NodeInputsReal

type NodeInputsReal struct {
	X *NodeImpl
}

NodeInputsReal holds the inputs used for the call to compute.Real.

func (*NodeInputsReal) CloneWithInputs

func (ni *NodeInputsReal) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsReal) String

func (ni *NodeInputsReal) String() string

String implements the interface NodeInputs.

func (*NodeInputsReal) Type

func (ni *NodeInputsReal) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsReduceBitwiseAnd

type NodeInputsReduceBitwiseAnd struct {
	X    *NodeImpl
	Axes []int
}

NodeInputsReduceBitwiseAnd holds the inputs used for the call to compute.ReduceBitwiseAnd.

func (*NodeInputsReduceBitwiseAnd) CloneWithInputs

func (ni *NodeInputsReduceBitwiseAnd) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsReduceBitwiseAnd) String

func (ni *NodeInputsReduceBitwiseAnd) String() string

String implements the interface NodeInputs.

func (*NodeInputsReduceBitwiseAnd) Type

Type implements the interface NodeInputs.

type NodeInputsReduceBitwiseOr

type NodeInputsReduceBitwiseOr struct {
	X    *NodeImpl
	Axes []int
}

NodeInputsReduceBitwiseOr holds the inputs used for the call to compute.ReduceBitwiseOr.

func (*NodeInputsReduceBitwiseOr) CloneWithInputs

func (ni *NodeInputsReduceBitwiseOr) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsReduceBitwiseOr) String

func (ni *NodeInputsReduceBitwiseOr) String() string

String implements the interface NodeInputs.

func (*NodeInputsReduceBitwiseOr) Type

Type implements the interface NodeInputs.

type NodeInputsReduceBitwiseXor

type NodeInputsReduceBitwiseXor struct {
	X    *NodeImpl
	Axes []int
}

NodeInputsReduceBitwiseXor holds the inputs used for the call to compute.ReduceBitwiseXor.

func (*NodeInputsReduceBitwiseXor) CloneWithInputs

func (ni *NodeInputsReduceBitwiseXor) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsReduceBitwiseXor) String

func (ni *NodeInputsReduceBitwiseXor) String() string

String implements the interface NodeInputs.

func (*NodeInputsReduceBitwiseXor) Type

Type implements the interface NodeInputs.

type NodeInputsReduceLogicalAnd

type NodeInputsReduceLogicalAnd struct {
	X    *NodeImpl
	Axes []int
}

NodeInputsReduceLogicalAnd holds the inputs used for the call to compute.ReduceLogicalAnd.

func (*NodeInputsReduceLogicalAnd) CloneWithInputs

func (ni *NodeInputsReduceLogicalAnd) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsReduceLogicalAnd) String

func (ni *NodeInputsReduceLogicalAnd) String() string

String implements the interface NodeInputs.

func (*NodeInputsReduceLogicalAnd) Type

Type implements the interface NodeInputs.

type NodeInputsReduceLogicalOr

type NodeInputsReduceLogicalOr struct {
	X    *NodeImpl
	Axes []int
}

NodeInputsReduceLogicalOr holds the inputs used for the call to compute.ReduceLogicalOr.

func (*NodeInputsReduceLogicalOr) CloneWithInputs

func (ni *NodeInputsReduceLogicalOr) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsReduceLogicalOr) String

func (ni *NodeInputsReduceLogicalOr) String() string

String implements the interface NodeInputs.

func (*NodeInputsReduceLogicalOr) Type

Type implements the interface NodeInputs.

type NodeInputsReduceLogicalXor

type NodeInputsReduceLogicalXor struct {
	X    *NodeImpl
	Axes []int
}

NodeInputsReduceLogicalXor holds the inputs used for the call to compute.ReduceLogicalXor.

func (*NodeInputsReduceLogicalXor) CloneWithInputs

func (ni *NodeInputsReduceLogicalXor) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsReduceLogicalXor) String

func (ni *NodeInputsReduceLogicalXor) String() string

String implements the interface NodeInputs.

func (*NodeInputsReduceLogicalXor) Type

Type implements the interface NodeInputs.

type NodeInputsReduceMax

type NodeInputsReduceMax struct {
	X    *NodeImpl
	Axes []int
}

NodeInputsReduceMax holds the inputs used for the call to compute.ReduceMax.

func (*NodeInputsReduceMax) CloneWithInputs

func (ni *NodeInputsReduceMax) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsReduceMax) String

func (ni *NodeInputsReduceMax) String() string

String implements the interface NodeInputs.

func (*NodeInputsReduceMax) Type

func (ni *NodeInputsReduceMax) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsReduceMin

type NodeInputsReduceMin struct {
	X    *NodeImpl
	Axes []int
}

NodeInputsReduceMin holds the inputs used for the call to compute.ReduceMin.

func (*NodeInputsReduceMin) CloneWithInputs

func (ni *NodeInputsReduceMin) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsReduceMin) String

func (ni *NodeInputsReduceMin) String() string

String implements the interface NodeInputs.

func (*NodeInputsReduceMin) Type

func (ni *NodeInputsReduceMin) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsReduceProduct

type NodeInputsReduceProduct struct {
	X    *NodeImpl
	Axes []int
}

NodeInputsReduceProduct holds the inputs used for the call to compute.ReduceProduct.

func (*NodeInputsReduceProduct) CloneWithInputs

func (ni *NodeInputsReduceProduct) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsReduceProduct) String

func (ni *NodeInputsReduceProduct) String() string

String implements the interface NodeInputs.

func (*NodeInputsReduceProduct) Type

func (ni *NodeInputsReduceProduct) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsReduceSum

type NodeInputsReduceSum struct {
	X    *NodeImpl
	Axes []int
}

NodeInputsReduceSum holds the inputs used for the call to compute.ReduceSum.

func (*NodeInputsReduceSum) CloneWithInputs

func (ni *NodeInputsReduceSum) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsReduceSum) String

func (ni *NodeInputsReduceSum) String() string

String implements the interface NodeInputs.

func (*NodeInputsReduceSum) Type

func (ni *NodeInputsReduceSum) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsReduceWindow

type NodeInputsReduceWindow struct {
	Input            *NodeImpl
	ReductionType    ReduceOpType
	WindowDimensions []int
	Strides          []int
	InputDilations   []int
	WindowDilations  []int
	Paddings         [][2]int
}

NodeInputsReduceWindow holds the inputs used for the call to compute.ReduceWindow.

func (*NodeInputsReduceWindow) CloneWithInputs

func (ni *NodeInputsReduceWindow) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsReduceWindow) String

func (ni *NodeInputsReduceWindow) String() string

String implements the interface NodeInputs.

func (*NodeInputsReduceWindow) Type

func (ni *NodeInputsReduceWindow) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsRem

type NodeInputsRem struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsRem holds the inputs used for the call to compute.Rem.

func (*NodeInputsRem) CloneWithInputs

func (ni *NodeInputsRem) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsRem) String

func (ni *NodeInputsRem) String() string

String implements the interface NodeInputs.

func (*NodeInputsRem) Type

func (ni *NodeInputsRem) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsReshape

type NodeInputsReshape struct {
	X          *NodeImpl
	Dimensions []int
}

NodeInputsReshape holds the inputs used for the call to compute.Reshape.

func (*NodeInputsReshape) CloneWithInputs

func (ni *NodeInputsReshape) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsReshape) String

func (ni *NodeInputsReshape) String() string

String implements the interface NodeInputs.

func (*NodeInputsReshape) Type

func (ni *NodeInputsReshape) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsReverse

type NodeInputsReverse struct {
	X    *NodeImpl
	Axes []int
}

NodeInputsReverse holds the inputs used for the call to compute.Reverse.

func (*NodeInputsReverse) CloneWithInputs

func (ni *NodeInputsReverse) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsReverse) String

func (ni *NodeInputsReverse) String() string

String implements the interface NodeInputs.

func (*NodeInputsReverse) Type

func (ni *NodeInputsReverse) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsRound

type NodeInputsRound struct {
	X *NodeImpl
}

NodeInputsRound holds the inputs used for the call to compute.Round.

func (*NodeInputsRound) CloneWithInputs

func (ni *NodeInputsRound) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsRound) String

func (ni *NodeInputsRound) String() string

String implements the interface NodeInputs.

func (*NodeInputsRound) Type

func (ni *NodeInputsRound) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsRsqrt

type NodeInputsRsqrt struct {
	X *NodeImpl
}

NodeInputsRsqrt holds the inputs used for the call to compute.Rsqrt.

func (*NodeInputsRsqrt) CloneWithInputs

func (ni *NodeInputsRsqrt) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsRsqrt) String

func (ni *NodeInputsRsqrt) String() string

String implements the interface NodeInputs.

func (*NodeInputsRsqrt) Type

func (ni *NodeInputsRsqrt) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsScatterMax

type NodeInputsScatterMax struct {
	Operand                  *NodeImpl
	ScatterIndices           *NodeImpl
	Updates                  *NodeImpl
	IndexVectorAxis          int
	UpdateWindowAxes         []int
	InsertedWindowAxes       []int
	ScatterAxesToOperandAxes []int
	IndicesAreSorted         bool
	UniqueIndices            bool
}

NodeInputsScatterMax holds the inputs used for the call to compute.ScatterMax.

func (*NodeInputsScatterMax) CloneWithInputs

func (ni *NodeInputsScatterMax) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsScatterMax) String

func (ni *NodeInputsScatterMax) String() string

String implements the interface NodeInputs.

func (*NodeInputsScatterMax) Type

func (ni *NodeInputsScatterMax) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsScatterMin

type NodeInputsScatterMin struct {
	Operand                  *NodeImpl
	ScatterIndices           *NodeImpl
	Updates                  *NodeImpl
	IndexVectorAxis          int
	UpdateWindowAxes         []int
	InsertedWindowAxes       []int
	ScatterAxesToOperandAxes []int
	IndicesAreSorted         bool
	UniqueIndices            bool
}

NodeInputsScatterMin holds the inputs used for the call to compute.ScatterMin.

func (*NodeInputsScatterMin) CloneWithInputs

func (ni *NodeInputsScatterMin) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsScatterMin) String

func (ni *NodeInputsScatterMin) String() string

String implements the interface NodeInputs.

func (*NodeInputsScatterMin) Type

func (ni *NodeInputsScatterMin) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsScatterSum

type NodeInputsScatterSum struct {
	Operand                  *NodeImpl
	ScatterIndices           *NodeImpl
	Updates                  *NodeImpl
	IndexVectorAxis          int
	UpdateWindowAxes         []int
	InsertedWindowAxes       []int
	ScatterAxesToOperandAxes []int
	IndicesAreSorted         bool
	UniqueIndices            bool
}

NodeInputsScatterSum holds the inputs used for the call to compute.ScatterSum.

func (*NodeInputsScatterSum) CloneWithInputs

func (ni *NodeInputsScatterSum) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsScatterSum) String

func (ni *NodeInputsScatterSum) String() string

String implements the interface NodeInputs.

func (*NodeInputsScatterSum) Type

func (ni *NodeInputsScatterSum) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsSchedulingBarrier

type NodeInputsSchedulingBarrier struct {
	Operand      *NodeImpl
	Dependencies []*NodeImpl
}

NodeInputsSchedulingBarrier holds the inputs used for the call to compute.SchedulingBarrier.

func (*NodeInputsSchedulingBarrier) CloneWithInputs

func (ni *NodeInputsSchedulingBarrier) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsSchedulingBarrier) String

func (ni *NodeInputsSchedulingBarrier) String() string

String implements the interface NodeInputs.

func (*NodeInputsSchedulingBarrier) Type

Type implements the interface NodeInputs.

type NodeInputsSelectAndScatterMax

type NodeInputsSelectAndScatterMax struct {
	Operand          *NodeImpl
	Source           *NodeImpl
	WindowDimensions []int
	WindowStrides    []int
	Paddings         [][2]int
}

NodeInputsSelectAndScatterMax holds the inputs used for the call to compute.SelectAndScatterMax.

func (*NodeInputsSelectAndScatterMax) CloneWithInputs

func (ni *NodeInputsSelectAndScatterMax) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsSelectAndScatterMax) String

String implements the interface NodeInputs.

func (*NodeInputsSelectAndScatterMax) Type

Type implements the interface NodeInputs.

type NodeInputsSelectAndScatterMin

type NodeInputsSelectAndScatterMin struct {
	Operand          *NodeImpl
	Source           *NodeImpl
	WindowDimensions []int
	WindowStrides    []int
	Paddings         [][2]int
}

NodeInputsSelectAndScatterMin holds the inputs used for the call to compute.SelectAndScatterMin.

func (*NodeInputsSelectAndScatterMin) CloneWithInputs

func (ni *NodeInputsSelectAndScatterMin) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsSelectAndScatterMin) String

String implements the interface NodeInputs.

func (*NodeInputsSelectAndScatterMin) Type

Type implements the interface NodeInputs.

type NodeInputsShiftLeft

type NodeInputsShiftLeft struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsShiftLeft holds the inputs used for the call to compute.ShiftLeft.

func (*NodeInputsShiftLeft) CloneWithInputs

func (ni *NodeInputsShiftLeft) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsShiftLeft) String

func (ni *NodeInputsShiftLeft) String() string

String implements the interface NodeInputs.

func (*NodeInputsShiftLeft) Type

func (ni *NodeInputsShiftLeft) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsShiftRightArithmetic

type NodeInputsShiftRightArithmetic struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsShiftRightArithmetic holds the inputs used for the call to compute.ShiftRightArithmetic.

func (*NodeInputsShiftRightArithmetic) CloneWithInputs

func (ni *NodeInputsShiftRightArithmetic) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsShiftRightArithmetic) String

String implements the interface NodeInputs.

func (*NodeInputsShiftRightArithmetic) Type

Type implements the interface NodeInputs.

type NodeInputsShiftRightLogical

type NodeInputsShiftRightLogical struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsShiftRightLogical holds the inputs used for the call to compute.ShiftRightLogical.

func (*NodeInputsShiftRightLogical) CloneWithInputs

func (ni *NodeInputsShiftRightLogical) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsShiftRightLogical) String

func (ni *NodeInputsShiftRightLogical) String() string

String implements the interface NodeInputs.

func (*NodeInputsShiftRightLogical) Type

Type implements the interface NodeInputs.

type NodeInputsSign

type NodeInputsSign struct {
	X *NodeImpl
}

NodeInputsSign holds the inputs used for the call to compute.Sign.

func (*NodeInputsSign) CloneWithInputs

func (ni *NodeInputsSign) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsSign) String

func (ni *NodeInputsSign) String() string

String implements the interface NodeInputs.

func (*NodeInputsSign) Type

func (ni *NodeInputsSign) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsSin

type NodeInputsSin struct {
	X *NodeImpl
}

NodeInputsSin holds the inputs used for the call to compute.Sin.

func (*NodeInputsSin) CloneWithInputs

func (ni *NodeInputsSin) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsSin) String

func (ni *NodeInputsSin) String() string

String implements the interface NodeInputs.

func (*NodeInputsSin) Type

func (ni *NodeInputsSin) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsSlice

type NodeInputsSlice struct {
	X       *NodeImpl
	Starts  []int
	Limits  []int
	Strides []int
}

NodeInputsSlice holds the inputs used for the call to compute.Slice.

func (*NodeInputsSlice) CloneWithInputs

func (ni *NodeInputsSlice) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsSlice) String

func (ni *NodeInputsSlice) String() string

String implements the interface NodeInputs.

func (*NodeInputsSlice) Type

func (ni *NodeInputsSlice) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsSort

type NodeInputsSort struct {
	Comparator *FunctionImpl
	Axis       int
	IsStable   bool
	Inputs     []*NodeImpl
}

NodeInputsSort holds the inputs for a Sort operation.

func (*NodeInputsSort) CloneWithInputs

func (ni *NodeInputsSort) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

func (*NodeInputsSort) String

func (ni *NodeInputsSort) String() string

func (*NodeInputsSort) Type

func (ni *NodeInputsSort) Type() NodeType

type NodeInputsSplitNode

type NodeInputsSplitNode struct {
	MultiOutputNode *NodeImpl
	Index           int
}

NodeInputsSplitNode holds the inputs for one element of a multi-output node.

func (*NodeInputsSplitNode) CloneWithInputs

func (ni *NodeInputsSplitNode) CloneWithInputs(_ *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

func (*NodeInputsSplitNode) String

func (ni *NodeInputsSplitNode) String() string

func (*NodeInputsSplitNode) Type

func (ni *NodeInputsSplitNode) Type() NodeType

type NodeInputsSqrt

type NodeInputsSqrt struct {
	X *NodeImpl
}

NodeInputsSqrt holds the inputs used for the call to compute.Sqrt.

func (*NodeInputsSqrt) CloneWithInputs

func (ni *NodeInputsSqrt) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsSqrt) String

func (ni *NodeInputsSqrt) String() string

String implements the interface NodeInputs.

func (*NodeInputsSqrt) Type

func (ni *NodeInputsSqrt) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsSub

type NodeInputsSub struct {
	Lhs *NodeImpl
	Rhs *NodeImpl
}

NodeInputsSub holds the inputs used for the call to compute.Sub.

func (*NodeInputsSub) CloneWithInputs

func (ni *NodeInputsSub) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsSub) String

func (ni *NodeInputsSub) String() string

String implements the interface NodeInputs.

func (*NodeInputsSub) Type

func (ni *NodeInputsSub) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsTanh

type NodeInputsTanh struct {
	X *NodeImpl
}

NodeInputsTanh holds the inputs used for the call to compute.Tanh.

func (*NodeInputsTanh) CloneWithInputs

func (ni *NodeInputsTanh) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsTanh) String

func (ni *NodeInputsTanh) String() string

String implements the interface NodeInputs.

func (*NodeInputsTanh) Type

func (ni *NodeInputsTanh) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsTranspose

type NodeInputsTranspose struct {
	X           *NodeImpl
	Permutation []int
}

NodeInputsTranspose holds the inputs used for the call to compute.Transpose.

func (*NodeInputsTranspose) CloneWithInputs

func (ni *NodeInputsTranspose) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsTranspose) String

func (ni *NodeInputsTranspose) String() string

String implements the interface NodeInputs.

func (*NodeInputsTranspose) Type

func (ni *NodeInputsTranspose) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsWhere

type NodeInputsWhere struct {
	Condition *NodeImpl
	OnTrue    *NodeImpl
	OnFalse   *NodeImpl
}

NodeInputsWhere holds the inputs used for the call to compute.Where.

func (*NodeInputsWhere) CloneWithInputs

func (ni *NodeInputsWhere) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

CloneWithInputs implements the interface NodeInputs.

func (*NodeInputsWhere) String

func (ni *NodeInputsWhere) String() string

String implements the interface NodeInputs.

func (*NodeInputsWhere) Type

func (ni *NodeInputsWhere) Type() NodeType

Type implements the interface NodeInputs.

type NodeInputsWhile

type NodeInputsWhile struct {
	Cond         *FunctionImpl
	Body         *FunctionImpl
	InitialState []*NodeImpl
}

NodeInputsWhile holds the inputs for a While operation.

func (*NodeInputsWhile) CloneWithInputs

func (ni *NodeInputsWhile) CloneWithInputs(originalNode *NodeImpl, newInputs ...*NodeImpl) *NodeImpl

func (*NodeInputsWhile) String

func (ni *NodeInputsWhile) String() string

func (*NodeInputsWhile) Type

func (ni *NodeInputsWhile) Type() NodeType

type NodeType

type NodeType int
const (
	NodeTypeInvalid NodeType = iota
	NodeTypeSplitNode
	NodeTypeAbs
	NodeTypeAdd
	NodeTypeAllReduce
	NodeTypeArgMinMax
	NodeTypeAtan2
	NodeTypeBatchNormForInference
	NodeTypeBatchNormForTraining
	NodeTypeBatchNormGradient
	NodeTypeBitCount
	NodeTypeBitcast
	NodeTypeBitwiseAnd
	NodeTypeBitwiseNot
	NodeTypeBitwiseOr
	NodeTypeBitwiseXor
	NodeTypeBroadcastInDim
	NodeTypeCeil
	NodeTypeClamp
	NodeTypeClz
	NodeTypeComplex
	NodeTypeConcatenate
	NodeTypeConj
	NodeTypeConstant
	NodeTypeConvGeneral
	NodeTypeConvertDType
	NodeTypeCos
	NodeTypeCumMax
	NodeTypeCumSum
	NodeTypeDiv
	NodeTypeDotGeneral
	NodeTypeDynamicBroadcastInDim
	NodeTypeDynamicDimensionSize
	NodeTypeDynamicIota
	NodeTypeDynamicPad
	NodeTypeDynamicReshape
	NodeTypeDynamicShape
	NodeTypeDynamicSlice
	NodeTypeDynamicUpdateSlice
	NodeTypeEqual
	NodeTypeEqualTotalOrder
	NodeTypeErf
	NodeTypeExp
	NodeTypeExpm1
	NodeTypeFFT
	NodeTypeFloor
	NodeTypeFusedActivation
	NodeTypeFusedActivationVJP
	NodeTypeFusedAttentionQKVProjection
	NodeTypeFusedDense
	NodeTypeFusedDenseVJP
	NodeTypeFusedLayerNorm
	NodeTypeFusedLayerNormVJP
	NodeTypeFusedQuantizedDense
	NodeTypeFusedQuantizedDenseVJP
	NodeTypeFusedScaledDotProductAttention
	NodeTypeFusedScaledDotProductAttentionVJP
	NodeTypeFusedSoftmax
	NodeTypeFusedTopK
	NodeTypeGather
	NodeTypeGreaterOrEqual
	NodeTypeGreaterOrEqualTotalOrder
	NodeTypeGreaterThan
	NodeTypeGreaterThanTotalOrder
	NodeTypeIdentity
	NodeTypeImag
	NodeTypeIota
	NodeTypeIsFinite
	NodeTypeIsNaN
	NodeTypeLessOrEqual
	NodeTypeLessOrEqualTotalOrder
	NodeTypeLessThan
	NodeTypeLessThanTotalOrder
	NodeTypeLog
	NodeTypeLog1p
	NodeTypeLogicalAnd
	NodeTypeLogicalNot
	NodeTypeLogicalOr
	NodeTypeLogicalXor
	NodeTypeLogistic
	NodeTypeMax
	NodeTypeMin
	NodeTypeMul
	NodeTypeNeg
	NodeTypeNonZero
	NodeTypeNotEqual
	NodeTypeNotEqualTotalOrder
	NodeTypeOptimizationBarrier
	NodeTypePad
	NodeTypeParameter
	NodeTypePow
	NodeTypeQuantizedGather
	NodeTypeRNGBitGenerator
	NodeTypeReal
	NodeTypeReduceBitwiseAnd
	NodeTypeReduceBitwiseOr
	NodeTypeReduceBitwiseXor
	NodeTypeReduceLogicalAnd
	NodeTypeReduceLogicalOr
	NodeTypeReduceLogicalXor
	NodeTypeReduceMax
	NodeTypeReduceMin
	NodeTypeReduceProduct
	NodeTypeReduceSum
	NodeTypeReduceWindow
	NodeTypeRem
	NodeTypeReshape
	NodeTypeReverse
	NodeTypeRound
	NodeTypeRsqrt
	NodeTypeScatterMax
	NodeTypeScatterMin
	NodeTypeScatterSum
	NodeTypeSchedulingBarrier
	NodeTypeSelectAndScatterMax
	NodeTypeSelectAndScatterMin
	NodeTypeShiftLeft
	NodeTypeShiftRightArithmetic
	NodeTypeShiftRightLogical
	NodeTypeSign
	NodeTypeSin
	NodeTypeSlice
	NodeTypeSqrt
	NodeTypeSub
	NodeTypeTanh
	NodeTypeTranspose
	NodeTypeWhere
)
const NodeTypeCall NodeType = 1000

NodeTypeCall is the NodeType for function calls.

const NodeTypeIf NodeType = 1003

NodeTypeIf is the NodeType for If operations.

const NodeTypeSort NodeType = 1001

NodeTypeSort is the NodeType for Sort operations.

const NodeTypeWhile NodeType = 1002

NodeTypeWhile is the NodeType for While operations.

func NodeTypeString

func NodeTypeString(s string) (NodeType, error)

NodeTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func NodeTypeValues

func NodeTypeValues() []NodeType

NodeTypeValues returns all values of the enum

func (NodeType) IsANodeType

func (i NodeType) IsANodeType() bool

IsANodeType returns "true" if the value is listed in the enum definition. "false" otherwise

func (NodeType) MarshalJSON

func (i NodeType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for NodeType

func (NodeType) MarshalText

func (i NodeType) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for NodeType

func (NodeType) MarshalYAML

func (i NodeType) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for NodeType

func (NodeType) String

func (i NodeType) String() string

func (*NodeType) UnmarshalJSON

func (i *NodeType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NodeType

func (*NodeType) UnmarshalText

func (i *NodeType) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for NodeType

func (*NodeType) UnmarshalYAML

func (i *NodeType) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for NodeType

func (NodeType) Values

func (NodeType) Values() []string

type ParameterHandle

type ParameterHandle int

ParameterHandle is a key to refer to a graph's input parameters.

type ParamsMap

type ParamsMap map[*NodeImpl]any

ParamsMap maps parameter nodes to values for RunWithMap.

type Quantization

type Quantization struct {
	Scheme         compute.QuantizationScheme
	Scale          *NodeImpl
	ZeroPoint      *NodeImpl
	BlockAxis      int
	BlockSize      int
	GGMLType       compute.GGMLQuantType
	QuantizedDType dtypes.DType
	PackedDType    dtypes.DType
}

Quantization describes quantization parameters at the graphimpl layer using *NodeImpl references.

func (*Quantization) String

func (q *Quantization) String() string

type QuantizedDenseConfig

type QuantizedDenseConfig struct {
	WeightQuantization *Quantization
	XQuantization      *Quantization
	OutputQuantization *Quantization
	QuantizedMatmul    bool
	Activation         compute.ActivationConfig
	WeightLayout       compute.DenseLayout
}

QuantizedDenseConfig holds configuration for BackendFusedQuantizedDense and BackendFusedQuantizedDenseVJP.

type ReduceOpType

type ReduceOpType = compute.ReduceOpType

ReduceOpType aliases compute.ReduceOpType for internal ops.

type SideParamsFn

type SideParamsFn func(graph *GraphImpl, inputBuffers []compute.Buffer, donate []bool) error

SideParamsFn sets side parameters during graph execution.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL