-
Notifications
You must be signed in to change notification settings - Fork 2
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
Correctness issue #44
Comments
The fix should basically just be moving func.val before the if statement |
Same thing for the while loop, presumably |
Should be fixed #45 . Though when doing multilevel checkpointing I still have an issue with the primal. Gotta look into it. |
Hopefully okay now, thank you Michel! I need to check derivatives, but they aren't zero anymore which is good 😊 |
Fingers crossed. Ping me if not! @swilliamson7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checkpointing.jl/src/Rules/EnzymeRules.jl
Line 15 in 5cacc30
@michel2323 this line seems to have a correctness issue. It's not necessarily the cause of a different issue @swilliamson7 and I were debugging, but seems sufficiently bad that it could be the culprit.
In essence you're only running the body of the loop (func.val) if the return is needed. However, if, for example, the return is nothing and the body of the fnuction updates something in place, your rule will tell Enzyme to not execute the original body of the function which is wrong.
cc @vchuravy
The text was updated successfully, but these errors were encountered: