Skip to content

Commit

Permalink
Fix minor typos in the documentation
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 263805025
  • Loading branch information
MLIR Team authored and tensorflower-gardener committed Aug 16, 2019
1 parent cf35801 commit 3191f9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions mlir/g3doc/Dialects/Affine.md
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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] {
Expand Down Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions mlir/g3doc/LangRef.md
Expand Up @@ -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
```
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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],
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3191f9c

Please sign in to comment.