Skip to content

Whole lectures on the T4 runner and its host CPU - #12

Merged
mmcky merged 1 commit into
mainfrom
t4-whole-lectures
Oct 25, 2026
Merged

mmcky merged 1 commit into
mainfrom
t4-whole-lectures

Conversation

@mmcky

@mmcky mmcky commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

The T4 leg of #4: the 28 lecture-jax lectures with code, three runs each on RunsOn's g4dn.2xlarge, on the T4 and on its host Xeon Platinum 8259CL (4 cores, 8 threads, 32 GB). They came from run 40181233548, the job in #10, with the TITAN RTX run's exact packages. All 174 runs exited cleanly.

lectures/whole/README.md gets a section for the question a CI build faces: on the runner the lectures build on, which would be faster with JAX_PLATFORMS=cpu?

T4 Its Xeon
All 28 lectures, median of three 922 s 2,946 s for 27; overborrowing runs out of memory
float64 lectures clearly faster on it (of 13) 7, by 2.0× to 10.9× 3, by 1.4× to 1.8×
All lectures clearly faster on it (of 28) 12 9

The other 7 are within 10%. What the table shows:

  • Precision doesn't decide it. The CPU wins small or sequential work in either precision: training loops (keras, jax_nn, ifp_dl), a jitted function called per agent from Python (schelling_jax), and small models.
  • Building each lecture on the faster of the two would save about 95 s of 922, run one after another. aiyagari_jax, ifp_dl, jax_nn, keras and schelling_jax carry 84 s of it.
  • Building everything on the CPU would take 3.3× as long, and overborrowing would fail. Its cell 31 asks for 33.4 GB on the CPU, where the runner has 32 GB; the T4 runs that cell in 8.4 s.
  • The T4 and the TITAN RTX are close over the set, 922 s and 873 s. The TITAN wins the 7 large lectures, and the T4 the other 21.
  • The runs are sequential. A build runs several notebooks at once on the one T4 or the 8 threads, which this doesn't measure.

Method: the job ran at 8493bbf, which is main with #10's job added, so run_lecture.py and precision/env_info.py are main's. Each lecture ran on the T4, then on the Xeon, before the next, on 2026-10-25 from 09:37 to 12:55 UTC. The run used the current run_lecture.py, which records each cell's tags.

Privacy: the results were scanned before committing. They contain no home paths, addresses, account numbers or credentials; the 12-digit matches are digits of floats in lecture output. The runner uploaded no .err files, since all were empty.

This touches a different part of lectures/whole/README.md from #10, so the two merge in either order.

🤖 Generated with Claude Code

The lecture-jax set from run 40181233548 on RunsOn's g4dn.2xlarge: three
runs of each lecture on the T4 and on its Xeon Platinum 8259CL, with the
TITAN RTX run's packages. lectures/whole/README.md gets a table of the
two, for the question a CI build faces: which lectures would build faster
with JAX_PLATFORMS=cpu on the same runner. overborrowing runs out of
memory on the CPU (33.4 GB asked of 32 GB) and is left out of its total.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 25, 2026 22:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

It is a large drop of generated benchmark artifacts whose numeric correctness is a domain/research judgment and whose full set could not be exhaustively verified here, so final human review is warranted even though the reviewed sample is clean and schema-consistent.

No open issues 🎉

What changed in this PR

This PR commits the T4 leg of issue #4: raw benchmark-result artifacts from running the lecture-jax whole-lecture set on RunsOn's g4dn.2xlarge (a Tesla T4 and its host Xeon Platinum 8259CL), three runs each, interleaved, captured by the run_lectures workflow job from PR #10. The data backs the "The CI runner: the T4 and its own CPU" section of lectures/whole/README.md, which answers meta#350's question 1 (which lectures should build on CPU in CI). The artifacts follow the repository's established lectures/results/<host>/<date>/whole/<lecture>/<platform>-as-written-<run>.json layout and are intentionally tracked (the .gitignore re-includes lectures/results/**/*.json).

Changes:

  • Add per-run result JSON files (one per cell timing, tags, output tail, plus a device/env block) under lectures/results/runson-g4dn.2xlarge/2026-10-25/whole/<lecture>/ for the T4 (cuda) and its host CPU (cpu).
  • Add environment.txt recording the exact package set used (matching the TITAN RTX run's versions).
File Description
.../​whole/​environment.txt Pinned package list for the runner; versions match the referenced TITAN RTX environment (only cosmetic pip name normalization differs).
.../​whole/​schelling_{shocks,python,numpy,jax,jax_parallel}/​{cuda,cpu}-as-written-{1,2,3}.json Per-run timings for the Schelling lectures on T4 and host CPU.
.../​whole/​{lucas_model_jax,kesten_processes_jax,inventory_ssd,ifp_egm_jax}/​{cuda,cpu}-as-written-*.json Per-run timings for these JAX lectures; consistent with README medians/heaviest cells.
.../​whole/​keras/​{cuda,cpu}-as-written-{1,2,3}.json Keras training-loop timings (a CPU-favoring case per the analysis).
.../​whole/​about_jax/​{cuda,cpu}-as-written-{1,2,3}.json Empty-cell results (lecture has no code cells), matching the existing TITAN RTX schema.

Review effort: Balanced

@mmcky
mmcky merged commit d457626 into main Oct 25, 2026
1 check passed
@mmcky
mmcky deleted the t4-whole-lectures branch October 25, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants