|
1 | 1 | # CHANGELOG |
2 | 2 |
|
3 | 3 |
|
| 4 | +## v0.13.3 (2026-07-27) |
| 5 | + |
| 6 | +### Performance Improvements |
| 7 | + |
| 8 | +- Remove torch.compile from normalizers (fixes import on Python 3.14) |
| 9 | + ([#361](https://github.com/EleutherAI/bergson/pull/361), |
| 10 | + [`315088c`](https://github.com/EleutherAI/bergson/commit/315088c21fd17c9d2663b5172214688030baf67d)) |
| 11 | + |
| 12 | +* fix: guard torch.compile so bergson imports on Python 3.14 |
| 13 | + |
| 14 | +torch.compile raises RuntimeError at decoration time on interpreters Dynamo doesn't support (Python |
| 15 | + 3.14+ with torch <= 2.9). The normalizers in bergson/gradients.py apply it at import time, so |
| 16 | + importing bergson crashed outright on 3.14. |
| 17 | + |
| 18 | +- Add compile_if_supported: falls back to the eager function with a warning when torch.compile is |
| 19 | + unavailable - Add tests covering the fallback path, including a subprocess test that simulates the |
| 20 | + 3.14 condition on any interpreter - Add an import-py314 CI job that installs bergson on Python |
| 21 | + 3.14 and imports it, catching future import-time regressions |
| 22 | + |
| 23 | +Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
| 24 | + |
| 25 | +* ci: run compile-fallback tests on the Python 3.14 job |
| 26 | + |
| 27 | +* perf: remove torch.compile from normalizers |
| 28 | + |
| 29 | +A100 benchmarks (torch 2.7.1, py3.11) show the compiled normalizers are net slower in the common |
| 30 | + case: ~50us of dynamo guard overhead per call dominates the sub-100us kernels at 768-dim shapes |
| 31 | + and on every bias path, and each run pays 0.3-1.5s compile latency per graph (17 graphs observed |
| 32 | + from bin-packing's varying batch sizes). Compiled kernels only win on very large tensors (up to |
| 33 | + ~2x on [4, 50304, 768] bf16), a regime worth a few percent of end-to-end build time at most, and |
| 34 | + only when --optimizer_state is set. |
| 35 | + |
| 36 | +Removing the decorators also makes bergson importable on Python 3.14, where torch.compile raises at |
| 37 | + decoration time (torch <= 2.9). The import-py314 CI job guards against reintroducing import-time |
| 38 | + compiles. |
| 39 | + |
| 40 | +--------- |
| 41 | + |
| 42 | +Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
| 43 | + |
| 44 | + |
4 | 45 | ## v0.13.2 (2026-07-24) |
5 | 46 |
|
6 | 47 | ### Bug Fixes |
|
0 commit comments