Skip to main content

SingleNodeInferenceScenario

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.

One inference of workload on hardware (roofline profile from SingleNodeModel).

Notes

Equation: Compose mlsysim.solvers.SingleNodeModel.

Assumptions: The generic SingleNodeModel controls work, traffic, and feasibility; optional precision and efficiency override its defaults.

Excludes: The generic activation-traffic heuristic is not a KV-aware serving trace.

References

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

Examples

>>> from mlsysim import Scenarios
>>> case = Scenarios.ResNet50A100Batch1
>>> type(case.result).__name__
'PerformanceProfile'

Attributes

Name Description
batch_size
efficiency
hardware
intensity Inference work per modeled byte moved for the batch. Equation:
precision
result Evaluate this scenario through mlsysim.solvers.SingleNodeModel.solve. Equation: pass
ridge Peak compute-to-bandwidth ratio of the evaluated device profile. Equation:
traffic Memory bytes implied by the generic roofline profile. Equation: ``result.latency_memory
workload

workload

Type: Workload.

Declared default: required.

hardware

Type: HardwareNode.

Declared default: required.

batch_size

Type: int.

Declared default: 1.

precision

Type: Optional[str].

Declared default: None.

efficiency

Type: Optional[float].

Declared default: None.

result

engine.scenario_types.SingleNodeInferenceScenario.result

Evaluate this scenario through mlsysim.solvers.SingleNodeModel.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.

traffic

engine.scenario_types.SingleNodeInferenceScenario.traffic

Memory bytes implied by the generic roofline profile. Equation: result.latency_memory * result.peak_bw_actual. Units: bytes; this inherits the engine’s activation-traffic heuristic rather than a KV trace.

intensity

engine.scenario_types.SingleNodeInferenceScenario.intensity

Inference work per modeled byte moved for the batch. Equation: workload.inference_flops * batch_size / traffic. Units: FLOPs/byte; requires a workload with stated forward work.

ridge

engine.scenario_types.SingleNodeInferenceScenario.ridge

Peak compute-to-bandwidth ratio of the evaluated device profile. Equation: result.peak_flops_actual / result.peak_bw_actual. Units: FLOPs/byte; this is the peak ridge, not an efficiency-adjusted ridge.

Back to top