[mlir][linalg] Change linalg.broadcast `dimensions` attribute to represent added...
authorOleg Shyshkov <shyshkov@google.com>
Mon, 21 Nov 2022 12:15:50 +0000 (13:15 +0100)
committerOleg Shyshkov <shyshkov@google.com>
Mon, 21 Nov 2022 12:16:41 +0000 (13:16 +0100)
commit3598c24983be90a582cdafb7864e302193c340f4
treeb6ecd173ff9ac558d4e365eaaa961e834f7fb1c6
parent8db98599f16eb9894a2047926cf9090905521197
[mlir][linalg] Change linalg.broadcast `dimensions` attribute to represent added dimensions.

Original [RFC](discourse.llvm.org/t/rfc-primitive-ops-add-broadcastop-to-linalg/66313) defined `dimensions` as a map from input to init, but a discussion in reviews.llvm.org/D138291 concluded that it's more natural for `dimensions` to represent added dims. Also this way is more consistent with `linalg.reduce`.

Differential Revision: https://reviews.llvm.org/D138408
mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
mlir/test/Dialect/Linalg/invalid.mlir
mlir/test/Dialect/Linalg/one-shot-bufferize.mlir
mlir/test/Dialect/Linalg/roundtrip.mlir
mlir/test/Interfaces/TilingInterface/lower-to-loops-using-interface.mlir