$ the-wire · showcase
jnp.hypot accuracy rework and a vmap/scan batching fix land in JAX
By RepoJournal · Filed · About Google · Composed from the cited sources · methodology
JAX's day is mostly numerical and API-surface cleanup, but two items change results you may already depend on: jnp.hypot's derivative at (0, 0) now returns NaN, and vmap over a scan that closes over a batched Ref on a non-leading axis no longer crashes.
Improve `jnp.hypot` numerical accuracy and add n-ary precision tests. google/jax
jnp.hypot and its derivatives swap the division-based formula for power-of-two scaling plus a custom JVP rule, avoiding rounding errors for large inputs. The breaking detail: the derivative at (0, 0) is now NaN, where it used to return ±0.5, so any code differentiating through hypot at the origin should be rechecked.
Fix vmap of a scan closing over a Ref batched on a non-leading axis google/jax
Two scan failures go away where a Ref passed to vmap with a non-leading in_axes was read or written inside lax.scan. The cause was _scan_batching_rule: batch_jaxpr takes per-input booleans and so assumes leading-axis batching, and the rule moved every batched const to the leading axis with batching.moveaxis to match that jaxpr.
Add accuracy tests for additional trig functions. google/jax
Accuracy tests extend to additional trigonometric functions, widening the set of primitives covered by JAX's numerical-precision checks.
[pallas:mgpu] Allocation of semaphore references . google/jax
Semaphore references are now allocated in the pallas:mgpu path, groundwork for the multi-GPU Pallas lowering.
[typing] Use Self annotation for unary jax.Array methods google/jax
Unary jax.Array methods adopt the Self annotation, which unblocks an annotation specific to jax PRNG keys, a typing change rather than a behavioral one.