-
Notifications
You must be signed in to change notification settings - Fork 33
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
Adding EnzymeRules #99
Comments
I don't think anyone would be against it. Make it an extension package using v1.9 extensions and there's no dep added here. It's more about getting it done. |
Enzyme rules require v1.7 or above. cc @vchuravy EnzymeCore is designed to be the light flexible package like ChainRules core for importing and adding rules. |
Okay, I'm happy to tackle this once I understand some confusing behavior of complex array rules (see EnzymeAD/Enzyme.jl#744 and EnzymeAD/Enzyme.jl#739 (comment)). Unlike the ChainRules support, I would restrict Enzyme rules to |
A few observations after starting work on this:
|
Why would defining rules for fft/etc cause more work to be done? |
Let me clarify. Let For
We can also define forward-mode rules for |
Similar to the ChainRulesCore support, we could use
EnzymeCore.EnzymeRules
to defineForward
andReverse
mode rules for Enzyme in an extension.EnzymeCore requires at least Julia v1.6. Making it a dependency for Julia versions older than v1.6 (as is done with ChainRulesCore) would then only be possible if AbstractFFTs add a Julia v1.6 version bound. But since EnzymeCore's sole dependency (Adapt) depends on Requires, it may make more sense to conditionally load on pre-v1.9 using Requires.jl: https://pkgdocs.julialang.org/dev/creating-packages/#Requires.jl
Unlike ChainRulesCore support, it probably only makes sense to only define rules for
StridedArray
inputs to avoid doing the wrong thing for sparse or structured arrays.The text was updated successfully, but these errors were encountered: