Repository navigation
Phase 0 and Phase 1 results, and two diagnoses - #6
Merged
Merged
Conversation
- results/qe-mini1/2026-10-25.jsonl: Phase 0, the precision matrix on qe-mini1's M6 CPU, with the agents paused (46 rows). - results/qe-wharton1-gpu/2026-10-25.jsonl: Phase 1 on the Threadripper, one TITAN RTX and both cards (120 rows); the CPU under numactl --interleave=all (label interleave, 46 rows); and the whole matrix under jax[cuda12] (label cuda12, 120 rows). - precision/runs/2026-10-25/: the drivers, logs and machine state, and checks/ on why the Kalman filter is ~3.5x slower in float32 than in float64 on the M6. XLA's YNNPACK fusion costs ~1.1 us per small float32 matrix product there, against ~0.16 us in float64. The precision README's caveats now say so, with the flag that turns the fusion off, and give the M6's matrix-unit picture. - lectures/aiyagari_jax/: where float32 goes NaN on the card. JAX's bicgstab breaks down with an infinite alpha that its exact-zero checks miss, and the lecture's loop takes the NaN as convergence. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
It consists mostly of large empirical result/log artifacts and hardware-specific diagnoses that cannot be independently verified in review, so final human sign-off is prudent beyond the minor docstring-filename fixes flagged.
3 open issues
What changed in this PR
This PR adds the first full results of the precision benchmark matrix (from #1/#2) run on 2026-10-25, plus two diagnostic write-ups that came out of those runs. It is purely additive: committed result data, run logs/scripts, and short one-off diagnostic scripts, with documentation tying them together. It feeds the external dashboard once merged.
Changes:
- Commits Phase 0 (M6 CPU,
qe-mini1) results asresults/qe-mini1/2026-10-25.jsonl, with the run driver, log, and machine-state capture underprecision/runs/2026-10-25/. - Diagnoses the M6 Kalman float32 slowdown (XLA
ynn_fusionon small matmuls) withchecks/scripts/output and expandedprecision/README.mdcaveats. - Diagnoses
aiyagari_jax's float32 NaN at a 5,000-point grid (bicgstab breakdown test misses inf/NaN) vianan_check.py,bicgstab_jit_trace.py, and a committed trace.
| File | Description |
|---|---|
results/qe-mini1/2026-10-25.jsonl |
Phase 0 result rows (46); internally consistent with phase0.log |
precision/runs/2026-10-25/README.md |
Run conditions, machine/row summary, skip notes |
precision/runs/2026-10-25/phase1.sh / phase1.log |
GPU-box driver and its full console output |
precision/runs/2026-10-25/phase0.sh / phase0.log / phase0-state.txt |
Mac driver (SIGSTOP/CONT), log, and before/paused/after state |
precision/runs/2026-10-25/checks/ynn.txt |
YNN/XNN fusion timing evidence for the Kalman diagnosis |
precision/runs/2026-10-25/checks/ynn_dot_check.py |
Small-matmul-by-precision probe; usage line names wrong file |
precision/runs/2026-10-25/checks/kalman_ops_check.py |
Per-op Kalman timing probe; usage line names wrong file |
precision/README.md |
Expanded Apple matrix-unit / small-matmul caveats |
lectures/results/.../checks/bicgstab_nan_trace.txt |
Committed step-by-step bicgstab NaN trace |
lectures/aiyagari_jax/README.md |
Documents the two new NaN-diagnosis scripts |
lectures/aiyagari_jax/nan_check.py |
Steps the policy iteration to the first non-finite value |
lectures/aiyagari_jax/bicgstab_jit_trace.py |
Reproduces JAX's bicgstab body; usage line names wrong file |
Review effort: Balanced
The usage lines kept the names the scripts had before they were copied in: bicgstab_trace.py, kalman_check.py and dot_check.py. As Copilot pointed out, the commands as written wouldn't run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The first full runs of #1's precision matrix, from
mainat9bd776a, and two diagnoses that came out of them.precision/runs/2026-10-25/README.mdhas the conditions.What's here
qe-mini1's M6 CPU, agents paused for the 2 minutesqe-wharton1-gpu: the Threadripper, one TITAN RTX (0b:00.0), both cardsinterleavenumactl --interleave=allcuda12jax[cuda12]python precision/summarise.py results/gives the tables. The dashboard (QuantEcon/project-benchmarks-jax) picks these up on its next build once this merges.The float64 cost at a glance
float64 time over float32 time, warm, at the largest sizes:
Two diagnoses
XLA_FLAGS=--xla_cpu_experimental_ynn_fusion_type=removes the gap, but large float32 matmuls then lose up to 2.4×. The rows use the default.precision/runs/2026-10-25/checks/.aiyagari_jax's float32 NaN on the card at a 5,000-point grid (from Lectures run as used: aiyagari_jax and ifp_egm_jax in float32 and float64 #3). JAX'sbicgstabstalls in float32, then at step 46⟨r̂, q⟩rounds to exactly zero. That makesalphainfinite andomegaNaN, which the solver's exact-zero breakdown test misses, so it returns NaN. The lecture'swhile error > tolthen stops, because NaN > tol is false.lectures/aiyagari_jax/nan_check.py,bicgstab_jit_trace.pyandchecks/bicgstab_nan_trace.txt.🤖 Generated with Claude Code