Hoist vector slices using rewrite rules#7243
Conversation
This lets us add associative variants more easily, which are helpful in the work on staging strided loads.
|
correctness_intrinsics is giving me an infinite loop: |
The Shuffle visitor wants to sink them
|
Turns out the shuffle visitor wants to sink extract_element calls, and extract_element counts as a degenerate slice_vector, so it was also being hoisted. I restricted my rewrite rules to non-degenerate slice_vectors |
Might be worth adding a comment about this on this above the rules. |
|
Any update on this PR? |
|
If the bots go green it's good to merge. Otherwise I'll need to make time to debug after the siggraph deadline. |
|
How risky do you think this is? Does it need a preflight test inside google? |
|
It's probably worth a preflight test. |
|
At least one failure inside google: EDIT: the mismatched types are |
|
Seems like all of the rules need a check that the lanes of |
|
Good point, that's probably the issue. |
|
(re-requested review so this doesn't accidentally get merged yet) |
|
@steven-johnson Could you check inside Google again, when you have the chance? I think the bug you're seeing should be fixed now. |
|
will do |
|
Running check now. Does this PR need a test? |
Good point. I'll try to find time this afternoon to add a test for the improved hoisting and another one for the bug you found. |
|
Thanks for taking this over, AJ. |
|
Failures seem unrelated? One build failure and a mullapudi2016 issue (#7292). @steven-johnson is performance_inner_loop_parallel sometimes flaky? Or is that something I should investigate? |
|
Both of those are known to be flaky, unfortunately We need to track them down but they aren't related. |
|
Looks clean inside Google. |
* Hoist slices using rewrite rules This lets us add associative variants more easily, which are helpful in the work on staging strided loads. * Don't hoist extract_element shuffles The Shuffle visitor wants to sink them * Add some static asserts * Add explanatory comment on shuffle hoisting * Fix comment * add lanes predicate to slice hoisting * add vector slice hoisting test cases Co-authored-by: Steven Johnson <srj@google.com> Co-authored-by: Alexander <ajroot@stanford.edu>
This lets us add associative variants more easily, which are helpful in the work on staging strided loads.