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, CostParams const &cost = {}, std::function<bool(Index const&)> const &is_batchable_index = {}, std::function<std::size_t(Index const&)> batch_target_size = {}, std::function<double(Index const&, std::size_t)> const &inner_pow = {}, bool batch_persistent_only = false)

Note

prod is assumed to consist of only Tensor expressions

Note

The remaining parameters (subnet_cse, cost, is_batchable_index, batch_target_size, inner_pow, batch_persistent_only) are forwarded verbatim to the detail single_term_opt overload; see it for their semantics.

Template Parameters:

Metric – Objective function (DenseFLOPs by default; DenseSize minimizes total operand storage rather than flops; DensePeakSize minimizes peak memory over the evaluation schedule &#8212; see ObjectiveFunction).

Parameters:
  • prodProduct to be optimized.

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

Returns:

Parenthesized product expression.