Skip to content

mlsysim paper: a measured-energy subsection in the Evaluation - #2216

Merged
profvjreddi merged 1 commit into
harvard-edge:devfrom
prawalpokharel:feat/mlsysim-paper-measured-energy
Nov 24, 2026
Merged

profvjreddi merged 1 commit into
harvard-edge:devfrom
prawalpokharel:feat/mlsysim-paper-measured-energy

Conversation

@prawalpokharel

Copy link
Copy Markdown
Contributor

Summary

This adds the validation subsection I said I would write on #2208. A new "Measured Energy" subsection in the paper's Evaluation compares MLSys·im's two device powers, rated TDP and the proportional rule, with the GPU board energy measured in #2198 and #2208. Every number in it is generated from the committed data and the checked-out package.

Area

  • Book (textbook content, figures, exercises)
  • TinyTorch (modules, tests, milestones)
  • StaffML (interview questions, challenges)
  • Kits (hardware labs)
  • Infrastructure (CI/CD, scripts, config)

Changes

  • paper/paper.tex
    • The new subsection, after Published Benchmarks. It covers:
      • decode, where TDP and the modeled step err in opposite directions and partly cancel, apart from Mixtral at batch 1;
      • device choice, where the H200 wins decode and the modeled-time estimates tie the H100 and H200 in prefill and training;
      • ResNet-50, where TDP over the modeled time picks the A100 because of the declared efficiencies;
      • the spread between boards of one GPU, and the scope.
    • A clause and a sentence in the Evaluation intro, a pointer from Wall 18, and one sentence on measured idle power in Accuracy Scope.
  • paper/scripts/paper_scenarios.py: a new measured_energy().
    • It reads the measured time, energy and power from the committed summaries in paper/data/gpu-energy*.
    • It recomputes the modeled time, FLOP utilization, the four estimates and each estimate's device pick with the in-repo ServingModel and SingleNodeModel, using analyze_gpu_energy.py's own functions. These match the committed summaries to within their six-digit rounding.
    • It raises if one of the text's main statements stops holding, so generate_paper_values.py --check fails. Examples are TDP over the modeled time no longer picking the A100 for ResNet-50, the H100 and H200 no longer tying, and the plans' ResNet-50 efficiencies no longer matching the engine.empirical anchors.
    • One small fix outside the new code: anchor_one()'s source string said efficiency=0.19, while A1_CONFIG uses 0.18. It now prints A1_CONFIG itself, so the comments on the AnchorOneSim* macros say 0.18. No value changes.
  • paper/scripts/generate_paper_values.py: 51 Energy* macros.
  • paper/generated/: regenerated with generate_paper_values.py, the script make values runs. As in mlsysim: measured GPU energy, waiting costs and a calibrated power model #2198, the volatile timing and machine values describe the machine that ran it (Apple M2, 8 cores, Python 3.12), so the Exploration Speed sentence now says Apple M2. A refresh on your usual machine restores it.

The modeled values are the ones you gave on #2208: a decode step of 0.49–0.73, TDP over the modeled step of 0.63–0.99, and a ResNet-50 step of 0.78–0.79 on the A100 and 1.10–1.11 on the H200. The other numbers agree with the data READMEs where those give them, with two differences:

  • Two ranges are wider because the text covers all four tests. The proportional rule gives 0.32–0.47 of the measured decode energy, and idle is 18–23% of TDP, where the workloads README gives 0.32–0.46 and 18–21% for its own test.
  • The seed effect is a different statistic. The text gives the mean absolute change, 1.3% or less per GPU. The seeds README and my mlsysim: measured GPU energy on more workloads, more boards and the H200 #2208 description give the signed mean, which is under 1%.

Three things you may want to look at:

  • ResNet-50 efficiency. Benchmark 1 uses η = 0.18 for ResNet-50 on the A100, and the engine.empirical anchor the plans use is 0.26. At 0.18, TDP over the modeled time gives the A100 the most energy, as the measurements do, and the subsection says so. I didn't change either value.
  • The proportional rule in decode. On these boards decode draws 65–98% of TDP at under 7% FLOP utilization, so the rule gives only 0.32–0.47 of the measured decode energy. Idle is 18–23% of TDP, so the shortfall is in the dynamic term. The text reports this and changes no constant.
  • The mlsysim: measured GPU energy on more workloads, more boards and the H200 #2208 data READMEs. The workloads, boards and seeds READMEs say make publication-check reruns their analyses with --check, and the workloads README says each run's trials.jsonl is committed. Since the rebase into dev, those raw files (63 of them) and the matching publication-check lines are only on my feat/mlsysim-gpu-energy-workloads branch, so those checks can't run in dev. This PR doesn't change that. I can send a small follow-up that either points the READMEs to that branch or restores the checks, whichever you prefer.

The subsection is about 1,100 words. If that's too long for the paper, I can move the board and seed details to the data READMEs and keep a short summary here.

Testing

  • Rendered the book locally (quarto render)
  • Ran tests (pytest tests/)
  • Ran tito module test NN for affected module(s)
  • Manual verification (describe below)

In mlsysim/, on Python 3.12 with the extras CI installs:

  • pytest tests/ passes.
  • generate_paper_values.py --check reports "540 values match", and validate_anchors.py passes.
  • ruff check, calibration_report.py --check and check_modeling_docs.py pass.
  • paper.tex compiles with tectonic and BibTeX, with no undefined macros, citations or references. I don't have the TikZ toolchain, so my build used stand-in figures.

Related Issues

Related to #2198 and #2208.


By submitting this PR, you agree to release your contribution under the project's license.

Compares the energy given by the two device powers mlsysim uses, rated TDP
and the proportional rule TDP x (0.30 + 0.70 u), with the GPU board energy
of the four tests in paper/data/gpu-energy*.

- paper_scenarios.measured_energy(): measured time, energy and power from
  the committed summaries. Modeled time, FLOP utilization, the four
  estimates and each estimate's device pick are recomputed with the in-repo
  ServingModel and SingleNodeModel through analyze_gpu_energy's functions.
  It raises if one of the text's main statements stops holding, so
  --check fails.
- paper_scenarios.anchor_one(): the source string now prints A1_CONFIG,
  which fixes a stale efficiency=0.19. No value changes.
- generate_paper_values: 51 Energy* macros.
- paper.tex: a Measured Energy subsection after Published Benchmarks, a
  pointer in the Evaluation intro, a pointer from Wall 18, and a sentence
  on measured idle power in Accuracy Scope.
- generated/: regenerated with generate_paper_values.py. The volatile
  timing and machine values describe the machine that ran it.
@github-actions github-actions Bot added area: mlsysim Path mlsysim/ — auto-label type: improvement Improve existing content labels Nov 23, 2026
@profvjreddi
profvjreddi merged commit c801e65 into harvard-edge:dev Nov 24, 2026
10 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Thanks @prawalpokharel! 🎉

@prawalpokharel was already credited in mlsysim for: code, doc, test.

The contributor tables are now handled directly by this workflow; no follow-up command is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mlsysim Path mlsysim/ — auto-label type: improvement Improve existing content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants