Module graph_executor

Module graph_executor 

Source
Expand description

Parallel executor for the graph IR recorded by Halo2IRBuilder.

Lowering flattens each graph node — using its NodeMeta — into a [GraphCoreInst] whose operands are absolute tape offsets. The tape layout is [advice | lookups | consts] (dedup’d fixed-column constants live in the trailing region), so operand gathering is uniform.

Execution has two phases:

  1. load_proof_wire streams proof witnesses into the tape via PopulateInputs, replaying recorded LoadWitness instructions.
  2. GraphExecutor::run claims level-sorted compute instructions off a shared atomic cursor; each worker spin-waits on its parents’ done flags (Release/Acquire) — no barriers.

Structs§

FusedColumnBuilder
Streams graph-executor tape deltas into advice columns.
GraphExecutor
Ephemeral binding of a GraphProgram with a GraphExecutorState, implementing PopulateInputs so load_proof_wire can stream witnesses into the tape and driving Self::run for the compute phase.
GraphExecutorState
Mutable state executing a GraphProgram: the witness tape, the input cursor, and the workers’ done flags. Reusable across proofs — run stamps flags with a fresh phase instead of zeroing them, and the tape’s compute cells are simply overwritten.
GraphProgram
The immutable output of lowering a graph IR: everything needed to replay the populate trace that is a pure function of the static circuit shape.