[mlir][linalg] Add nicer builders for `map` and `reduce`.
authorOleg Shyshkov <shyshkov@google.com>
Thu, 27 Oct 2022 18:48:04 +0000 (20:48 +0200)
committerOleg Shyshkov <shyshkov@google.com>
Fri, 28 Oct 2022 06:51:09 +0000 (08:51 +0200)
commitaebde280476943e58f5bcd9993fdd7e36cdbe47e
tree8335ae62dbcb8aae0176063da5abe342fccaad33
parent89f77be94ff8bcbe3691e7b9a82faee59bd29f11
[mlir][linalg] Add nicer builders for `map` and `reduce`.

The new builders get a list of additional attrs, a lambda to build the region
body and infer return types from `init`.

Differential Revision: https://reviews.llvm.org/D136838
mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp