SonicBoom

Static Execution Plan Format v0

ExecutionPlan is the explicit, independently-verifiable contract between the static planner and the runtime executor. It is a plain-data C++ struct (core/include/sonicboom/planner/execution_plan.h) with no MLIR/LLVM/ATen/c10 objects, so it can be inspected and validated without pulling in the execution implementation.

Schema

Resources

Both are copied from the ResourceSnapshot; the validator recomputes resource_fingerprint from exactly these and compares to the stored value.

Tensors

Tasks

Other task kinds (Transfer, Allocate, Release, Synchronize) exist in the model for future multi-task planning; v0 emits none of them.

Lifetimes

Buffers

Order and summaries

Invariants (enforced by PlanValidator)

Unique device/memory-space/tensor/task ids; every task’s device, memory space, dependencies, inputs, and outputs resolve; dependency graph is acyclic; the execution order is a topological permutation; transfer tasks (if any) have distinct, valid endpoints and positive bytes; allocate/release tasks reference a known buffer; and the resource fingerprint matches the recorded devices/memory spaces. Any violation yields a PlannerError (InvalidPlan, or ResourceChanged for a fingerprint mismatch), never a silently-altered plan.