Skip to main content

IronLawScenario

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.

The iron law’s three terms for one task, and an upgrade to the memory or compute term.

Give the memory term as memory_time or as data_volume over bandwidth, and the compute term as compute_time or as operations over effective_rate (peak times utilization).

Notes

Equation: Compose mlsysim.solvers.IronLawModel.

Assumptions: Explicit stage durations take precedence over work/rate reconstruction; the solver combines the three supplied timing terms under its stated overlap model.

Excludes: A stated effective rate is not inferred from kernels, and unlisted runtime stages are absent.

References

Derivation: this scenario binds its input fields to the referenced implementation contracts: mlsysim.solvers.IronLawModel. The methods below identify any additional arithmetic.

Examples

>>> from mlsysim import Scenarios
>>> case = Scenarios.IronLawMemoryBoundExample
>>> str(case.memory_time)
'20.0 ms'

Attributes

Name Description
bandwidth
compute_speedup
compute_time Explicit compute duration, or work divided by effective rate when absent. Equation:
compute_time_stated
data_volume
effective_rate
memory_speedup
memory_time Explicit memory duration, or bytes divided by bandwidth when absent. Equation:
memory_time_stated
operations
overhead
result Evaluate this scenario through mlsysim.solvers.IronLawModel.solve. Equation: pass
upgraded_bandwidth Bandwidth after the hypothetical memory-side upgrade. Equation: ``bandwidth *

overhead

Type: Quantity.

Declared default: required.

memory_time_stated

Type: Optional[Quantity].

Declared default: None.

data_volume

Type: Optional[Quantity].

Declared default: None.

bandwidth

Type: Optional[Quantity].

Declared default: None.

compute_time_stated

Type: Optional[Quantity].

Declared default: None.

operations

Type: Optional[Quantity].

Declared default: None.

effective_rate

Type: Optional[Quantity].

Declared default: None.

memory_speedup

Type: float.

Declared default: 1.0.

compute_speedup

Type: float.

Declared default: 1.0.

memory_time

engine.scenario_types.IronLawScenario.memory_time

Explicit memory duration, or bytes divided by bandwidth when absent. Equation: memory_time_stated else data_volume / bandwidth. Units: the overhead’s time unit; bandwidth is treated as constant.

compute_time

engine.scenario_types.IronLawScenario.compute_time

Explicit compute duration, or work divided by effective rate when absent. Equation: compute_time_stated else operations / effective_rate. Units: the overhead’s time unit; effective rate is supplied.

upgraded_bandwidth

engine.scenario_types.IronLawScenario.upgraded_bandwidth

Bandwidth after the hypothetical memory-side upgrade. Equation: bandwidth * memory_speedup. Units: bandwidth; other resources remain fixed.

result

engine.scenario_types.IronLawScenario.result

Evaluate this scenario through mlsysim.solvers.IronLawModel.solve. Equation: pass the stated fields to that implementation; its contract defines the calculation and feasibility tests. Units: each returned field follows the referenced result schema; no independent equation is evaluated by this wrapper.

Back to top