Skip to main content

ResidualShareScenario

Communication scenarios · Implementation: mlsysim/engine/scenario_definitions/communication.py.

Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.

A residual equal to residual of the one-device step, on devices devices.

Compute divides by N and the residual does not, so the residual’s share of the distributed step, r / ((1 - r)/N + r), is far larger than r: an observed share must not be read as the serial fraction.

Notes

Equation: Compose mlsysim.physics.performance.calc_strong_scaling_speedup.

Assumptions: The residual is a fixed fraction of the one-device step; all remaining work scales inversely with device count.

Excludes: Communication or synchronization overhead that grows with fleet size is absent.

References

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

Examples

>>> from mlsysim import Scenarios
>>> case = Scenarios.ResidualOnePercent512
>>> round(case.step_fraction, 4)
0.0119

Attributes

Name Description
devices
residual
residual_share Residual’s fraction of the shortened distributed step. Equation: residual / | | [speedup](#mlsysim.engine.scenario_types.ResidualShareScenario.speedup) | Strong-scaling speedup with a fixed serial residual. Equation: | | [step_fraction](#mlsysim.engine.scenario_types.ResidualShareScenario.step_fraction) | Scaled step duration relative to one device. Equation:(1 - residual) / devices +

residual

Type: float.

Declared default: required.

devices

Type: int.

Declared default: required.

step_fraction

engine.scenario_types.ResidualShareScenario.step_fraction

Scaled step duration relative to one device. Equation: (1 - residual) / devices + residual. Units: dimensionless; the residual is fixed while remaining work scales ideally.

residual_share

engine.scenario_types.ResidualShareScenario.residual_share

Residual’s fraction of the shortened distributed step. Equation: residual / step_fraction. Units: dimensionless; the original residual fraction is not the scaled fraction.

speedup

engine.scenario_types.ResidualShareScenario.speedup

Strong-scaling speedup with a fixed serial residual. Equation: mlsysim.physics.performance.calc_strong_scaling_speedup(devices, residual). Units: dimensionless; communication growth is excluded.

Back to top