Enum ObjectiveFunction¶
Defined in File options.hpp
Enum Documentation¶
-
enum class sequant::ObjectiveFunction¶
Objective function to minimize in single-term and top-level optimize routines. The
Dense*models assume dense tensors:DenseFLOPs(the default) counts floating-point operations, the metric used throughout the contraction-ordering literature.DenseTimeSpaceis the objective intended for production. It is perf-first, peak-second: it minimizes a performance cost – the flop count, or the roofline wall-time proxy when RooflineParams is set – and breaks ties by peak memory, the maximum over the evaluation schedule of the combined size of all simultaneously-live tensors (intermediates and resident input leaves, the all-co-resident model). Does not support common-subexpression elimination (CSEOptions::subnetmust be false).DenseTimeSpaceBatchedextendsDenseTimeSpacewith a per-index batchability model: each index satisfyingOptimizeOptions::batch_policy.is_batchable_index()(the derived union of the contracted- and external-role building blocks) may be sliced tomin(extent, batch_policy.batch_target_size(ix))elements –batch_target_sizeis an upper bound, so this is a conservative (over-)estimate of the realized whole-tile batch, which the backend rounds down to a tile multiple (seemode_batches_of_trange1). Requires a batchability role predicate (batch_policy.is_batchable_contracted_indexand/oris_batchable_external_index) andbatch_policy.batch_target_sizeto be set. Because slicing is perf-neutral, the perf-first primary never prefers a flops-catastrophic factorization merely for its sliceability.peak_thresholdis a feasibility ceiling: among the schedules that fit the budget the fewest flops win, ties broken toward the least-sliced realization (nsl) and then lower peak, so nothing is sliced for free below the ceiling. When no schedule fits, the fallback stays perf-first: global min flops, ties by min peak.peak_thresholdis also the switch that turns batching on at all:PeakBatchedModel::relaxopens neither a contracted nor an external loop unlessstd::isfinite(peak_threshold). External opens are emitted per node, gated by exactlybatch_policy.batch_spectator_indices && std::isfinite(peak_threshold), with no post-DP external placement pass.DenseSize,DenseSpaceTimeandDenseSpaceTimeBatched(and theDensePeakSize/DensePeakSizeBatchedspellings) are deprecated.
Naming:
Dense{Primary}{Secondary},Space= peak/size,Time= perf.Leaves room for
Sparse*models later.Values:
-
enumerator DenseFLOPs¶
Floating-point operation count (the default).
-
enumerator DenseSize¶
- Deprecated:
Use
DenseTimeSpace. Result-tensor storage elements summed over intermediates – a gross-traffic proxy, not a peak.
-
enumerator DenseSpaceTime¶
- Deprecated:
Use
DenseTimeSpace. Peak-first, perf-second; can prefer a flops-catastrophic factorization for a lower peak.
-
enumerator DenseSpaceTimeBatched¶
- Deprecated:
Use
DenseTimeSpaceBatched. Batched variant ofDenseSpaceTime.
-
enumerator DenseTimeSpace¶
Perf-first, peak-second; the objective intended for production.
-
enumerator DenseTimeSpaceBatched¶
Batched variant of
DenseTimeSpace.
-
enumerator DensePeakSize¶
- Deprecated:
Old spelling of
DenseSpaceTime, sharing its value so that code and JSON inputs spelling it (“dense_peak_size”) keep working: a== DensePeakSizeguard catchesDenseSpaceTime.
-
enumerator DensePeakSizeBatched¶
- Deprecated:
Old spelling of
DenseSpaceTimeBatched.