From 84a9c725742d26df04808a3c7349dbd98684c6cb Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Mon, 11 May 2020 23:03:41 -0700 Subject: [PATCH] Temporarily Revert "[mlir][shape] Tidy up shape.shape_of" as it's breaking a few tests. This reverts commit b6045448869a63dc7da3a4c87c124e85101220d7. Followed up offline with a testcase. --- mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td | 4 +--- mlir/test/Dialect/Shape/ops.mlir | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td b/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td index 3753213..6b64bb7 100644 --- a/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td +++ b/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td @@ -226,14 +226,12 @@ def Shape_ReduceOp : Shape_Op<"reduce", []> { } def Shape_ShapeOfOp : Shape_Op<"shape_of", - [NoSideEffect, DeclareOpInterfaceMethods]> { + [DeclareOpInterfaceMethods]> { let summary = "Returns shape of a value or shaped type operand"; let arguments = (ins AnyTypeOf<[AnyShaped, Shape_ValueShapeType]>:$arg); let results = (outs Shape_ShapeType:$result); - let assemblyFormat = "attr-dict $arg `:` type($arg)"; - let hasFolder = 1; } diff --git a/mlir/test/Dialect/Shape/ops.mlir b/mlir/test/Dialect/Shape/ops.mlir index 81c9afc..5ca3b0f 100644 --- a/mlir/test/Dialect/Shape/ops.mlir +++ b/mlir/test/Dialect/Shape/ops.mlir @@ -62,8 +62,3 @@ func @test_parse_const_shape() { %1 = shape.const_shape [1, 2, 3] return } - -func @test_shape_of(%arg0: tensor) -> !shape.shape { - %0 = shape.shape_of %arg0 : tensor - return %0 : !shape.shape -} -- 2.7.4