Fix minor typos in the documentation
authorMLIR Team <no-reply@google.com>
Fri, 16 Aug 2019 18:00:31 +0000 (11:00 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Fri, 16 Aug 2019 18:00:58 +0000 (11:00 -0700)
PiperOrigin-RevId: 263805025

mlir/g3doc/Dialects/Affine.md
mlir/g3doc/LangRef.md

index cb40dc91d57fa0f34f5f8f390997ec74a44e326c..ac1225f97206e06dd47f64cc9c15a2ddbe9b8e9a 100644 (file)
@@ -174,14 +174,14 @@ Examples:
 
 ```mlir {.mlir}
 // Affine map out-of-line definition and usage example.
-#affine_map42 = (d0, d1)[s0] -> (d0, d0 + d1 + floordiv(s0,2))
+#affine_map42 = (d0, d1)[s0] -> (d0, d0 + d1 + s0 floordiv 2)
 
 // Use an affine mapping definition in an alloc operation, binding the
 // SSA value %N to the symbol s0.
 %a = alloc()[%N] : memref<4x4xf32, #affine_map42>
 
 // Same thing with an inline affine mapping definition.
-%b = alloc()[%N] : memref<4x4xf32, (d0, d1)[s0] -> (d0, d0 + d1 + floordiv(s0,2))>
+%b = alloc()[%N] : memref<4x4xf32, (d0, d1)[s0] -> (d0, d0 + d1 + s0 floordiv 2)>
 ```
 
 ### Semi-affine maps
@@ -197,8 +197,8 @@ semi-affine-expr ::= `(` semi-affine-expr `)`
                    | semi-affine-expr `+` semi-affine-expr
                    | semi-affine-expr `-` semi-affine-expr
                    | symbol-or-const `*` semi-affine-expr
-                   | `ceildiv` `(` semi-affine-expr `,` symbol-or-const `)`
-                   | `floordiv` `(` semi-affine-expr `,` symbol-or-const `)`
+                   | semi-affine-expr `ceildiv` symbol-or-const
+                   | semi-affine-expr `floordiv` symbol-or-const
                    | semi-affine-expr `mod` symbol-or-const
                    | bare-id
                    | `-`? integer-literal
@@ -278,7 +278,7 @@ Example:
 ```mlir {.mlir}
 // A example two-dimensional integer set with two symbols.
 #set42 = (d0, d1)[s0, s1]
-   : d0 >= 0, -d0 + s0 - 1 >= 0, d1 >= 0, -d1 + s1 - 1 >= 0
+   : (d0 >= 0, -d0 + s0 - 1 >= 0, d1 >= 0, -d1 + s1 - 1 >= 0)
 
 // Inside a Region
 affine.if #set42(%i, %j)[%M, %N] {
@@ -309,7 +309,7 @@ value. The input operands and result must all have 'index' type.
 Example:
 
 ```mlir {.mlir}
-#map10 = (d0, d1) -> (floordiv(d0,8) + floordiv(d1,128))
+#map10 = (d0, d1) -> (d0 floordiv 8 + d1 floordiv 128)
 ...
 %1 = affine.apply #map10 (%s, %t)
 
index d84ecf3a2849c0732c0b9c6295999d2bba6ca562..f7dc6515a7dd3892c1cea97404ab2a6874565dac 100644 (file)
@@ -373,7 +373,7 @@ tensor-type ::= `tensor` `<` dimension-list tensor-memref-element-type `>`
 tensor-memref-element-type ::= vector-element-type | vector-type
 
 // memref requires a known rank, but tensor does not.
-dimension-list ::= dimension-list-ranked | `*` `x`
+dimension-list ::= dimension-list-ranked | (`*` `x`)
 dimension-list-ranked ::= (dimension `x`)*
 dimension ::= `?` | decimal-literal
 ```
@@ -449,7 +449,7 @@ default space is target specific but always at index 0.
 TODO: MLIR will eventually have target-dialects which allow symbolic use of
 memory hierarchy names (e.g. L3, L2, L1, ...) but we have not spec'd the details
 of that mechanism yet. Until then, this document pretends that it is valid to
-refer to these memories by `bare_id`.
+refer to these memories by `bare-id`.
 
 The notionally dynamic value of a memref value includes the address of the
 buffer allocated, as well as the symbols referred to by the shape, layout map,
@@ -558,7 +558,7 @@ Layout map examples:
 #layout_map_row_major = (i, j) [M, N] -> (i, j) size (M, N)
 
 // MxN matrix stored in column major layout in memory:
-#layout_map_col_major = (i, j), [M, N] -> (j, i) size (M, N)
+#layout_map_col_major = (i, j) [M, N] -> (j, i) size (M, N)
 ```
 
 ##### Affine Map Composition
@@ -804,7 +804,7 @@ corresponding values for the indices.
 Example:
 
 ```mlir {.mlir}
-  sparse<tensor<3x4xi32>, [[0, 0], [1, 2]], [1, 5]>
+  sparse<[[0, 0], [1, 2]], [1, 5]> : tensor<3x4xi32>
 
 // This represents the following tensor:
 ///  [[1, 0, 0, 0],
@@ -839,8 +839,8 @@ An integer-set attribute is an attribute that represents a integer-set object.
 Syntax:
 
 ``` {.ebnf}
-float-attribute ::= float-literal (`:` float-type)?
-                  | hexadecimal-literal `:` float-type
+float-attribute ::= (float-literal (`:` float-type)?)
+                  | (hexadecimal-literal `:` float-type)
 ```
 
 A float attribute is a literal attribute that represents a floating point value