Accelerator Energy, Area, and Latency#

To calculate energy and latency, we first need to look at the number of actions incurred by each Component in the architecture.

Calculating Number of Actions from A Mapping#

Except for Compute components (whose number of compute actions, barring recomputation, depends only on workload), the number of actions incurred by most Components depends on the component type, the workload, and the mapping.

For Memory and Toll components, the number of actions depends on the number of accesses to the component. They may be accessed in two ways:

  • read: The component is read from a lower-level component, or output values are read up to a higher-level component.

  • write: The component is written to a lower-level component, or input values are written from a higher-level component.

The number of actions incurred by accesses for each tensor are equal to the number of values accessed times the bits per value of the tensor (determined by the workload), divided by the bits_per_action attribute. For example, if 1024 values are accessed with a bits per value of 16 bits and bits_per_action is 32, then 1024 * 16 / 32 = 512 actions are incurred.

Read+Modify+Writes (RMWs) to a component are counted as a read and a write. The first read of output data is skipped because the value has not been written yet.

By default, the bits_per_action attributes is set to 1, meaning that memory accesses are counted in terms of bits accessed unless bits_per_action is set to a different value.

Calculating Latency from a Pmapping#

The latency of a component is the sum, over its actions, of the action count (times the component’s actions_scale) divided by the action’s throughput. Network components have their latency limited by their most-congested link.

A Memory with separate_read_write_ports set is treated as two components for latency, “{name} (read)” and “{name} (write)”, which may overlap in time; otherwise one shared port serializes reads and writes.

Calculating Area and Leak Power#

After Component Energy and Area is completed, we can get area with the per_component_total_area and total_area attributes. Similarly, we can get leak power with the per_component_total_leak_power and total_leak_power attributes.