Repository navigation
Whole lectures: float32 against float64, on the TITAN RTX, the Threadripper and both Macs - #16
Conversation
lectures_set.sh takes DTYPES, run_lecture.py's --dtype values run in turn for each lecture on each platform (as-written by default), and LIST, the lectures to run (lectures.txt by default). lectures-float64.txt lists the 13 lectures that set jax_enable_x64, for #4's float32 pass, which runs each in float64 and float32 back to back. mac_lectures.sh passes its arguments to lectures_set.sh. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The 13 float64 lectures in float64 and float32, three times each on each Mac's CPU, from e5b3f8f, with summarise_precision.py to compare them. A check records markov_asset_jax's spectral radius in both precisions, whose stability assertion fails in float32. Home paths that a float32 warning prints are shortened to ~/, and qe-wharton2's state is redacted as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The 13 float64 lectures in float64 and float32, three times each on qe-wharton1-gpu's card and CPU, from e5b3f8f, beside the Macs' runs. Home paths a float32 warning prints are shortened to ~/. summarise_precision.py now skips cells that run a shell command: each lecture's !nvidia-smi prints the date and the card's state, which flagged it as changed on the Linux host. The README gains a section on the pass: float32 is at most 1.21x faster on the card, slower over the set on every device, and changes what several lectures print. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
It commits a large volume of machine-generated benchmark result data across four devices whose correctness cannot be verified by code review, so final human sign-off is warranted even though the small tooling changes look correct.
No open issues 🎉
What changed in this PR
This PR adds the float32 pass for #4: the 13 lecture-jax lectures that enable jax_enable_x64 are each run in float64 and then float32, three times, on four devices (TITAN RTX, Threadripper, M6, M5 Pro). It commits the result JSON under lectures/results/, adds a summarise_precision.py reader, extends the run scripts to iterate precisions, and (per the already-merged README) documents the findings — notably that float32 is slower across these lectures and that markov_asset_jax's stability assertion fails in float32.
Changes:
- New
summarise_precision.pycompares float64/float32 median times and flags cells whose printed numbers move, skipping shell (!) cells. lectures_set.shgainsDTYPESandLISTenv knobs (defaultas-written/lectures.txt) and loops--dtypeper platform;mac_lectures.shnow forwards arguments.- Adds
lectures-float64.txtand the per-device result JSON, pass-state logs, and themarkov_assetspectral-radius check.
| File | Description |
|---|---|
lectures/whole/summarise_precision.py |
New summariser; reuses device_name/expected from summarise_whole, parses numbers with a lookbehind that excludes dtype names, skips shell cells. Logic is sound. |
lectures/whole/lectures_set.sh |
Adds DTYPES/LIST; output/err filenames stay compatible with the *-as-written-*/*-<dtype>-* glob patterns. |
lectures/whole/mac_lectures.sh |
Passes through args to lectures_set.sh; the SIGCONT resume trap is preserved. |
lectures/whole/lectures-float64.txt |
List of the 13 x64 lectures driving the float32 pass. |
lectures/results/** (JSON, *-state.txt, checks/*.txt) |
Committed run artifacts; dates are in the past, commit e5b3f8f is consistent, correctly tracked via .gitignore re-include. |
Review effort: Balanced
# Conflicts: # lectures/whole/README.md
The float32 pass for #4: the 13 lecture-jax lectures that set
jax_enable_x64, each run in float64 and then in float32, three times on each of four devices. The results, and a new section inlectures/whole/README.mdthat reads them.What it shows
hopenhayn)inventory_ssd)hopenhayn)arellano_jax)opt_investandopt_savings_2runs to its 250-loop cap, and inaiyagari_jaxto its 10,000-loop cap at 2 of 50 capital values.markov_asset_jaxfails in float32 on every device: its 15-step power-iteration estimate of the spectral radius comes out at 1.026, so its stability assertion fails, though the exact radius is 0.994.hopenhayn's equilibrium price comes out 12% higher, for one.In this PR
lectures/results/qe-wharton1-gpu/2026-10-25/whole/: 156 runs (13 lectures × card and CPU × two precisions × three), with the pass's log andfloat32-pass-state.txt. Home paths that a float32 warning prints are shortened to~/.summarise_precision.py, from the branch's earlier commit.summarise_precision.pynow skips cells that run a shell command. Each lecture's!nvidia-smiprints the date and the card's state, which flagged it as changed on the Linux host.mainmerged in, with lecture-python.myst's JAX lectures on the M5 Pro #15's lecture-python.myst section. Its README conflicted with this one only where both added text; both sections are kept, the float32 one first.The project-benchmarks-jax dashboard already reads these files: a build from this branch shows all four devices in the lectures page's float32 view.
Run on
qe-wharton1-gpufrom 23:15 UTC on 2026-10-25 to 05:25 UTC on 2026-10-26, card0b:00.0, both cards idle at the start and the end.🤖 Generated with Claude Code