File tree Expand file tree Collapse file tree
lib/ModelingToolkitBase/src/systems Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1503,14 +1503,6 @@ function Base.showerror(io::IO, err::EventsInTimeIndependentSystemError)
15031503end
15041504
15051505function supports_initialization (sys:: System )
1506- # Use `get_jumps` rather than the flattened `jumps`. The two are
1507- # equivalent here because the `isempty(get_systems(sys))` short-circuit
1508- # before this term guarantees the subsystem-flattening branch in
1509- # `jumps(sys)` (which does `copy` + `append!`) is unreachable. The
1510- # mutation in that unreachable branch nevertheless prevents Enzyme from
1511- # proving `sys` is read-only, blocking `Enzyme.gradient` through any
1512- # closure that ends up at `_late_binding_update_u0_p_impl` — including
1513- # `remake(prob; p = repack(tunables))` on MTK-generated problems.
15141506 return isempty (get_systems (sys)) && isempty (get_jumps (sys)) &&
15151507 isempty (get_costs (sys)) && isempty (get_constraints (sys))
15161508end
You can’t perform that action at this time.
0 commit comments