-
Notifications
You must be signed in to change notification settings - Fork 89
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
Adds some missing unthunks #282
Conversation
What actually happened in Nabla with that testset, i.e. why did it not pass? I thought the only difference between the current implementation and the new one is that the |
It throws a |
Aha thanks, I think I now see what the comment on testing means. In my own words:
Are such |
It isn't |
How does this break things though? (Not by |
By
By method error when you try and do |
The unthunk in Diagonal was a mistake in Nabla. |
Co-authored-by: Miha Zgubic <mzgubic@users.noreply.github.com>
I am not 100% sure how i feel about this.
Maybe we should actually overload some more linear operators in ChainRulesCore.
Including in particular: the
Diagonal
constructor,and
\
with aVector
But for
svd_rev
because we use some of the inputs multiple times, it is actually faster to unthunk them at the start anyway.I feel like we shouldn't actually have to use any input more than once, but that is another issue.
The testset in Nabla that revealed this was:
I am not sure what is a good way to test this PR.
Do we want to add something to ChainRulesTestUtils that redoes all tests passing in Thunk's of the inputs in as well?
That wouldn't trivially catch Composites.
This is needed for invenia/Nabla.jl#189