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

Defining rrules for high order functions #671

Closed
hack-hard opened this issue May 3, 2024 · 1 comment
Closed

Defining rrules for high order functions #671

hack-hard opened this issue May 3, 2024 · 1 comment

Comments

@hack-hard
Copy link

Hi,
I have read the documentations for defining rrules and I am not sure how to define rrules for high order functions.
For example

gradient(x -> asyncmap(x -> exp(x), x),1:100)

Does not compile in Zygote due to the existence of some try catch clause. How do I implement the rrule?

@oxinabox
Copy link
Member

oxinabox commented May 3, 2024

Answer is at:
https://juliadiff.org/ChainRulesCore.jl/dev/rule_author/superpowers/ruleconfig.html#Writing-rules-that-call-back-into-AD

Though, I suggest that you should probably just update to the newer version of Zygote which supports try-catch clauses.

@oxinabox oxinabox closed this as completed May 3, 2024
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