Package-level declarations

Types

Link copied to clipboard
interface ComputeGraph

Interface for managing a computational graph with nodes and edges. This represents the core data structure for graph-based model execution.

Link copied to clipboard

Default implementation of ComputeGraph with topological sorting and validation

Link copied to clipboard
open class DefaultExecutionTape(var session: TraceSession = sk.ainet.lang.trace.TraceSession()) : ExecutionTape

Default implementation of ExecutionTape

Link copied to clipboard

Default implementation of GradientTape

Link copied to clipboard
class DefaultGraphExecutionContext(val baseOps: TensorOps = VoidTensorOps(), val phase: Phase = Phase.EVAL, val tensorDataFactory: TensorDataFactory = DenseTensorDataFactory(), val hooks: ForwardHooks? = null, val memoryInfo: MemoryInfo = MemoryInfo.getEmptyInfo(), val executionStats: ExecutionStats = ExecutionStats(), val createTapeFactory: (GraphExecutionContext) -> ExecutionTape = { _ -> DefaultExecutionTape() }, val computeGraph: ComputeGraph? = null, baseSink: OpSink = NoOpSink) : GraphExecutionContext
Link copied to clipboard

Default implementation of TapeStack

Link copied to clipboard
data class GraphEdge(val id: String, val source: GraphNode, val destination: GraphNode, val sourceOutputIndex: Int = 0, val destinationInputIndex: Int = 0, val tensorSpec: TensorSpec, val metadata: Map<String, Any> = emptyMap())

Represents an edge in the computational graph, connecting two nodes and representing tensor flow between operations.

Link copied to clipboard
data class GraphEdgeRef(val id: String, val sourceId: String, val destinationId: String, val sourceOutputIndex: Int = 0, val destinationInputIndex: Int = 0, val tensorSpec: TensorSpec, val metadata: Map<String, Any> = emptyMap())

Lightweight version of GraphEdge that only stores node IDs Useful for serialization and when nodes are stored separately

Link copied to clipboard
data class GraphNode(val id: String, val operation: Operation, val inputs: List<TensorSpec>, val outputs: List<TensorSpec>, val metadata: Map<String, Any> = emptyMap())

Represents a node in the computational graph containing operation metadata. Each node represents a single operation with its inputs, outputs, and parameters.

Link copied to clipboard
class SimpleComputeGraph(nodesInit: List<GraphNode> = emptyList(), edgesInit: List<GraphEdge> = emptyList()) : ComputeGraph

Minimal production ComputeGraph implementation for tape-based recording path. This mirrors the behavior of the test DefaultComputeGraph but is simplified.