-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
Move forwarddiff
and ignore
to ChainRulesCore.jl?
#716
Comments
|
I have to profess my ignorance here - what's the relationship between ZygoteRules.jl and ChainRulesCore.jl? From the docs, it looks like both are intended for users to want to add AD hints to their code or implement custom gradients for their functions? Will ChainRulesCore replace ZygoteRules eventually? |
ZygoteRules rules are unique to Zygote, while ChainRulesCore rules can in principle be used by any AD (currently Zygote and ForwardDiff2 use them, but I believe others are planned). As for when you should use one vs the other, prefer to use ChainRulesCore unless your rule relies on some Zygote-specific feature like calling |
Thanks for the clarification! Then I guess we'd want to have both the I believe people would definitely be encouraged to add more AD-hinting to their code if that only requires depending on something as lightweight and generic as ChainRulesCore. |
forwarddiff
and ignore
to ZygoteRules.jl?forwarddiff
and ignore
to ChainRulesCore.jl?
@oxinabox what's your opinion on this? I recently found myself in a situation where I need to add |
AFAIK
I won't comment on on this since i don't maintain ZygoteRules, and also strongly recommend wherever possible people stop using it. (using ChainRulesCore instead).
This is something that will become possible once we have |
Just curious - this may change at some point though? Zygote is getting it's own forward-mode diff, I heard?
Ah, right, we certainly wouldn't want a ForwardDiff dependency in there.
Sounds good, thanks! I was asking more for the long term anyhow. |
Would allow people to use hints like
forwarddiff
andignore
more liberally in their code, without adding Zygote itself as a dependency. I opened the same issue on ZygoteRules.jl, since it affects both packages: FluxML/ZygoteRules.jl#9The text was updated successfully, but these errors were encountered: