v2.2.0 — 2026-07-14
This release improves language correctness, brings new training features to the
standard library, adds let destructuring, fixes runtime bugs, and improves the
REPL experience.
Language improvements
stop-gradientblocks gradient flow while passing the value through
unchanged, similar tojax.lax.stop_gradient(b77e79a)sin,cos,tan: fully differentiable trigonometric primitives, for RoPE
and sinusoidal position encodings (8e0a2c3)- Destructuring bindings:
(let [[a b] expr] ...)destructures vectors and
tuples directly, including typed function parameters, with no interpreter
fallback (aaa6629, 4016b87, 5a009c3) flipreverses a tensor or list along an axis (6b3905b)transposeaccepts a quoted permutation such as(transpose x '[0 2 1])in
thevalue-and-gradpath (dd0830d)
Standard library additions
adamw-stepandsgd-momentum-stepoptimizers (0acd028)- Learning-rate schedulers:
linear-warmup,inverse-sqrt-warmup(Noam),
exponential-decay,step-decay,cosine-decay(f1724ad) dropout: inverted, differentiable dropout (cce366d)
Runtime
- Removed unnecessary unwrap() calls on infallible writeln! in the MLIR emitter
(9485d03) - A warning is now emitted when a scalar baked into a compiled graph changes
value between calls, instead of failing silently with stale results (4d90969) - Add a build script to build the IREE runtime without depending on the GitHub
workflow (e6a366c)
Performance
- Host tensors are no longer redundantly cloned in the arithmetic builtins and
IREE dispatch path (ensure_host_cow,Cow<ArrayD>) (5c95e8b, 156e00b) random-uniformnow lowers to StableHLO, so compiled functions using it no
longer fall back to the interpreter (c24c1c1)
Bug fixes
io savenow matchesio loadwhen using .safetensors files (184707b)- JIT no longer bakes dict scalars unless required for tensor shapes (ee0c2dc)
defnno longer infinite-loops when a parameter is referenced in its own body
(01f3187)trilno longer panics on a missing argument (3acee0b)scanrejects ambiguous 2-element tensor returns with a clear error instead
of misreading them as a carry/output pair (ad6b4cf)- Runtime vectors of tensors are no longer implicitly stacked into a single
tensor (d1574d9) - The YAML test loader no longer drops multi-line test cases (c599ac7)
REPL