[PATCH] D80278: [MLIR] Tidy up documentation for `Shape_JoinOp`, `Shape_ReduceOp`, and `Shape_ConstSizeOp`

Frederik Gossen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 28 07:03:55 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGdd484baffdf4: [MLIR] Tidy up documentation for `Shape_JoinOp`, `Shape_ReduceOp`, and… (authored by frgossen).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80278

Files:
  mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td


Index: mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
===================================================================
--- mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
+++ mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
@@ -115,9 +115,9 @@
     [ConstantLike,
      NoSideEffect,
      DeclareOpInterfaceMethods<InferTypeOpInterface>]> {
-  let summary = "Creates a constant of !shape.size type.";
+  let summary = "Creates a constant of type `shape.size`";
   let description = [{
-    Creates a !shape.size type representing the constant size given by `value`.
+    Creates a `shape.size` type representing the constant size given by `value`.
 
     ```mlir
     %x = shape.const_size 10
@@ -217,10 +217,10 @@
 def Shape_JoinOp : Shape_Op<"join", []> {
   let summary = "Returns the least general shape.size of its operands";
   let description = [{
-    An operation that computes the least general shape of input operands. This
-    effectively asserts that corresponding static dimensions are equal. The
-    behavior is to match each element of the `shape.type` and propagate the most
-    restrictive information, returning an invalid shape if there are
+    An operation that computes the least general shape of input operands.
+    This effectively asserts that corresponding static dimensions are equal.
+    The behavior is to match each element of the `shape.shape` and propagate the
+    most restrictive information, returning an invalid shape if there are
     contradictory requirements. E.g., using pseudo code
 
     ```
@@ -238,7 +238,7 @@
     used to return an error to the user upon mismatch of dimensions.
 
     ```mlir
-    %c = shape.join %a, %b, error="<reason>" : !shape.type
+    %c = shape.join %a, %b, error="<reason>" : !shape.shape
     ```
   }];
 
@@ -279,14 +279,14 @@
     number of elements
 
     ```mlir
-    func @shape_num_elements(%shape : !shape.type) -> !shape.size {
+    func @shape_num_elements(%shape : !shape.shape) -> !shape.size {
       %0 = "shape.constant_dim"() {value = 1 : i32} : () -> !shape.size
       %1 = "shape.reduce"(%shape, %0) ( {
         ^bb0(%index: i32, %dim: !shape.size, %lci: !shape.size):
           %acc = "shape.mul"(%lci, %dim) :
             (!shape.size, !shape.size) -> !shape.size
           shape.yield %acc : !shape.size
-        }) : (!shape.type, !shape.size) -> (!shape.size)
+        }) : (!shape.shape, !shape.size) -> (!shape.size)
       return %1 : !shape.size
     }
     ```


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80278.266864.patch
Type: text/x-patch
Size: 2474 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200528/0ce7fbb0/attachment.bin>


More information about the llvm-commits mailing list