Skip to content

Changes in Mooncake 0.5.25 that may affect DI users #986

@sunxd3

Description

@sunxd3

Mooncake.jl v0.5.25 is about to be released.

Full changelog:

A few changes in v0.5.25 look relevant to DifferentiationInterface's Mooncake backend:

  • If DI is used with Config(friendly_tangents=true), user-facing cotangents / gradients for structured matrix inputs are no longer returned as Symmetric, Hermitian, or SymTridiagonal. Mooncake now returns a plain Matrix{T} for these cases. This can affect gradient, value_and_gradient, and related pullback outputs that rely on friendly tangents. (#1103)

  • tangent_to_primal!! is deprecated and will be removed in Mooncake 0.6. DI currently uses it in its Mooncake extension, so some DI code paths may emit a deprecation warning until DI is updated. This is mainly relevant when friendly_tangents=true. (#1103)

  • Prepared Mooncake caches are now validated more strictly. Reusing a Mooncake-backed DI prep with different arity, top-level argument types, or array sizes than it was prepared for now throws PreparedCacheSpecError; previous versions could silently return incorrect results. (#1121)

  • Config now has two additional fields: chunk_size::Union{Nothing,Int} and enable_nfwd::Bool. Both have defaults, so Config() and Config(friendly_tangents=true) still work. The compatibility risk is mostly for positional Config(...) construction. enable_nfwd=false is also the new opt-out for the nfwd-backed forward-cache path. (#1111, #1120)

Metadata

Metadata

Assignees

Labels

backendRelated to one or more autodiff backends

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions