-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Derivative lost in 3-arg mul #536
Comments
This is present on 1.7beta and master, but not on 1.6 |
@mcabbott shot in the dark, is this related to JuliaLang/julia#37898? |
That's not good! Yes it's caused by the PR, but I don't know if that's where the bug is. This becomes: julia> ForwardDiff.derivative(x -> sum(LinearAlgebra.mat_mat_scalar(a, b, x)), 0.0)
0.0
julia> ForwardDiff.derivative(x -> sum(LinearAlgebra.mat_mat_scalar(a, b, x)), 2.0)
0.15095195538098594
julia> ForwardDiff.derivative(0.0) do x
c = similar(a, typeof(@show x))
mul!(c, a, b, x, false)
@show sum(c)
end
x = Dual{ForwardDiff.Tag{var"#27#28", Float64}}(0.0,1.0)
sum(c) = Dual{ForwardDiff.Tag{var"#27#28", Float64}}(0.0,0.0)
0.0
The explicit |
That makes sense. So it's just missing somebody to merge #481? |
The text was updated successfully, but these errors were encountered: