Skip to content
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

Change Zygote.forwarddiff to ZygoteRules.forwarddiff? #9

Closed
oschulz opened this issue Jun 22, 2020 · 4 comments
Closed

Change Zygote.forwarddiff to ZygoteRules.forwarddiff? #9

oschulz opened this issue Jun 22, 2020 · 4 comments

Comments

@oschulz
Copy link
Contributor

oschulz commented Jun 22, 2020

Would it be possible to have the forwarddiff wrapper/hint in ZygoteRules instead of Zygote, to allow developers to include mixed-mode-diff hinting in functions without depending on Zygote?

@oschulz
Copy link
Contributor Author

oschulz commented Jun 27, 2020

And maybe the same for Zygote.ignore?

@MikeInnes
Copy link
Member

I think ZygoteRules should really be the bare minimum to add rules to Zygote, otherwise it will discourage people from depending on it. But perhaps we could have something like a ZygoteUtils package that has these in.

@oschulz
Copy link
Contributor Author

oschulz commented Jun 29, 2020

But ignore and forwarddiff are extremely lightweight, right? Just the definition, I mean?

@oschulz
Copy link
Contributor Author

oschulz commented Jun 29, 2020

But based on the discussion in FluxML/Zygote.jl#716, I guess ChainRulesCore would probably the best place for it, so users can prepare their functions for autodiff in an engine-independent way? I'll close this issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants