compute#

The compute helpers infer graph-level metadata generated from shape inference and value lifetimes, and describe how a graph is executed: the raw-buffer allocator, the individual execution actions (ExecuteAction), and the ordered ExecutionPlan.

compute::ComputeContext is the single entry point that ties these analyses together: compute::ComputeContext::Compute() runs shape inference, value/node tagging, in-place reuse (with release-after and shape-tag classification) and per-node peak memory in one call and keeps every result alive; compute::ComputeContext::WriteToModel() pushes them back into the model (value_info and node metadata); and compute::ComputeContext::BuildExecutionPlan() derives the ExecutionPlan from that information.