[mlir][shape] Generalize broadcast to a variadic number of shapes
authorTres Popp <tpopp@google.com>
Mon, 1 Feb 2021 08:49:54 +0000 (09:49 +0100)
committerTres Popp <tpopp@google.com>
Wed, 10 Feb 2021 07:31:28 +0000 (08:31 +0100)
commitf30f347da1f8b9da231368f37538a8de49768d49
tree526b1efcd59c5cfd16c4838e0010143ea904796f
parent7e75f6fc1d55d96c2abbde10f4aed619bb322956
[mlir][shape] Generalize broadcast to a variadic number of shapes

Previously broadcast was a binary op. Now it can support more inputs.
This has been changed in such a way that for now, this is an NFC for
all broadcast operations that were previously legal.

Differential Revision: https://reviews.llvm.org/D95777
mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
mlir/lib/Dialect/Shape/IR/Shape.cpp
mlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir