Skip to content

Commit

Permalink
Update SciMLBaseZygoteExt.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Oct 28, 2023
1 parent 9cb8c14 commit 30c0342
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/SciMLBaseZygoteExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ end
VA[sym, j], ODESolution_getindex_pullback
end

ZygoteRules.@adjoint function DiffEqBase.EnsembleSolution(sim, time, converged)
ZygoteRules.@adjoint function DiffEqBase.EnsembleSolution(sim, time, converged, stats)
out = EnsembleSolution(sim, time, converged)
function EnsembleSolution_adjoint(p̄::AbstractArray{T, N}) where {T, N}
arrarr = [[p̄[ntuple(x -> Colon(), Val(N - 2))..., j, i]

Check warning on line 62 in ext/SciMLBaseZygoteExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/SciMLBaseZygoteExt.jl#L59-L62

Added lines #L59 - L62 were not covered by tests
for j in 1:size(p̄)[end - 1]] for i in 1:size(p̄)[end]]
(EnsembleSolution(arrarr, 0.0, true), nothing, nothing)
(EnsembleSolution(arrarr, 0.0, true), nothing, nothing, nothing)

Check warning on line 64 in ext/SciMLBaseZygoteExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/SciMLBaseZygoteExt.jl#L64

Added line #L64 was not covered by tests
end
function EnsembleSolution_adjoint(p̄::AbstractArray{<:AbstractArray, 1})
(EnsembleSolution(p̄, 0.0, true), nothing, nothing)
(EnsembleSolution(p̄, 0.0, true), nothing, nothing, nothing)

Check warning on line 67 in ext/SciMLBaseZygoteExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/SciMLBaseZygoteExt.jl#L66-L67

Added lines #L66 - L67 were not covered by tests
end
function EnsembleSolution_adjoint(p̄::EnsembleSolution)
(p̄, nothing, nothing)
(p̄, nothing, nothing, nothing)

Check warning on line 70 in ext/SciMLBaseZygoteExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/SciMLBaseZygoteExt.jl#L69-L70

Added lines #L69 - L70 were not covered by tests
end
out, EnsembleSolution_adjoint

Check warning on line 72 in ext/SciMLBaseZygoteExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/SciMLBaseZygoteExt.jl#L72

Added line #L72 was not covered by tests
end
Expand Down

0 comments on commit 30c0342

Please sign in to comment.