Program Listing for File options.hpp¶
↰ Return to documentation for file (SeQuant/core/optimize/options.hpp)
#ifndef SEQUANT_CORE_OPTIMIZE_OPTIONS_HPP
#define SEQUANT_CORE_OPTIMIZE_OPTIONS_HPP
#include <cstddef>
#include <functional>
namespace sequant {
class Index;
class Tensor;
enum class ObjectiveFunction { DenseFLOPs, DenseSize };
enum class ReorderSum { Reorder, NoReorder };
struct CSEOptions {
bool subnet = false;
};
using index_to_extent_t = std::function<std::size_t(Index const&)>;
struct OptimizeOptions {
ObjectiveFunction objective_function = ObjectiveFunction::DenseFLOPs;
ReorderSum reorder = ReorderSum::Reorder;
CSEOptions CSE = {};
index_to_extent_t idx_to_extent = {};
std::function<bool(Tensor const&)> is_volatile_leaf = {};
double volatile_weight = 1.0;
double footprint_weight = 0.0;
};
} // namespace sequant
#endif // SEQUANT_CORE_OPTIMIZE_OPTIONS_HPP