You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seemingly, Checkpointing might be causing me to get an incorrect derivative with Enzyme. In this folder I have the script wrong_derivative.jl that can be run (will need the whole repo, it's not minimized) and depending on if I use Checkpointing or not I get different derivatives. The script first uses Enzyme to compute the derivative of my code and then compares the result to finite differences
where diffs is the result of using finite differences and enzyme_deriv is the same derivative computed with Enzyme. If I change my code to instead use Checkpointing I see
Seemingly, Checkpointing might be causing me to get an incorrect derivative with Enzyme. In this folder I have the script
wrong_derivative.jl
that can be run (will need the whole repo, it's not minimized) and depending on if I use Checkpointing or not I get different derivatives. The script first uses Enzyme to compute the derivative of my code and then compares the result to finite differencesTo change if Checkpointing is used or not you can change these lines https://github.com/swilliamson7/ShallowWaters.jl/blob/3ee9521e379e24c05738edbce05e8a04d00b88de/wrong_derivative_bug/wrong_derivative.jl#L76-L77. Currently it's setup to not use Checkpointing, which leads to this output:
where
diffs
is the result of using finite differences andenzyme_deriv
is the same derivative computed with Enzyme. If I change my code to instead use Checkpointing I seeand the derivative Enzyme found no longer matches the result of finite differences. Any help to figure out what's happening would be much appreciated!
The text was updated successfully, but these errors were encountered: