MemoryRoundTripScenario
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.
A tensor of tensor_bytes crossing to and from memory trips times at energy_per_byte (a layer boundary writes it and the next layer reads it back).
Notes
Equation: The calculation members below define energy.
Assumptions: trips counts charged transfers of tensor_bytes, with constant energy per transferred byte.
Excludes: Compute energy, standby power, and transfer setup overhead.
References
Derivation: A tensor of tensor_bytes crossing to and from memory trips times at energy_per_byte (a layer boundary writes it and the next layer reads it back). 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.ResNet50Stage2MapInt8ReadOnce
>>> value = case.energy
>>> print(f"{value.m_as('microjoule'):.3g} microjoule")
32.1 microjouleAttributes
| Name | Description |
|---|---|
| energy | Transfer energy in microjoules, stated byte transfers times energy per byte. |
| energy_per_byte | |
| tensor_bytes | |
| trips |
tensor_bytes
Type: Quantity.
Declared default: required.
energy_per_byte
Type: Quantity.
Declared default: required.
trips
Type: int.
Declared default: 2.
energy
engine.scenario_types.MemoryRoundTripScenario.energy
Transfer energy in microjoules, stated byte transfers times energy per byte.
Equation: (trips * tensor_bytes * energy_per_byte).to('microjoule').