-
Notifications
You must be signed in to change notification settings - Fork 62
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 BroadcastThunk
#615
Add BroadcastThunk
#615
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #615 +/- ##
==========================================
- Coverage 94.10% 93.03% -1.07%
==========================================
Files 14 14
Lines 899 962 +63
==========================================
+ Hits 846 895 +49
- Misses 53 67 +14
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
This removes most thunks, but turns a `BroadcastThunk` into a `Broadcasted`. | ||
For use in rrules which can handle the latter. | ||
""" | ||
unthunk_or_bc(x) = unthunk(x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe unthunk
should do this on BroadcastedThunks
?
Rather than a seperate function?
idk maybe not since Broadcasted
isn't a linear algrebra type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If your rule used to call unthunk
and get an array, then it may fail if a new kind of thunk doesn't respect that.
Agree it adds complexity to have two unwrap-this functions.
For JuliaDiff/ChainRules.jl#698