Struct EvalStat¶
Defined in File eval.hpp
Struct Documentation¶
-
struct EvalStat¶
Eval | <mode> | <time> | [left=L | right=R |] result=X | alloc=A | hw=H | rss=R | <label>
One log record per eval op. Line format: Which fields are set depends on the op’s arity:
mode | left/right | alloc ——————————————-—+————+—–— 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 eval engine’s high-water mark: the running maximum, over all ops since the cache was last reset, of the per-op live working set
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). It is reported as a running max so it is monotonically non-decreasing within one evaluation — the peak memory the engine reaches — rather than the instantaneous per-op working set, which oscillates as the cache fills and drains. The max is held by the CacheManager and cleared by CacheManager::reset() (called per term), so each term reports its own peak.
rss is the process physical-memory footprint measured immediately before the record is emitted (
phys_footprintviaTASK_VM_INFOon macOS — the value Activity Monitor’s “Memory” column shows; resident pages from/proc/self/statmon Linux; 0 on other platforms). Use it to triage memory held outside the eval engine — long-lived tensors not in the cache, runtime/library overhead, allocator fragmentation. mem_hwmark and rss diverge by roughly that “everything else” component.