Temporarily Revert "[mlir][shape] Tidy up shape.shape_of" as it's breaking a few...
authorEric Christopher <echristo@gmail.com>
Tue, 12 May 2020 06:03:41 +0000 (23:03 -0700)
committerEric Christopher <echristo@gmail.com>
Tue, 12 May 2020 06:05:18 +0000 (23:05 -0700)
This reverts commit b6045448869a63dc7da3a4c87c124e85101220d7.

Followed up offline with a testcase.

mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
mlir/test/Dialect/Shape/ops.mlir

index 3753213..6b64bb7 100644 (file)
@@ -226,14 +226,12 @@ def Shape_ReduceOp : Shape_Op<"reduce", []> {
 }
 
 def Shape_ShapeOfOp : Shape_Op<"shape_of",
-    [NoSideEffect, DeclareOpInterfaceMethods<InferTypeOpInterface>]> {
+    [DeclareOpInterfaceMethods<InferTypeOpInterface>]> {
   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;
 }
 
index 81c9afc..5ca3b0f 100644 (file)
@@ -62,8 +62,3 @@ func @test_parse_const_shape() {
   %1 = shape.const_shape [1, 2, 3]
   return
 }
-
-func @test_shape_of(%arg0: tensor<?xf32>) -> !shape.shape {
-  %0 = shape.shape_of %arg0 : tensor<?xf32>
-  return %0 : !shape.shape
-}