Skip to main content

JacobianScenario

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 full Jacobian of one layer from input_width inputs to output_width outputs.

Reverse-mode differentiation never builds it; it chains vector-Jacobian products.

Notes

Equation: Output width times input width counts entries; entry width converts the count to bytes.

Assumptions: A dense rectangular Jacobian with one stored scalar per input-output pair.

Excludes: Sparse structure and vector-Jacobian product implementations.

References

Derivation: Output width times input width counts entries; entry width converts the count to bytes. Individual property contracts identify the exact accounting expression or reusable calculation. Registry entries supply the scenario inputs; this class does not turn them into measured outcomes.

Examples

Evaluate a named scenario using its declared inputs.

>>> from mlsysim import Scenarios
>>> scenario = Scenarios.Dense100kLayerJacobianFp32
>>> round(float(scenario.elements), 4)
10000000000.0

Attributes

Name Description
bytes_per_value
elements Scalar entry count of the dense output-by-input Jacobian.
input_width
output_width
size Bytes required to materialize every Jacobian entry at the declared value width.

input_width

Type: int.

Declared default: required.

output_width

Type: int.

Declared default: required.

bytes_per_value

Type: Quantity.

Declared default: required.

elements

engine.scenario_types.JacobianScenario.elements

Scalar entry count of the dense output-by-input Jacobian.

Equation: input_width * output_width.

size

engine.scenario_types.JacobianScenario.size

Bytes required to materialize every Jacobian entry at the declared value width.

Equation: (elements * bytes_per_value).to('byte').

Back to top