-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add defer_within_autodiff
to EnzymeInterpreter
#2254
base: main
Are you sure you want to change the base?
Conversation
src/compiler/interpreter.jl
Outdated
@@ -909,7 +949,7 @@ function abstract_call_known( | |||
|
|||
(; fargs, argtypes) = arginfo | |||
|
|||
if f === Enzyme.within_autodiff | |||
if !(interp.defer_within_autodiff) && f === Enzyme.within_autodiff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary? This fundamentally breaks this functionality?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for a Reactant bug: EnzymeAD/Reactant.jl#442 (comment)
Reason being that Reactant uses EnzymeInterpreter as well, while not necessarily doing autodiff.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2254 +/- ##
==========================================
+ Coverage 67.50% 75.35% +7.84%
==========================================
Files 31 56 +25
Lines 12668 16736 +4068
==========================================
+ Hits 8552 12612 +4060
- Misses 4116 4124 +8 ☔ View full report in Codecov by Sentry. |
@vchuravy can you give this a review before merge |
Seems fine. |
…_autodiff` to no return true during Reactant compilation. When this flag is true, `interp.handler` is responsible for handling within_autodiff, or to toggle defer_within_autodiff to false somewhere down the call chain.
3e37885
to
9f54068
Compare
Together with Reactant pr: EnzymeAD/Reactant.jl#490