Skip to main content

Module graph

Module graph 

Source
Expand description

The computational graph: Graph, Op, Shape, SymTensor.

Modules§

compiler
Graph-to-FXGraph lowering.

Structs§

CustomData
Wrapper around Arc<dyn CustomOp> that implements Debug for Op.
Graph
The traced computational graph: a list of GraphNodes plus optional node names.
GraphNode
One node in a Graph: an Op plus its producer indices, dtype, and output shape.
SymTensor
A symbolic tensor handle. Every layer operation on a SymTensor records itself in the shared Graph and returns a new SymTensor pointing to the new node. Cloning is cheap — it shares the graph via Rc.

Enums§

DtypeRepr
Runtime dtype tag: the graph-level (type-erased) representation of a tensor’s dtype, mirroring dtype::Dtype’s implementors.
Op
A single computational-graph operation. Each variant corresponds to one nn layer or primitive op; variant fields are that op’s configuration (mirroring the corresponding nn::* layer struct’s fields).

Traits§

CustomOp
Trait implemented by user-defined ops.

Type Aliases§

Shape
A dynamic shape vector. Each element is either a known size (Some(n)) or a dynamic/unknown dimension (None), e.g. a batch axis whose size is determined at runtime.