From 0f8d40f0d655db49bddca6d9c1cb3d3577219e6c Mon Sep 17 00:00:00 2001 From: Alexander Belyaev Date: Wed, 10 Jun 2020 21:45:18 +0200 Subject: [PATCH] [mlir][linalg] Add a builder for `linalg.(indexed_)generic`. Differential Revision: https://reviews.llvm.org/D81610 --- .../mlir/Dialect/Linalg/IR/LinalgStructuredOps.td | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td index c13a79087d85..cc7eb5ce9d68 100644 --- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td +++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td @@ -565,6 +565,21 @@ class GenericOpBase : LinalgStructuredBase_Op resultTypes, ValueRange args, " + "int64_t inputCount, int64_t outputCount, " + "ArrayRef indexingMaps, " + "ArrayRef iteratorTypes", [{ + return build(builder, result, resultTypes, args, + builder.getI64IntegerAttr(inputCount), + builder.getI64IntegerAttr(outputCount), + builder.getAffineMapArrayAttr(indexingMaps), + builder.getStrArrayAttr(iteratorTypes), + /*doc=*/nullptr, /*library_call=*/nullptr); + }]>]; + let printer = [{ return ::print(p, *this); }]; let parser = [{ return ::parseGenericOp(parser, result); }]; }