FrameRateHeadroomScenario
Training scenarios · Implementation: mlsysim/engine/scenario_definitions/training.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
workload at frame_rate on an accelerator of peak_rate that sustains a utilization_low to utilization_high share of peak; alternative_flops is a heavier model per frame.
Notes
Equation: Stream demand is frame_rate*work_per_frame; sustained supply is peak_rate*utilization.
Assumptions: Constant frame complexity and declared utilization, with no frame dropping.
Excludes: Memory limits, input preprocessing, deadline jitter, and measured sustained efficiency.
References
Derivation: A stream of equally costly frames requires frames/second times FLOPs/frame. Multiplying peak FLOP/s by a declared utilization gives the assumed sustained supply; dividing supply by demand gives dimensionless headroom.
Examples
>>> from mlsysim import Scenarios
>>> s = Scenarios.ResNet50ThirtyFpsStream
>>> s.required_rate.to("GFLOP/s").magnitude > 0
TrueAttributes
| Name | Description |
|---|---|
| alternative_flops | |
| alternative_headroom | Dimensionless lower sustained rate divided by alternative-model demand. |
| alternative_required_rate | Compute demand in TFLOP/s for the alternative model at the same frame rate. |
| flops_per_frame | Registered model inference work per frame, expressed in GFLOP. |
| frame_rate | |
| headroom | Sustained rate at the low utilization over the rate the stream needs. |
| peak_frame_rate | Frames a second if the accelerator ran at peak (the planning mistake). |
| peak_rate | |
| required_rate | Compute demand in GFLOP/s at the configured frame frequency. |
| sustained_high | Available TFLOP/s at the upper assumed utilization. |
| sustained_low | Available TFLOP/s at the lower assumed utilization. |
| utilization_high | |
| utilization_low | |
| workload |
workload
Type: Workload.
Declared default: required.
frame_rate
Type: Quantity.
Declared default: required.
peak_rate
Type: Quantity.
Declared default: required.
utilization_low
Type: float.
Declared default: required.
utilization_high
Type: float.
Declared default: required.
alternative_flops
Type: Quantity.
Declared default: required.
flops_per_frame
engine.scenario_types.FrameRateHeadroomScenario.flops_per_frame
Registered model inference work per frame, expressed in GFLOP.
Equation: workload.inference_flops.to('GFLOP').
required_rate
engine.scenario_types.FrameRateHeadroomScenario.required_rate
Compute demand in GFLOP/s at the configured frame frequency.
Equation: (frame_rate * flops_per_frame).to('GFLOP/s').
sustained_low
engine.scenario_types.FrameRateHeadroomScenario.sustained_low
Available TFLOP/s at the lower assumed utilization.
Equation: (peak_rate * utilization_low).to('TFLOP/s').
sustained_high
engine.scenario_types.FrameRateHeadroomScenario.sustained_high
Available TFLOP/s at the upper assumed utilization.
Equation: (peak_rate * utilization_high).to('TFLOP/s').
headroom
engine.scenario_types.FrameRateHeadroomScenario.headroom
Sustained rate at the low utilization over the rate the stream needs.
Equation: (sustained_low / required_rate).to('').magnitude.
alternative_required_rate
engine.scenario_types.FrameRateHeadroomScenario.alternative_required_rate
Compute demand in TFLOP/s for the alternative model at the same frame rate.
Equation: (frame_rate * alternative_flops).to('TFLOP/s').
alternative_headroom
engine.scenario_types.FrameRateHeadroomScenario.alternative_headroom
Dimensionless lower sustained rate divided by alternative-model demand.
Equation: (sustained_low / alternative_required_rate).to('').magnitude.
peak_frame_rate
engine.scenario_types.FrameRateHeadroomScenario.peak_frame_rate
Frames a second if the accelerator ran at peak (the planning mistake).
Equation: (peak_rate / flops_per_frame).to('1/s').