Michael Abbott
Michael Abbott
Not a very careful check, but with the above code, I wasn't sure whether Diagonal{Dual} would be ambiguous. But it seems not to be: ```julia julia> methods(cholesky!) # 19 methods...
Desired answer is all derivatives `-0.04`? If so, this is fixed by https://github.com/JuliaDiff/ForwardDiff.jl/pull/481 which is available on master.
The obvious thing here is `ForwardDiff.gradient(x -> det(ForwardDiff.hessian(g, x)), x)`. Does this fail?
Sorry about breaking things. What's the smallest example you can write of a sort-of user-facing function which will exercise this line? Something which ought to have a derivative.
OK so the "before" picture is ```julia julia> ForwardDiff.derivative(_v->adbesselkxv(_v, 0.25), 2.0) 2.225724617743265 julia> FiniteDifferences.grad(central_fdm(7, 1), _v->adbesselkxv(_v, 0.25), 2.0)[1] 2.225724617743085 (jl_Pl1N2w) pkg> st Status `/private/var/folders/yq/4p2zwd614y59gszh7y9ypyhh0000gn/T/jl_Pl1N2w/Project.toml` ⌃ [432ab697] BesselK v0.5.2 [26cc04aa] FiniteDifferences...
If you have a case which needs a workaround, please please make an issue about it. This `iszero` hack is awful and I don't think we should jump to encouraging...
As it says, FFTW does not support dual numbers. This would need something like #668 to define special methods.
Duplicate of https://github.com/JuliaDiff/ChainRules.jl/pull/578 . That one has some evil tests, which should perhaps be copied here... do they now pass?
Is there a minimal example of what problem this solves? There is some chance that it would be fixed by https://github.com/JuliaDiff/ChainRulesCore.jl/pull/446 , which is really part of the original idea...
I think the reason these weren't added initially is that `sortperm` says "The method accepting dims requires at least Julia 1.9."