Skip to content

Commit 23a14e1

Browse files
fix: use Zygote.ZygoteRuleConfig when forwarding adjoint
1 parent a52552c commit 23a14e1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ext/SciMLBaseZygoteExt.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ import SciMLStructures
4141
VA[i, j], ODESolution_getindex_pullback
4242
end
4343

44-
struct ZygoteConfig <: ChainRulesCore.RuleConfig{ChainRulesCore.HasReverseMode} end
45-
4644
@adjoint function Base.getindex(VA::ODESolution, sym, j::Integer)
47-
res, pullback = Zygote.ChainRulesCore.rrule(ZygoteConfig(), getindex, VA, sym, j)
45+
res, pullback = ChainRulesCore.rrule(Zygote.ZygoteRuleConfig(), getindex, VA, sym, j)
4846
return res, Base.tail pullback
4947
end
5048

0 commit comments

Comments
 (0)