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

Calling pullback twice in test_rrule #265

Closed
mzgubic opened this issue Oct 21, 2022 · 1 comment
Closed

Calling pullback twice in test_rrule #265

mzgubic opened this issue Oct 21, 2022 · 1 comment

Comments

@mzgubic
Copy link
Member

mzgubic commented Oct 21, 2022

Our implementation of test_rrule calls pullback twice: once with the tangent to the primal output, and once with the thunk of the tangent.

Should we be doing this?

If the following conjecture is right:

The pullback is only ever called once when doing first-order AD. I.e. there is never a situation when a pullback is reused and called twice.

Then we are probably overly restrictive, as rules like #264 will not be able to be tested even if they are written with RuleConfigs that specify mutation must be supported.

But there might be a simple example to show the above conjecture is wrong, and then the status quo is fine.

@mzgubic
Copy link
Member Author

mzgubic commented Oct 21, 2022

From slack, by @oxinabox

Being able to do so is useful for computing Jacobean of functions with multiple outputs.

@mzgubic mzgubic closed this as completed Oct 21, 2022
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

1 participant