Registering Analytical Derivative with ReverseDiff/ForwardDiff


Is there a way to register a derivative function similar to JuMP’s usage in ForwardDiff or ReverseDiff? I have a small function which solves a simple optimization problem using svd, which isn’t automatically differentiated. But I do know the derivative due to the original formulation.

#2 perhaps?


It seems like that would be exactly what I’m looking for. I’ve requested a status update since it does not seem to be merged with the ForwardDiff package yet.


I’m currently looking into using DiffRules.@define_diffrule since I believe FowardDiff and ReverseDiff fall back on these rules?


Yes, that PR might be replaced with those new stuff in DiffRules.