Skip to main content

Module graph

Module graph 

Source
Expand description

Recording context wrapping the in-progress FunctionProto. The proto is the IR — semantic BB attributes ride on proto fields, not a parallel Rust shadow store. See docs/IR_AND_DSL.md §2.

Rust-side wrapper carries what the proto can’t represent: instance_for_pointer (pointer-identity dedup for generic placeholders) and site_counter (output-name minting cache).

Module::build() constructs Graph automatically; Graph::new() is for acceptance tests.

Structs§

Graph
Recording context every DSL method writes into.

Enums§

RecordingMode
Open top-level vs. sealed nested-function recording.

Functions§

attr_float
Construct an AttributeProto of type FLOAT. Used for epsilon, alpha, momentum, etc.
attr_graph
Construct an AttributeProto of type GRAPH. ONNX carries If / Loop body sub-graphs in AttributeProto.g.
attr_int
Construct an AttributeProto of type INT for NodeProto.attribute. Used by DSL methods that pass scalar i64 config (axis, group, to, etc.).
attr_ints
Construct an AttributeProto of type INTS. Used for shape / axes / strides / kernel_shape / pads / dilations / perm vectors.
attr_string
Construct an AttributeProto of type STRING. The proto stores strings as s: Vec<u8>; this helper hides the bytes encoding. Used by ops carrying structured-string metadata (e.g. comma-separated TypeNode denotation lists on composite Bundle / Unbundle).
attr_tensor
Construct an AttributeProto of type TENSOR. Used by Constant for embedded literal payloads.
kv
Construct a StringStringEntryProto for metadata_props or attribute_proto.metadata_props. Used by every DSL method body.