Function sequant::eval::dryrun::meter¶
Defined in File meter.hpp
Function Documentation¶
-
inline MeterReport sequant::eval::dryrun::meter(std::vector<EvalNodeDryRun> const &forest, BatchPolicy const &policy, SizeRegime const ®ime, CacheConfig const &cfg, std::ostream *trace = nullptr)¶
Runs the policy-selected executor (forest descent or ordered, per
policy.scheduler) overforestthrough the DryRun sizing backend, metering the replay with a fresh,PeakMonitor-wired, build-tallying cache, and returns the assembledMeterReport.Mirrors MPQC’s wet dispatch: this drives the same driver entry point (
,sequant::evaluate(Nodes const&, BatchPolicy const&, layout, F,
CacheManager&, mode_order, ScopeGuardFactory)
ordered_executor.hpp) a real solve would use underpolicy— both executors are selected by the samepolicy.scheduler, not independently maintained code paths — so the metered replay is exactly the runpolicydescribes, not a hand-rolled proxy of it. Non-throwing wrapper (if desired) is the caller’s responsibility; an exception from the replay propagates out of this call, but the RAII logger-state guard still restoresLogger::instance().eval on the way out.- Parameters:
forest – the evaluation forest (a range of
EvalNodeDryRun).policy – the batch policy driving the coexistence entry — in particular
scheduler(executor selection) andbatch_target_size(the batch-partition source; also the source of theblock_offunction this call builds its ownrichschedule with, forassemble_report— the coexistence entry builds an independent, internalRichScheduleof its own from the samepolicy.batch_target_sizeto drive the executor).regime – the size regime supplying the DryRun
CostModel.cfg – cache configuration (footprint gate, min repeats, volatility) for the metered cache, built exactly as
build_dryrun_cachedoes (same footprint arithmetic, same is_volatile default) — not via that builder directly, since its is_volatile default (substituted for an emptycfg.is_volatile) is internal to it and would otherwise be invisible toassemble_reportbelow, which also needs a callable predicate (an emptycfg.is_volatilepassed to it directly throwsstd::bad_function_callfromcompute_volatility). The same locally-defaulted predicate is used for both.trace – optional sink for the eval trace; when non-null,
Logger::instance().eval.stream is redirected there for the duration of the call (restored on exit, along with the elevatedeval.leveland the installedeval.node_meta).
- Returns:
the assembled
MeterReport(peak, persistent/volatile FLOPs+time, build-vs-home fidelity), stamped withpolicy.scheduler.