SystolicReuseEnergyScenario
Optimization scenarios · Implementation: mlsysim/engine/scenario_definitions/optimization.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
Energy per MAC with every operand from off-chip memory, against a systolic array.
Streaming: naive_accesses off-chip accesses per MAC (load both operands and the running sum, write the sum back). Systolic: edge_loads operands enter at the array’s edge and serve array_dim MACs; partial sums stay in the array.
Notes
Equation: The calculation members below define naive_energy, systolic_accesses, systolic_energy, ratio.
Assumptions: Each edge operand is reused across array_dim MACs; partial sums remain local; access energies are fixed.
Excludes: Utilization loss, leakage, interconnect energy, and edge padding.
References
Derivation: Energy per MAC with every operand from off-chip memory, against a systolic array. Each member records the corresponding algebra or named physics function.
Examples
Evaluate the named configuration and display a modeled result.
>>> from mlsysim import Scenarios
>>> case = Scenarios.SystolicArrayReuseEnergy
>>> value = case.ratio
>>> print(f"{value:.3g}")
233Attributes
| Name | Description |
|---|---|
| access_energy | |
| array_dim | |
| edge_loads | |
| mac_energy | |
| naive_accesses | |
| naive_energy | Energy per MAC in pJ when every stated off-chip access is paid. |
| ratio | Dimensionless naive-to-systolic energy ratio; larger values favor reuse. |
| systolic_accesses | Off-chip operand accesses per MAC after reuse across the array dimension. |
| systolic_energy | Energy per MAC in pJ after amortizing edge loads across the array. |
access_energy
Type: Quantity.
Declared default: required.
mac_energy
Type: Quantity.
Declared default: required.
naive_accesses
Type: int.
Declared default: required.
edge_loads
Type: int.
Declared default: required.
array_dim
Type: int.
Declared default: required.
naive_energy
engine.scenario_types.SystolicReuseEnergyScenario.naive_energy
Energy per MAC in pJ when every stated off-chip access is paid.
Equation: (naive_accesses * access_energy + mac_energy).to('pJ').
systolic_accesses
engine.scenario_types.SystolicReuseEnergyScenario.systolic_accesses
Off-chip operand accesses per MAC after reuse across the array dimension.
Off-chip accesses per MAC in the array.
Equation: edge_loads / array_dim.
systolic_energy
engine.scenario_types.SystolicReuseEnergyScenario.systolic_energy
Energy per MAC in pJ after amortizing edge loads across the array.
Equation: (systolic_accesses * access_energy + mac_energy).to('pJ').
ratio
engine.scenario_types.SystolicReuseEnergyScenario.ratio
Dimensionless naive-to-systolic energy ratio; larger values favor reuse.
Equation: (naive_energy / systolic_energy).to('').magnitude.