-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fused Broadcasting kills constant folding? #39151
Comments
I believe this all stems from the fact that we use the mutable |
For reference, there's also #35675 where some bikeshedding on the name of an immutable variant of From reading those, it seems like a lot of people agree that this would be useful, but no name has been decided on and that's why it's stalled? |
As @MasonProtter mentioned on Slack, instead of
With that information, I suggested using
|
Unfortunately, that would be inappropriate for the broadcast internals themselves because single element tuples a 1 dimensional containers instead of zero dimensional like Ref. There’s some discussion of alternatives here #35778 |
This removes the dependence on inlining for performance, so we also remove `@inline`, since it can harm performance. make Some type a zero-dim broadcast container (e.g. a scalar) Replaces JuliaLang#35778 Replaces JuliaLang#39184 Fixes JuliaLang#39151 Refs JuliaLang#35675 Refs JuliaLang#43200
This removes the dependence on inlining for performance, so we also remove `@inline`, since it can harm performance. make Some type a zero-dim broadcast container (e.g. a scalar) Replaces JuliaLang#35778 Replaces JuliaLang#39184 Fixes JuliaLang#39151 Refs JuliaLang#35675 Refs JuliaLang#43200
This removes the dependence on inlining for performance, so we also remove `@inline`, since it can harm performance. make Some type a zero-dim broadcast container (e.g. a scalar) Replaces JuliaLang#35778 Replaces JuliaLang#39184 Fixes JuliaLang#39151 Refs JuliaLang#35675 Refs JuliaLang#43200
Consider two implementations of the same function
bar2
seems like it is just better,it avoids creating the intermidairy variable, so allows the broadcase to fuse,
and indeed with a plain vector it is:
But with a StaticArray
foo2
is much better.I think what is happening is that something about
foo2
is constant fold-able forStaticArray
s.and that
bar2
isn't.Those number were taken on 1.5., but i saw similar on master
The text was updated successfully, but these errors were encountered: