Skip to content

1.2.1: Soundness and evidence

Latest

Choose a tag to compare

@lukstafi lukstafi released this 04 Dec 16:56
b51194a

From the README:

  • 1.2.1 (released December 4, 2026; beta December 2): Soundness and evidence.
    • Results that were silently wrong now compute or are refused: concatenations that wrote zeros or the wrong operand (gh-ocannl-2017), random draws that repeated values along axes they should fill (gh-ocannl-1961), host writes and optimizer steps a later run would undo (gh-ocannl-2022, gh-ocannl-2027), a CUDA TF32 schedule the tuner could crown with wrong cells (gh-ocannl-2347), and narrow-precision roundings that moved with placement (gh-ocannl-1956). Shape errors name the %op application line and quote the spec as written (gh-ocannl-2164, gh-ocannl-2163).
    • Every narrow value rounds at a stated point: f16 accumulates wide under auto on CUDA and HIP and bf16 on Metal, narrow gradients accumulate wide and round once, and the reproducible profile pins floating-point contraction off on all four backends (gh-ocannl-2195, gh-ocannl-2362, gh-ocannl-1836). On every GPU backend a failure is an error rather than a hang or a silent success (gh-ocannl-2083, gh-ocannl-2134).
    • The untuned Metal training step got much faster on an M4 Max: cifar_resnet from 356 to 54 ms over two paired windows, gpt2_mini_train f32 from 67 to 48 ms (gh-ocannl-2507, gh-ocannl-2506). A search that shipped the untuned default now says so (gh-ocannl-2365, gh-ocannl-2416).
    • Since the beta: the regressions an sm_86 GPU and native Windows turned up are fixed (gh-ocannl-2609, gh-ocannl-2614), and At.( .@[]<- ) writes the value rather than the gradient (gh-ocannl-2650). Not on opam: OCANNL and its satellite packages install from pinned git tags (see Usage); v1.3 is planned as the first release published there. No benchmark was re-run at the release's head.

From the changelog:

Soundness and evidence. The December 2 beta (tag 1.2.1-beta) was a feature freeze, and the final
release adds only dependency pins and regression fixes: the regressions an older NVIDIA GPU
(sm_86) and native Windows turned up on December 2 (gh-ocannl-2609, gh-ocannl-2612,
gh-ocannl-2613, gh-ocannl-2614), and a value setter that wrote the gradient (gh-ocannl-2650).
1.2.1 does not wait for opam and is not submitted there: its satellite packages come from pinned
git tags, and v1.3 is planned as the first release in the opam repository. 637 issues were
completed between 1.2 and the beta, 208 of them in repository tooling. Results that were silently
wrong now compute or are refused: concatenations that wrote zeros or the wrong operand, random
draws that repeated values along axes they should fill, host writes and optimizer steps a later
run would silently undo, a CUDA TF32 schedule the tuner could crown with 393 of 6,144 cells wrong,
Metal miscompiling thread-private bf16 arrays, and a family of integer and narrow-precision
roundings that moved with placement. Every narrow value now rounds at a stated point that
placement, schedule and backend cannot move, and on every GPU backend a failure is an error rather
than a hang or a silent success. Behind the compiler stand an exhaustive inliner oracle (823,764
programs by default, no findings since its first run) and a 2,000-program random sweep of shape
inference against an independent oracle. On an M4 Max, the untuned Metal cifar_resnet step went
from 356 to 54 ms over two paired windows and gpt2_mini_train f32 from 67 to 48 ms, bitwise;
bf16 gpt2_mini_train on CUDA went from 8.86 to 6.93 ms. The nulls: no benchmark was re-run at
this head (the 1.2 tag was re-measured on November 20), tensorized untuned seeding regressed every
GPU and is not adopted, several solver fixes are pinned only on hand-built row stores, and
master's nightly CI has been red since November 16, on test tooling with no diagnosed library
defect (gh-ocannl-2300). Existing code should expect new refusals (see ### Changed), wide f16
accumulation on CUDA and HIP and wide bf16 on Metal under auto, tuned-schedule caches searched
again, and cudajit >= 0.9.0, hipjit >= 0.3.0 and metal >= 0.1.2.

Install: 1.2.1 is not in the opam repository (v1.3 is planned as the first release published there). Pin the tag without installing, then install, so the GPU bindings stay optional:

opam pin add -n git+https://github.com/ahrefs/ocannl.git#1.2.1
opam install neural_nets_lib

The full changelog section, with the Dependencies, Added, Changed, Retired API and Fixed entries, is in CHANGES.md.