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

Improving ChainRules rule usage #191

Closed
willtebbutt opened this issue Jul 2, 2024 · 1 comment
Closed

Improving ChainRules rule usage #191

willtebbutt opened this issue Jul 2, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request high priority

Comments

@willtebbutt
Copy link
Member

willtebbutt commented Jul 2, 2024

The @from_rrule macro which lets you make use of existing ChainRules.rrules to define new Tapir.rrule!!s is quite limited in what inputs it supports. In particular, it permits only

  1. Float64s, and
  2. types which are non-differentiable.

Moreover, the non-differentiable types must be bits types, and the ChainRules.rrule must return the correct type. e.g. it won't work if the ChainRules.rrule returns a Float64 gradient for an Int primal.

One narrow way to extend this would be to assume that we can just return a Tapir.NoRData whenever the primal is a non-differentiable bits type, regardless what the ChainRules.rrule returns.

Motivated by TuringLang/Bijectors.jl#319 (comment) .

@willtebbutt willtebbutt added the enhancement New feature or request label Jul 3, 2024
@willtebbutt willtebbutt self-assigned this Sep 16, 2024
@willtebbutt
Copy link
Member Author

This is addressed by #254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority
Projects
None yet
Development

No branches or pull requests

2 participants