Whole lectures, as used: every JAX lecture on an Apple CPU, a Turing GPU and an x86 CPU
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 24/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- jupyter-notebook, python
- Ambito
- machine-learning, performance
Direzione di ricerca
Start with lectures/run_lecture.py and the existing lectures/ benchmarks, then check precision/constraints.txt and the lecture sets in lecture-jax and lecture-python.myst. Run each lecture in a fresh process across the listed platforms and precisions, recording per-cell timings and key outputs. Done means results are saved under lectures/results/, the device comparison table identifies dominant cells, and a summary is posted on meta#350.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Run every JAX lecture as a reader or a CI build runs it, on an Apple CPU, a Turing GPU and an x86 CPU, and record where each lecture's time goes. The aim is to know which lectures run faster on a CPU than on the GPU they are built on, and why.
Why
- The first two lectures measured point that way. As written,
aiyagari_jaxran 18× faster onqe-mini1's M6 CPU than on a TITAN RTX, andifp_egm_jax's JAX solve 13× faster (lectures/, #3). Both are bound by launching small kernels and syncing in Python loops, not by arithmetic or memory. - meta#350, question 1: which lectures should default to the CPU in CI.
- Readers run the lectures on laptops. A lecture-by-lecture table of CPU against GPU, with the cells that carry the time, tells the lecture series which lectures need a GPU at all, and which could be restructured.
- It folds in #1's W4, the
sargent_suricoNUTS cell. That lecture can now be run whole, in float32 and float64, on CPU and GPU: the 2 × 2 that lecture-python.myst#1022 could not separate.
Lectures
- All 29 lectures in
lecture-jax, at a fixed commit. That is every lecture exceptintro,status,troubleshootingandzreferences. - The JAX lectures in
lecture-python.myst,sargent_suricoamong them. - Each runs as written. The 13 float64 lectures also run in float32, where the lecture tolerates it (
aiyagari_jaxdoes, slowly; see #3).
Platforms
| Device | Where | When |
|---|---|---|
| M6, 12 cores, 32 GB (CPU) | qe-mini1, with its agents paused |
First |
| TITAN RTX, one card | qe-wharton1-gpu, card 0b:00.0 |
First |
| Threadripper 2990WX (CPU) | qe-wharton1-gpu |
First |
| M5 Pro, 64 GB (CPU) | qe-wharton2 |
Once it is onboarded in infrastructure |
| T4 and its host CPU | RunsOn g4dn.2xlarge, the lectures' CI instance |
Once RunsOn is configured for this repository |
Method
lectures/run_lecture.py: every code cell in one fresh process, compile counted, timed per cell. Three runs per configuration.- One environment per platform, pinned to
precision/constraints.txt's JAX release. Each lecture's imports are installed beforehand, and the runner skips!pip installcells. - Outputs are kept for a cross-device check. Each lecture's key results are recorded with
--record, so that a device or precision that changes the answer is flagged. - Results go to
lectures/results/<host>/<date>/<lecture>/. The dashboard (QuantEcon/project-benchmarks-jax) gets a per-lecture view.
Relation to meta#289
meta#289 tracks lecture build times over releases, on one platform. This is one point in time, across platforms. run_lecture.py's per-cell timings may serve meta#289's tool question.
What the results would change
| If | Then |
|---|---|
| Most lectures run as fast or faster on a recent Mac CPU | The lectures can say so, and CI can run them on CPU instances. That is meta#350's question 1 |
| A lecture's time sits in a few cells | Those cells are candidates for restructuring, which qe:benchmark can assess one lecture at a time |
| A lecture runs much faster on the GPU | It keeps the GPU, and the table says by how much |
Deliverables
- the per-lecture results, under
lectures/results/; - a table of every lecture by device, with the cells that dominate;
- a summary comment on meta#350.
🤖 Generated with Claude Code
- Lingua principale
- Python
- Stelle
- 0
- Fork
- 1
- Merge medio
- 3h 29m
- PR unite (30g)
- 64
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di QuantEcon/benchmarks
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
QuantEcon/benchmarks#78 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
QuantEcon/benchmarks#72 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
P5: Markov chains, starting with the stationary distribution of a savings policy (aiyagari_jax)Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
QuantEcon/benchmarks#47 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
QuantEcon/benchmarks#27 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Float32 fidelity: which float64 lectures need float64, and can the heaviest step drop to float32?Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
QuantEcon/benchmarks#11 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di QuantEcon/benchmarks
Issue simili
-
needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
flashinfer-ai/flashinfer#9803 ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
oscarbol09/thesisforge#61 ·
-
api bug performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
oscarbol09/audiobard#159 ·
-
area:web p2 product:business triage:active type:bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
cuadrao-ai/argus#2328 ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
nikhilb2/simple_invoicing#907 ·