Open ArnoStrouwen opened 6 months ago
Is there an internal alias check? Try changing one of the du's to a copy and see if that fixes it. Other than that, I don't think there's a difference in the vjps, but there must be if that is failing
Already tried that before, did not work. I'll have to dive deeper into the code.
Deleting the sensealg keyword in e.g. this tutorial: https://docs.sciml.ai/SciMLSensitivity/dev/examples/optimal_control/optimal_control/ gives the warning that
EnzymeVJP
does not work on the problem. However, manually specifying Enzyme, e.g.InterpolatingAdjoint(autojacvec = EnzymeVJP)
, seems to work fine. The vjp calculation thus differ in the two places?A first weird thing I found was the use of
du
in duplicated. https://github.com/SciML/SciMLSensitivity.jl/blob/master/src/concrete_solve.jl#L19