Template Function sequant::eval::dryrun::assemble_report

Function Documentation

template<class Cache, class Forest, class IsVolatile>
MeterReport sequant::eval::dryrun::assemble_report(Cache const &cache, PeakMonitor const &mon, RichSchedule const &rich, Forest const &forest, IsVolatile const &is_volatile, BatchScheduler scheduler)

Assemble a MeterReport from a metered replay: a walked cache (its recompute_tally() populated by CacheManager:: tally_build over the replay), the hierarchy-wide mon (PeakMonitor), the rich linearized schedule (compute_dag_boulevard over the same forest, supplying each value’s home/use dag-scope), and is_volatile (fed to compute_volatility to classify each distinct value).

Per distinct value (one cache.recompute_tally() entry): builds is the sum, over its slices, of each slice’s build count; node_flops / node_exec are the sum, over its slices, of build-count times that slice’s actual (flops, exec). The value is classified persistent/volatile by compute_volatility's verdict for its hash and folded into the matching MeterReport::flops_*/cost_* accumulator. Its HomeFidelity entry’s home/uses are read off the rich cell sharing its hash (empty if the value has no matching cell, e.g. a leaf never realized as its own distinct product build).

Parameters:
  • cache – the (root) cache whose recompute_tally() was populated by a Trace::On metered replay.

  • mon – the PeakMonitor wired onto cache's scope chain during the replay.

  • rich – the linearized schedule (compute_dag_boulevard) over the same forest the replay walked.

  • forest – the evaluation forest (fed to compute_volatility).

  • is_volatilebool(TreeNode const&): intrinsic volatility predicate, as for compute_volatility.

  • scheduler – which executor this report describes (stashed verbatim into MeterReport::scheduler).

Returns:

the assembled MeterReport.