[PATCH] D76321: [mlir] Add target for Shape dialect

Sean Silva via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 17 14:02:53 PDT 2020


silvas added a comment.

Thanks, this is a good start.



================
Comment at: mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td:223
 
   let arguments = (ins Shape_ShapeType:$lhs, Shape_ShapeType:$rhs);
   let results = (outs Shape_ShapeType:$result);
----------------
Shape_SizeType?


================
Comment at: mlir/lib/Dialect/Shape/IR/Shape.cpp:26-27
+  addTypes<ComponentType, ElementType, ShapeType, SizeType, ValueShapeType>();
+  // Allow unknown operations during testing.
+  allowUnknownOperations();
+}
----------------
Can we remove this? Just use "foo.op" instead of "shape.op" during testing?


================
Comment at: mlir/test/Dialect/Shape/ops.mlir:29
+func @test_broadcastable_fixed() {
+  %0 = "shape.constant"() { value = [10, 1, 57, 92] }: () -> !shape.type
+  %1 = "shape.constant"() { value = [4, 57, 92] }: () -> !shape.type
----------------
Can we use "!shape.shape" it seems a lot more readable to me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76321/new/

https://reviews.llvm.org/D76321





More information about the llvm-commits mailing list