-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
What is the right way to specify the Enzyme mode? #24
Comments
I haven't been using the |
Me neither I kind of always assume it's reverse mode (which I probably shouldn't) |
Thanks! Since you're maintaining packages that make use of ADTypes.jl, I'd be glad to have your opinion on https://github.com/gdalle/DifferentiationInterface.jl. The gist is "AbstractDifferentiation.jl + ADTypes.jl" |
Another question is what to put inside the AutoEnzyme object, beyond the "mode". Do we need more information to make informed decisions? |
I feel that here it would actually be better for ADTypes to just re export enzyme.reverse/etc when packages have these (they are defined in enzymecore which contains no dependencies and just define enzyme interfaces). I think the fact that this is optional is a rather important misnomer. You wouldn't expect autoforwarddiff to call reverse mode.jl Also just like forward mode has chunking enzyme does as well so there's an ambiguous question of what chunk type you're doing.**** |
It looks great! Some other features already being discussed in JuliaDiff/DifferentiationInterface.jl#26, caching etc and support for sparsity will also be pretty essential for me to consider using it in Optimization.jl |
I feel Having said that the current form does make it hard to subtype it as forward / reverse mode. I think we should split it up into |
@avik-pal There's also another issue with using Enzyme.Reverse as mode, which is that depending on the function (like "value_and_gradient") you may want Enzyme.ReverseWithPrimal instead |
@Vaibhavdixit02 indeed! Cache support is fully there for ForwardDiff and ReverseDiff (with and without compiled tape) already, with a unified interface. FiniteDiff and SparseDiffTools are next on my hit list |
Agreed |
Question❓
The source file says nothing, the test file recommends something but does something else:
What convention is used in the SciML ecosystem? Can it be documented?
The text was updated successfully, but these errors were encountered: