ProtectedMemoryFitScenario
Reliability scenarios · Implementation: mlsysim/engine/scenario_definitions/reliability.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
workload’s weights at bytes_per_weight against hardware’s protected memory (an enclave page cache), before activations.
Notes
Equation: Parameter count times weight width divided by protected capacity gives the storage share.
Assumptions: Weight-only residency in the declared protected-memory capacity.
Excludes: Activations, allocator reserve, enclave metadata, and execution speed.
References
Derivation: Parameter count times weight width divided by protected capacity gives the storage share. 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.ResNet18Fp32InSgxEnclave
>>> round(float(scenario.weight_bytes.magnitude), 4)
46800000.0Attributes
| Name | Description |
|---|---|
| bytes_per_weight | |
| capacity | Protected-memory capacity from the hardware registry, retaining its physical units. |
| capacity_share | Dimensionless weight-storage demand divided by protected-memory capacity; values above |
| hardware | |
| weight_bytes | Parameter-weight storage in bytes at the declared precision; activations and workspace |
| workload |
workload
Type: Workload.
Declared default: required.
hardware
Type: HardwareNode.
Declared default: required.
bytes_per_weight
Type: Quantity.
Declared default: required.
weight_bytes
engine.scenario_types.ProtectedMemoryFitScenario.weight_bytes
Parameter-weight storage in bytes at the declared precision; activations and workspace are excluded.
Equation: memory_from_params(workload.parameters, bytes_per_weight / Q_(1, 'param')).to('byte').
capacity
engine.scenario_types.ProtectedMemoryFitScenario.capacity
Protected-memory capacity from the hardware registry, retaining its physical units.
Equation: hardware.memory.capacity.