This changes the op to produce AnyVectorOfAnyRank following mostly the code for 1-D vectors.
Depends On D114598
Paths
| Differential D114550
[mlir][Vector] Support 0-D vectors in `BroadcastOp` ClosedPublic Authored by michalt on Nov 24 2021, 10:51 AM.
Details Summary This changes the op to produce AnyVectorOfAnyRank following mostly the code for 1-D vectors. Depends On D114598
Diff Detail
Event Timelinemichalt retitled this revision from [mlir][Vector] Support 0-D vectors in `BroadcastOp` to [mlir][Vector] Support 0-D vectors in `BroadcastOp`/`SplatOp`.Nov 24 2021, 11:57 AM Comment Actions Generally looks good, thank you !
This revision now requires changes to proceed.Nov 24 2021, 12:27 PM michalt retitled this revision from [mlir][Vector] Support 0-D vectors in `BroadcastOp`/`SplatOp` to [mlir][Vector] Support 0-D vectors in `BroadcastOp`. Comment Actions LGTM, thanks! This will prob. also need to be rebased since I couldn't land the parent. This revision is now accepted and ready to land.Nov 25 2021, 12:19 PM This revision was landed with ongoing or failed builds.Nov 26 2021, 9:19 AM Closed by commit rG7e65fc9a6009: [mlir][Vector] Support 0-D vectors in `BroadcastOp` (authored by michalt, committed by nicolasvasilache). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 390084 mlir/include/mlir/Dialect/Vector/VectorOps.td
mlir/lib/Dialect/Vector/VectorTransforms.cpp
mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
mlir/test/Integration/Dialect/Vector/CPU/test-0-d-vectors.mlir
|
Not really in practice though: if you forward the 0-d around you will get invalid IR until all possible consumers of broadcast are updated to support 0-d.
I'd drop this micro-optimization.