Optimization Scenarios
Execution bottlenecks, hardware utilization, and resource placement.
Source locations
- Inputs and calculations:
mlsysim/engine/scenario_definitions/optimization.py. - Named configurations:
mlsysim/engine/scenario_catalog/optimization/. - Result schemas:
mlsysim/engine/result_types/optimization.py.
Public imports and existing class reference URLs remain stable.
Scenario contracts
- AcceleratedFractionScenario: Amdahl’s law with a path gain set by two rates:
fractionof the baseline time runsaccelerated_rate / baseline_ratetimes faster. - AcceleratorComparison:
candidateagainstbaseline: peak, power, and peak per watt. - AcceleratorGenerationsScenario: Peak compute against memory bandwidth across
accelerators, first to last. - AcceleratorPodScenario: A pod envelope of
pod.chipscopies ofaccelerator: aggregate peak and memory. - AmdahlScenario: A sequential request path whose
stageis madespeeduptimes faster. - ClusterExpansionScenario: A synchronous job grown from
n_devicestofactortimes as many on the same checkpoint tier. - ClusterTrainingTimeScenario: Training
workloadonn_devicesxhardwareat one end-to-end utilization (compute-bound). - CompileBreakevenScenario: Eager against compiled execution: the work that repays
compile_time. - ConvBnReluFusionScenario: A convolution, batch norm, and ReLU on one feature map, run as three kernels or one.
- DailyUploadScenario: A site’s daily captures sent over its uplink inside a working window, against compact summaries.
- DiurnalLendingScenario: A fleet split between a serving reservation and a training base, static against lent.
- DominantShareScenario: Dominant-resource fairness by progressive filling of indivisible
bundlesoncapacity. - ElasticResizeScenario: Three ways to run one job over
window: start small, wait for the full size, or step up. - ElementwiseOpScenario: An element-wise or normalization kernel over
elementsvalues, run unfused. - ExpertWeightTrafficScenario: Weight bytes of the mixture-of-experts
workload, resident and read per token, against a dense model ofdense_parametersthat reads every weight each step. - FrameCompressionScenario: A per-frame model against a camera frame rate: the full model and a channel-pruned variant, run in floating point on the CPU and in integers on the accelerator.
- GrowthGapScenario: Compute doubling every
compute_doubling_periodagainst bandwidth growingbandwidth_growtha year. - HostDispatchScenario: The host’s work to issue one eager step against
device_timeof accelerator work. - HostInputPipelineScenario: A data loader feeding one accelerator over its host link.
- InputSpaceScenario: Every possible input of
dataset’s image shape:levelsvalues per channel element. - IronLawScenario: The iron law’s three terms for one task, and an upgrade to the memory or compute term.
- IterationBudgetScenario: Two teams in one development window: a slow cycle against a fast one, with assumed gains per run.
- JacobianScenario: The full Jacobian of one layer from
input_widthinputs tooutput_widthoutputs. - KernelFusionScenario: A chain of
chain_lengthelement-wise operations, run as one kernel each or fused into one. - LateConstraintScenario: A model built without its deployment limit, the day the limit surfaces, and the repair it forces.
- MatmulTileScenario: C = A B with A
mxkand Bkxn, computed onetile_mxtile_noutput tile at a time, stepping through the reductiontile_kelements per step. - MemoryRoundTripScenario: A tensor of
tensor_bytescrossing to and from memorytripstimes atenergy_per_byte(a layer boundary writes it and the next layer reads it back). - MlpTrainingStepScenario: One eager training step of a one-hidden-layer MLP, operator by operator.
- NodePackingScenario: Jobs of
job_gpusGPUs packed onnodesnodes ofgpus_per_node. - OffloadDeadlineScenario: One input sent over an uplink to a remote model, against a per-frame deadline (lower bound).
- OperationEnergyComparisonScenario: A wide and a narrow format’s energy per add, multiply, and multiply-accumulate, and one memory read against the narrow multiply-accumulate. The narrow MAC accumulates in a wider integer, so its add is
accumulate_add. - ParameterBandwidthGrowthScenario: Dense-model parameter growth against per-device memory-bandwidth growth.
- PeakRatioRangeScenario: One peak rate against a baseline stated as a range,
baseline_lowtobaseline_high. - PipelineSpeedupScenario: Serial pipeline stages; one stage is made
speeduptimes faster (Amdahl’s law). - PreemptionTaxScenario: Forced preemptions of an
n_devicesjob whose checkpoint ischeckpoint_bytes. - QuantizationGridScenario: Values stored on a
bits-bit integer grid over a clipping range. - QuantizedDeploymentProfileScenario: A float model and its INT8 version on one accelerator, judged against acceptance limits.
- QuotaLendingScenario: A team guaranteed
guaranteeGPUs that usesused_shareof them; the rest can be lent. - RooflinePointScenario: A workload of
intensityonhardware’s roofline: attainable rate and share of peak. - ScreeningRequirementsScenario: A screener’s release floors and device budget, with measured slices checked against the floor.
- SelfContainedReplicaScenario: The smallest model replica of
workloadwhose training state fits without sharding. - ServingConsolidationScenario: Small and large serving models on whole devices, exclusive against shared in pairs.
- SingleNodeInferenceScenario: One inference of
workloadonhardware(roofline profile from SingleNodeModel). - SparseFlashFitScenario:
workloadpruned until its surviving values totalsurviving_bytes, stored with oneindex_bytesposition index per value, against aflash_budget. - SpeedupCompositionScenario: Independent paper speedups multiplied together, against the
measuredspeedup. - StagedCompressionScenario: A teacher pruned and distilled into a compact student, then quantized, with the task accuracy after each stage and the loss when quantization comes first.
- SystolicReuseEnergyScenario: Energy per MAC with every operand from off-chip memory, against a systolic array.
- WakeWordFleetScenario: Wake-word detection for a device fleet: stream everything to the cloud, or detect on device.
- WeightReadScenario: Every weight of
workloadread once fromhardware’s memory atbytes_per_weight. - WorkLatencyGapScenario: A cut in work (parameters or FLOPs) against the latency cut it delivered.