TimeloopFE
|
A class to store the output statistics from Timeloop. More...
Public Member Functions | |
__init__ (self, float percent_utilization, int computes, int cycles, float cycle_seconds, Dict[str, float] per_component_energy, Dict[str, float] per_component_area, dict variables, str mapping="") | |
scale_computes_by (self, float factor) | |
Any | access (self, str key) |
Access a key in the OutputStats object. | |
combine_per_component_area (self, List[str] from_keys, str to) | |
Combine the area of multiple components into a single component. | |
combine_per_component_energy (self, List[str] from_keys, str to) | |
combine_per_component_area_energy (self, List[str] from_keys, str to) | |
Combine the area and energy of multiple components into a single component. | |
clear_zero_energies (self) | |
Remove components with zero energy. | |
clear_zero_areas (self) | |
Remove components with zero area. | |
Union[float, MultipliableDict] | per_compute (self, str key) |
Returns a value scaled by the number of computes. | |
Static Public Member Functions | |
"OutputStats" | aggregate (List["OutputStats"] tests) |
Aggregate a list of OutputStats into a single OutputStats object. | |
"OutputStatsList" | aggregate_by (List["OutputStats"] tests, *Union[List[str], str] keys) |
Aggregate a list of OutputStats objects by a set of keys. | |
Public Attributes | |
float | percent_utilization = percent_utilization |
int | computes = computes |
int | cycles = cycles |
float | cycle_seconds = cycle_seconds |
float | latency = cycles * cycle_seconds |
Dict[str, float] | per_component_energy |
Dict[str, float] | per_component_area |
dict | variables = copy.deepcopy(variables) |
float | area = sum(per_component_area.values()) |
float | energy = sum(per_component_energy.values()) |
float | computes_per_second = computes / cycle_seconds / cycles |
tuple | computes_per_second_per_square_meter |
float | computes_per_joule = self.computes / self.energy |
str | mapping = mapping |
A class to store the output statistics from Timeloop.
Parameters: percent_utilization (float): The utilization percentage. computes (int): The number of computes. cycles (int): The number of cycles. cycle_seconds (float): The duration of a cycle in seconds. per_component_energy (Dict[str, float]): The energy consumed by each component in Joules. per_component_area (Dict[str, float]): The area of each component in square meters. variables (dict): The variables used in the specification. mapping (str): The mapping result.
timeloopfe.v4.output_parsing.OutputStats.__init__ | ( | self, | |
float | percent_utilization, | ||
int | computes, | ||
int | cycles, | ||
float | cycle_seconds, | ||
Dict[str, float] | per_component_energy, | ||
Dict[str, float] | per_component_area, | ||
dict | variables, | ||
str | mapping = "" ) |
Any timeloopfe.v4.output_parsing.OutputStats.access | ( | self, | |
str | key ) |
Access a key in the OutputStats object.
If the key is not found, check the variables.
Args: key (str): The key to access.
Returns: Any: The value of the key.
|
static |
Aggregate a list of OutputStats into a single OutputStats object.
Args: tests (List[OutputStats]): A list of OutputStats objects to aggregate.
|
static |
Aggregate a list of OutputStats objects by a set of keys.
OutputStats with equal values for the keys will be aggregated together. OutputStats with different values for the keys will be aggregated separately and returned as a list.
Args: tests (List[OutputStats]): A list of OutputStats objects to aggregate. keys (List[str]): The keys to aggregate by.
Returns: OutputStatsList: A list of aggregated OutputStats objects.
timeloopfe.v4.output_parsing.OutputStats.clear_zero_areas | ( | self | ) |
Remove components with zero area.
timeloopfe.v4.output_parsing.OutputStats.clear_zero_energies | ( | self | ) |
Remove components with zero energy.
timeloopfe.v4.output_parsing.OutputStats.combine_per_component_area | ( | self, | |
List[str] | from_keys, | ||
str | to ) |
Combine the area of multiple components into a single component.
Args: from_keys (List[str]): The keys of the components to combine. to (str): The key to combine the components into.
timeloopfe.v4.output_parsing.OutputStats.combine_per_component_area_energy | ( | self, | |
List[str] | from_keys, | ||
str | to ) |
Combine the area and energy of multiple components into a single component.
Args: from_keys (List[str]): The keys of the components to combine. to (str): The key to combine the components into.
timeloopfe.v4.output_parsing.OutputStats.combine_per_component_energy | ( | self, | |
List[str] | from_keys, | ||
str | to ) |
Union[float, MultipliableDict] timeloopfe.v4.output_parsing.OutputStats.per_compute | ( | self, | |
str | key ) |
Returns a value scaled by the number of computes.
Args: key (str): The key to access.
Returns: Union[float, MultipliableDict]: The scaled value.
timeloopfe.v4.output_parsing.OutputStats.scale_computes_by | ( | self, | |
float | factor ) |
float timeloopfe.v4.output_parsing.OutputStats.area = sum(per_component_area.values()) |
int timeloopfe.v4.output_parsing.OutputStats.computes = computes |
float timeloopfe.v4.output_parsing.OutputStats.computes_per_joule = self.computes / self.energy |
float timeloopfe.v4.output_parsing.OutputStats.computes_per_second = computes / cycle_seconds / cycles |
tuple timeloopfe.v4.output_parsing.OutputStats.computes_per_second_per_square_meter |
float timeloopfe.v4.output_parsing.OutputStats.cycle_seconds = cycle_seconds |
int timeloopfe.v4.output_parsing.OutputStats.cycles = cycles |
float timeloopfe.v4.output_parsing.OutputStats.energy = sum(per_component_energy.values()) |
float timeloopfe.v4.output_parsing.OutputStats.latency = cycles * cycle_seconds |
str timeloopfe.v4.output_parsing.OutputStats.mapping = mapping |
Dict[str, float] timeloopfe.v4.output_parsing.OutputStats.per_component_area |
Dict[str, float] timeloopfe.v4.output_parsing.OutputStats.per_component_energy |
float timeloopfe.v4.output_parsing.OutputStats.percent_utilization = percent_utilization |
dict timeloopfe.v4.output_parsing.OutputStats.variables = copy.deepcopy(variables) |