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

Add ChainRules rules for certain functions? #58

Open
sethaxen opened this issue Feb 19, 2022 · 2 comments
Open

Add ChainRules rules for certain functions? #58

sethaxen opened this issue Feb 19, 2022 · 2 comments

Comments

@sethaxen
Copy link
Collaborator

It's becoming common in the ecosystem to add ChainRules rules for functions that use features that are problematic or slow for certain AD packages, like mutation, loops, or control flow. Maybe we should do this to, at least to add projections and such. JuliaDiff/ChainRules.jl#540 should probably be finished first.

We already have ChainRulesCore as an indirect dependency via DualNumbers and then SpecialFunctions, so this would not make this package heavier.

@sethaxen
Copy link
Collaborator Author

sethaxen commented Sep 2, 2022

Since JuliaDiff/ChainRules.jl#540 has stalled, we should probably just defensively use ChainRulesCore.@opt_out for functions that we implement and that we know depend on the quaternion product so that ChainRules-compatible ADs don't just silently do the wrong thing here.

@sethaxen
Copy link
Collaborator Author

sethaxen commented Dec 7, 2022

I think this is one of the next things we should do. It involves adding ChainRulesCore as a dependency, but it's already an indirect dependency of much of the ecosystem, so I don't think this is a problem.

I propose also that we implement RealDot.realdot. for quaternions and real numbers, since this is used internally in some ChainRules rules. RealDot has a single function and no dependencies, so this is not an issue.

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

No branches or pull requests

1 participant