Function sequant::peak_cache¶
Defined in File cache_manager.cpp
Function Documentation¶
-
AsyCost sequant::peak_cache(Sum const &expr, std::optional<size_t> min_repeats = std::nullopt)¶
Estimates the peak memory required to hold the intermediates that repeat when a Sum is evaluated term by term.
Note
Reordering the terms in a Sum affects the peak cache memory.
- Parameters:
expr – A Sum whose terms will be evaluated by reusing intermediates.
min_repeats – Minimum number of repeats for a node to be cached. If not provided, will use the default of
cache_manager().
- Returns:
AsyCost object that represents the memory in terms of powers of active occupied and active unoccupied index extents of stored tensor.