[mlir][Linalg] Add MapOp to Linalg structured ops.
authorAdrian Kuegel <akuegel@google.com>
Wed, 12 Oct 2022 08:18:38 +0000 (10:18 +0200)
committerAdrian Kuegel <akuegel@google.com>
Wed, 12 Oct 2022 11:56:21 +0000 (13:56 +0200)
commit95630b93b00302d3a9b0ea3219235259e5de2109
tree9b42396426e6d26e3c195cbe00448ebd72823e80
parentc1fe52bfa61b569d1cd2146e8c1e49b5fda4b364
[mlir][Linalg] Add MapOp to Linalg structured ops.

This will allow to model elementwise ops with this special op instead of using
GenericOp.
Also allow MapOp and ReduceOp to have no result if the output type is not a tensor.
This is needed for buffer semantics.

Differential Revision: https://reviews.llvm.org/D135754
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/roundtrip.mlir