This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] add pattern to cast away leading unit dim for elementwise op
ClosedPublic

Authored by ThomasRaoux on May 6 2021, 4:39 PM.

Diff Detail

Event Timeline

ThomasRaoux created this revision.May 6 2021, 4:39 PM
ThomasRaoux requested review of this revision.May 6 2021, 4:39 PM
mravishankar accepted this revision.May 6 2021, 10:14 PM

Just one minor typo (unrelated to this change, but good to fix)

mlir/lib/Dialect/Vector/VectorTransforms.cpp
3840

Just noticed typo here CastAwayBrodcastLeadingOneDim -> CastAwayBroadcastLeadingOneDim

This revision is now accepted and ready to land.May 6 2021, 10:14 PM

Fix typo

mlir/lib/Dialect/Vector/VectorTransforms.cpp
3840

Thanks for catching this.

This revision was landed with ongoing or failed builds.May 7 2021, 8:05 AM
This revision was automatically updated to reflect the committed changes.
stella.stamenova added inline comments.
mlir/lib/Dialect/Vector/VectorTransforms.cpp
3791

The default statement that you added in your previous change is causing the following warning:

/mnt/vss/_work/5/s/mlir/lib/Dialect/Vector/VectorTransforms.cpp:3790:7: error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default]
      default:

I am not sure what warning was there before, but there's definitely one now. Can you have a look?

ThomasRaoux added inline comments.May 7 2021, 5:13 PM
mlir/lib/Dialect/Vector/VectorTransforms.cpp
3791

Thanks for pointing that out. Somehow this warning doesn't show up for me locally. This commit should fix it:
https://github.com/llvm/llvm-project/commit/6aaf06f92988c6e2b91f90ab7ed3a6d21981480a