Template Function sequant::opt::single_term_opt

Function Documentation

template<ObjectiveFunction Metric = ObjectiveFunction::DenseFLOPs, has_index_extent IdxToSz>
ExprPtr sequant::opt::single_term_opt(Product const &prod, IdxToSz &&idxsz, bool subnet_cse = false, std::function<bool(Tensor const&)> const &is_volatile_leaf = {}, double volatile_weight = 1.0, double footprint_weight = 0.0)

Note

prod is assumed to consist of only Tensor expressions

Template Parameters:

Metric – Objective function (DenseFLOPs by default; DenseSize minimizes total operand storage rather than flops).

Parameters:
  • prodProduct to be optimized.

  • idxsz – An invocable object that maps an Index object to size.

Returns:

Parenthesized product expression.