Function sequant::opt::schedule::record_term

Function Documentation

TermRecord sequant::opt::schedule::record_term(ExprPtr const &canonical, ExprPtr const &optimized, container::vector<NodeBatchAnnotation> const &nodes)

Records the optimizer’s output optimized for canonical (a nested Product over the same factor objects, or the lone factor/Constant itself) and its annotations nodes (one per tensor x tensor node, left-first post-order, as consumed by binarize).

Throws:

sequant::Exception – if canonical is a mixed product (has a factor that is not a Tensor or TensorPower), or if optimized / nodes do not match it