DagBuilder
Builder that records symbolic nodes/values. It is definition-only: no tensors are allocated.
Functions
Link copied to clipboard
inline fun <T : DType, V> constant(name: String, noinline builder: SymbolicTensorBuilder<T>.() -> TensorSpec): GraphValue<T>
Constant helper that reuses a symbolic, allocation-free data DSL to declare shape/dtype.
Declare a constant placeholder (treated like an input node).
Link copied to clipboard
fun <T : DType> input(name: String, spec: TensorSpec = TensorSpec(name = name, shape = null, dtype = "unknown")): GraphValue<T>
Declare a graph input placeholder.
Link copied to clipboard
DSL helper for using modules.
Link copied to clipboard
Mark a value as a program output. If none are marked, the last node's outputs are used.
Link copied to clipboard
inline fun <T : DType, V> parameter(name: String, noinline builder: SymbolicTensorBuilder<T>.() -> TensorSpec): GraphValue<T>
Parameter helper that reuses a symbolic, allocation-free data DSL to declare shape/dtype.
Declare a parameter/weight placeholder.