Closed rejuvyesh closed 2 years ago
Thanks! Absolutely, it's on the ToDo-list and even mentioned as future work in the realted publication. We are currently preparing a larger patch, releasing in about 2-3 weeks together with an update for FMI.jl. We will try to consider this point as well.
Probably, the right way today would be to use AbstractDifferentiation.jl?
@ThummeTo I don't think so. AbstractDifferentiation.jl is more about say switching between Zygote or ForwardDiff or Diffractor that chain together individual rules for function gradients. But here what we are doing is in a sense defining a gradient rule for our function and that should still be ChainRules[Core], I think.
Added ChainRulesCore rrule and frule and ForwardDiff-Fallback in #15
Using
rrule
fromChainRules
would be a lot more general and allow using other AD frameworks than Zygote.