-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[HVX] EliminateInterleaves is broken #7100
Comments
Unfortunately, no, I have no thoughts on this. Is this in the category of "always been broken" or do we think it's a new breakage? |
It looks like Dillon changed the behavior ~17 months ago to be less restrictive (it used to require |
I leave it to the judgement of you and @pranavb-ca -- this is outside of my expertise |
Hey, @rootjalex - I looked at this and I think you are right. I couldn't find a counter-example to argue against your change. I can push a change if you want or you could fold it into an upcoming PR if you are planning one imminently. |
Awesome, thanks @pranavb-ca ! I have a small PR to merge with this, I’ll try to make it this week. |
On a benchmark I see the following pattern enter EliminateInterleaves:
The output is:
I understand that EliminateInterleaves is supposed to push
interleave
towards the top of anExpr
, but producing two swizzles from one swizzle seems like it does not follow a good cost model. I think the issue is simple to fix, this line:Halide/src/HexagonOptimize.cpp
Line 1419 in 8f210f1
should probably use a
>
instead of a>=
. I'm only opening this issue in case there's something more complicated that I don't understand happening - otherwise I'll just open a PR to fix this.I also think FuseInterleaves should be merged with EliminateInterleaves, as they seem to essentially perform the same function, but FuseInterleaves only tries to fix widening ops while EliminateInterleaves tries to fix narrowing ops (in the
Call
visitor).@pranavb-ca @steven-johnson
The text was updated successfully, but these errors were encountered: