-
-
Notifications
You must be signed in to change notification settings - Fork 72
Closed
Description
Hello, I think there should be a workaround for this mwe
using DifferentiationInterface,LinearSolve
import ForwardDiff
function f!(c,b,A,linsolve)
A[1,1] = b[1]
linsolve.A = A
linsolve.b = b
c .= solve!(linsolve).u
return c
end
A = rand(3,3)
b = rand(3)
c = rand(3)
prob = LinearProblem(A, b)
linsolve = init(prob)
jacobian(f!,c,AutoForwardDiff(),b,Cache(A),ConstantOrCache(linsolve))
the reason is doesn't work is pretty clear linsolve.A wants a Matrix{Float64} and we're giving it a Dual, there may be a way using PrealocationTools.jl but I'm not sure how to tell linsolve to use a DiffCache or a Lazy one.
Metadata
Metadata
Assignees
Labels
No labels