Open baggepinnen opened 1 year ago
With in-place exp!
using ForwardDiff
using ForwardDiffChainRules
@ForwardDiff_frule LinearAlgebra.exp!(x1::AbstractMatrix{<:ForwardDiff.Dual})
foo(x) = sum(LinearAlgebra.exp!(reshape(x, 2, 2)))
v = randn(4)
ForwardDiff.gradient(foo, v)
julia> ForwardDiff.gradient(foo, v)
4-element Vector{Float64}:
1.1002741981700268
1.0554893997879182
0.7951393746830535
0.7605002893053368
A number of functions in this package and in RobustAndOptimalControl.jl fail when trying to compute gradients through them using ForwardDiff or Zygote. This issue tries to summarize the current status
Problematic functions
c2d
:zoh
requiresexp!(::Matrix{Dual})
. ForwardDiffChainRules buggy, but manual implementation possible. #844feedback
try/catch
and@warn
are
hinfnorm
svd/qr/schur
hessenberg
GenericLinearAlgebra.Hessenberg
has different fieldnames fromLinearAlgebra.Hessenberg
c2d
example failingRelated issues: