Replies: 6 comments
-
The trouble will be the same as for But here it is worse than for |
Beta Was this translation helpful? Give feedback.
-
So I guess there are 2 different use cases here:
It seems like (1) is tricky to support for the reasons in #415 (comment), but (2) should be safe, right? Since with e.g. FiniteDifferences we wouldn't want or need the behavior to change at all, while with operator-overloading ADs we'd want to strip away types and with source-to-source ADs we'd want to tell them to just compile the usual function. |
Beta Was this translation helpful? Give feedback.
-
I guess you're right for 2. Essentially this would only concern
Can you think of any other backend where it would work? |
Beta Was this translation helpful? Give feedback.
-
With Enzyme, I think one could use It should ideally impact all of the operator-overloading ADs as well, at least ForwardDiff, ReverseDiff, and Tracker. Probably Symbolics also. |
Beta Was this translation helpful? Give feedback.
-
Contributions are welcome on this, I'm not yet comfortable enough with metaprogramming to try it alone |
Beta Was this translation helpful? Give feedback.
-
Inactive's semantics are different from chainrules. Marking something as inactive in Enzyme.jl says that both the operation itself doesn't transfer derivative information, but also that no value produced by the function call could not contain differentiable data in the future. e.g. allocating an empty vector would be legal to mark as chainrules inactive, but not enzyme inactive. In that sense enzyme inactive implies chainrules inactive (I think). Enzyme's activity analysis also supports the ability to specify that just the instruction (e.g. function call) doesn't transfer derivative information without discussing the return, but we haven't added syntactic sugar to Julia for that yet. |
Beta Was this translation helpful? Give feedback.
-
This could be implemented in a similar way to
DifferentiateWith
.Beta Was this translation helpful? Give feedback.
All reactions