Skip to content

0.32.2

Choose a tag to compare

@davidkoski davidkoski released this 28 Sep 18:21
· 1 commit to main since this release
2b5e877

IMPORTANT

Use release 0.32.3 -- important patch for #491

Highlights

API Changes Changes

  • Device.deviceType is no longer optional
  • Device equality now compares index
  • Device.gpu and Device.cpu now return the current device per the Stream, e.g. on a multi-gpu CUDA system it might return something other than device 0
  • Stream.gpu and Stream.cpu now return the current GPU or CPU stream (task aware)
  • Stream.defaultStream (new) returns the current stream
  • MLXNN.Lion.betas default values changed (now correct -- matching python)

Deprecations

  • StreamOrDevice.device(_:) → prefer .stream(Stream)
  • Stream.init() and Stream.init(_ device:) → use Stream.withNewDefaultStream
  • Stream.defaultStream(_ device: Device) → use defaultStream(DeviceType) / withNewDefaultStream(Device)
  • Device.setDefaultDevice message tightened: only valid before any mlx resources are created

Behavior Changes

  • tensordot(_:_:axes:) default axes: 1 → 2 (matches Python).
  • nanToNum(posInf:negInf:) defaults 0 → nil (now replaces with dtype max/min, matching Python).
  • linspace now takes dtype:; integer args default to float32 (previously T.dtype), Double args resolve to float32 instead of float64.
  • convolve .same mode: padRight fix for even kernels (padLeft/2 - 1 → padLeft - 1).
  • MLXNN.Pool padding widths fix (was emitting an extra leading/trailing pair).
  • ALiBi.alibiSlope rewritten to match Python for non-power-of-2 head counts; alibiMatrix x2 axis fix (real distance matrix now).
  • GRU: hidden bias bhn now applied when there is no incoming hidden state.
  • Adafactor: uses broadcast instead of matmul (works for rank > 2), and lazily creates state instead of force-unwrapping.
  • Lion: default beta2 0.999 → 0.99.
  • Muon: Newton–Schulz now uses norm/addMM — small numeric drift vs. before.
  • Device/Stream semantics: streams are now pooled and default device/stream are task-local pairs; Device.cpu/.gpu reflect the enclosing withDefaultDevice/withNewDefaultStream scope rather than fixed index-0 devices.

What's Changed

New Contributors

Full Changelog: 0.31.6...0.32.2