summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp')
-rw-r--r--mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
index e244542f9b4..835afceb8f2 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
@@ -691,16 +691,18 @@ static void print(OpAsmPrinter &p, TransposeOp op) {
static ParseResult parseTransposeOp(OpAsmParser &parser,
OperationState &result) {
OpAsmParser::OperandType view;
- AffineMapAttr permutation;
+ AffineMap permutation;
MemRefType type;
- return failure(parser.parseOperand(view) ||
- parser.parseAttribute(permutation,
- TransposeOp::getPermutationAttrName(),
- result.attributes) ||
- parser.parseOptionalAttrDict(result.attributes) ||
- parser.parseColonType(type) ||
- parser.resolveOperand(view, type, result.operands) ||
- parser.addTypeToList(type, result.types));
+ if (parser.parseOperand(view) || parser.parseAffineMap(permutation) ||
+ parser.parseOptionalAttrDict(result.attributes) ||
+ parser.parseColonType(type) ||
+ parser.resolveOperand(view, type, result.operands) ||
+ parser.addTypeToList(type, result.types))
+ return failure();
+
+ result.addAttribute(TransposeOp::getPermutationAttrName(),
+ AffineMapAttr::get(permutation));
+ return success();
}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud