Package-level declarations

Types

Link copied to clipboard

Builder that records symbolic nodes/values. It is definition-only: no tensors are allocated.

Link copied to clipboard
annotation class DagDsl
Link copied to clipboard
abstract class DagModule

A reusable sub-graph module that can be instantiated within a DagBuilder.

Link copied to clipboard
Link copied to clipboard
data class GraphNodeDefinition(val id: String, val operation: Operation, val inputs: List<GraphValue<*>>, val outputs: List<GraphValue<*>>, val attributes: Map<String, Any?> = emptyMap())

Logical node definition captured by the DSL before lowering to sk.ainet.lang.graph.ComputeGraph.

Link copied to clipboard
data class GraphProgram(val nodes: List<GraphNodeDefinition>, val outputs: List<GraphValue<*>>)

Immutable program emitted by the DSL.

Link copied to clipboard

Collecting OpSink that accumulates OpTrace records and can convert them to a GraphProgram on demand.

Link copied to clipboard
data class GraphValue<out T : DType>(val nodeId: String, val outputIndex: Int, val spec: TensorSpec)

Symbolic value flowing through the DAG DSL. Every value is produced by a node output.

Link copied to clipboard

Records a symbolic initializer hint (used only as metadata on TensorSpec).

Link copied to clipboard
class SymbolicTensorBuilder<T : DType>(dtype: KClass<T>, defaultName: String)

Lightweight, allocation-free builder that mimics the shape/initializer style of the data DSL but produces only TensorSpec metadata for the DAG DSL.

Functions

Link copied to clipboard
fun dag(block: DagBuilder.() -> Unit): GraphProgram

Entry point for the DAG DSL.

Link copied to clipboard

Defines a reusable graph component (module).

Link copied to clipboard
fun DagBuilder.module(module: DagModule, inputs: List<GraphValue<*>>): List<GraphValue<*>>

DSL helper for using modules.

Link copied to clipboard

Converts a list of OpTrace records (captured during a tracing forward pass) into a GraphProgram DAG suitable for optimization passes.