You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking issue for the DynamicQuantities × SciML (DiffEq stack) compatibility rollout.
Goal: land a minimal, semantically-correct patch stack across repos to support unitful ODE workflows with DynamicQuantities without type-level zero(::Type{Quantity}) assumptions.
Note: ODE core local test still sees registered DynamicQuantities until the new DQ tag is available; once tag propagates, this should validate on released deps instead of source overrides.
@MilesCranmerBot are the ArrayInterface.jl ones actually optional? I was confused by that comment in the issue body. I remember from the stacked PR discussion we needed it, did we not? Please share any context as necessary.
Yes — for the current DiffEq/OrdinaryDiffEq rollout, the ArrayInterface.jl changes are optional.
Context from the stacked/bundle PR: we initially hit failures because ArrayInterface’s constructors (, , ) allocate caches by calling things like / on the element type. For DynamicQuantities quantities that’s intentionally unsupported ( / are undefined because the dimensions are runtime).
In the final wave-2 plan we avoided relying on those ArrayInterface paths for the ODE stack by moving the unitful linear-solve/factorization handling into the SciML side (DiffEqBase ext: value-space factorization via a bridge, plus ODE init/cache tweaks in OrdinaryDiffEq). With that in place, unitful ODEs don’t require ArrayInterface to know about DQ.
So the ArrayInterface PR would be more of a hardening / ecosystem nicety: it makes not error, which could matter for other packages or less-traveled solver/cache paths. But it’s not a blocker for the main ODE compatibility wave.
Follow-up (my previous comment got mangled by shell backticks):
Yes — for the current DiffEq/OrdinaryDiffEq rollout, the ArrayInterface.jl changes are optional.
Why it came up in the stacked/bundle PR: ArrayInterface’s instance constructors like lu_instance, qr_instance, svd_instance are used for cache allocation and (for some eltypes) they end up calling things like zeros(T, ...) and/or real(T) on the element type T. For DynamicQuantities quantities, zero(::Type{<:Quantity}) / oneunit(::Type{<:Quantity}) are intentionally undefined because the dimensions are runtime-stored.
Why it’s optional now: in the wave-2 plan we avoided relying on those ArrayInterface cache constructors for the main unitful-ODE paths by handling unitful linear solves/factorizations in the SciML side instead (DiffEqBase ext does value-space factorization via a DQUnitlessLU bridge; OrdinaryDiffEqCore avoids type-level identity assumptions during init/caching). With that in place, unitful ODEs don’t require an ArrayInterface patch.
So an ArrayInterface PR would be more of a hardening / ecosystem nicety: it makes ArrayInterface.lu_instance/qr_instance/svd_instance(::Matrix{<:Quantity}) not error, which could matter for other packages or less-traveled solver/cache paths, but it’s not blocking the main ODE compatibility wave.
Activity
MilesCranmerBot commentedon Mar 8, 2026
Wave 1 PR opened: #201
MilesCranmerBot commentedon Mar 8, 2026
Wave 2 downstream PRs are now open:
Note: ODE core local test still sees registered DynamicQuantities until the new DQ tag is available; once tag propagates, this should validate on released deps instead of source overrides.
MilesCranmer commentedon Mar 8, 2026
@MilesCranmerBot are the ArrayInterface.jl ones actually optional? I was confused by that comment in the issue body. I remember from the stacked PR discussion we needed it, did we not? Please share any context as necessary.
MilesCranmerBot commentedon Mar 8, 2026
Yes — for the current DiffEq/OrdinaryDiffEq rollout, the ArrayInterface.jl changes are optional.
Context from the stacked/bundle PR: we initially hit failures because ArrayInterface’s constructors (, , ) allocate caches by calling things like / on the element type. For DynamicQuantities quantities that’s intentionally unsupported ( / are undefined because the dimensions are runtime).
In the final wave-2 plan we avoided relying on those ArrayInterface paths for the ODE stack by moving the unitful linear-solve/factorization handling into the SciML side (DiffEqBase ext: value-space factorization via a bridge, plus ODE init/cache tweaks in OrdinaryDiffEq). With that in place, unitful ODEs don’t require ArrayInterface to know about DQ.
So the ArrayInterface PR would be more of a hardening / ecosystem nicety: it makes not error, which could matter for other packages or less-traveled solver/cache paths. But it’s not a blocker for the main ODE compatibility wave.
(For reference, the proposed ArrayInterface ext was basically this: https://raw.githubusercontent.com/MilesCranmerBot/dqdeq-units-bundle/patches/ArrayInterface/ext/ArrayInterfaceDynamicQuantitiesExt.jl.)
MilesCranmerBot commentedon Mar 8, 2026
Follow-up (my previous comment got mangled by shell backticks):
Yes — for the current DiffEq/OrdinaryDiffEq rollout, the ArrayInterface.jl changes are optional.
Why it came up in the stacked/bundle PR: ArrayInterface’s instance constructors like
lu_instance,qr_instance,svd_instanceare used for cache allocation and (for some eltypes) they end up calling things likezeros(T, ...)and/orreal(T)on the element typeT. For DynamicQuantities quantities,zero(::Type{<:Quantity})/oneunit(::Type{<:Quantity})are intentionally undefined because the dimensions are runtime-stored.Why it’s optional now: in the wave-2 plan we avoided relying on those ArrayInterface cache constructors for the main unitful-ODE paths by handling unitful linear solves/factorizations in the SciML side instead (DiffEqBase ext does value-space factorization via a
DQUnitlessLUbridge; OrdinaryDiffEqCore avoids type-level identity assumptions during init/caching). With that in place, unitful ODEs don’t require an ArrayInterface patch.So an ArrayInterface PR would be more of a hardening / ecosystem nicety: it makes
ArrayInterface.lu_instance/qr_instance/svd_instance(::Matrix{<:Quantity})not error, which could matter for other packages or less-traveled solver/cache paths, but it’s not blocking the main ODE compatibility wave.Reference implementation from the bundle PR: https://raw.githubusercontent.com/MilesCranmerBot/dqdeq-units-bundle/patches/ArrayInterface/ext/ArrayInterfaceDynamicQuantitiesExt.jl