Struct EvalStat

Struct Documentation

struct EvalStat

Eval | <mode> | <time> | [left=L | right=R |] result=X | alloc=A | hw=H | <label>

One log record per eval op. Line format: Which fields are set depends on the op’s arity:

mode | left/right | alloc ——————————————-&#8212;+———&#8212;+—–&#8212; Constant / Variable / Tensor (leaf) | — | result Permute / MultByPhase / | — | result Symmetrize / Antisymmetrize | | SumInplace | — | 0B Sum / Product | set | result

Only Sum and Product set left/right, since their operand sizes can differ from the result. Other modes omit those fields rather than zeroing them, so a logged 0B always means an empty buffer.

mem_result is the size of the buffer the op produces; for SumInplace it’s the size of the accumulator after the add. mem_alloc is what the op allocated — equal to mem_result everywhere except SumInplace, which writes into the accumulator and allocates nothing. mem_hwmark is the live working set during the op:

bytes(cache) + bytes(result) + bytes of each operand not aliased to a cache entry

Aliasing is evaluated at each call site using cache.alive, canon_phase, and the requested layout.

Public Members

EvalMode mode
Duration time
Bytes mem_result = {}
Bytes mem_alloc = {}
Bytes mem_hwmark = {}
std::optional<Bytes> mem_left
std::optional<Bytes> mem_right