Skip to content

Commit 6af275b

Browse files
[mlir][doc] Fix nitpicks in documentation (#114157)
A couple of these are probably up to preference, but the grammar/capitalization changes are probably more critical for readability.
1 parent 68daf7d commit 6af275b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

mlir/docs/Rationale/SideEffectsAndSpeculation.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ When adding a new op, ask:
7979

8080
1. Does it read from or write to the heap or stack? It should probably implement
8181
`MemoryEffectsOpInterface`.
82-
1. Does these side effects ordered? It should probably set the stage of
83-
side effects to make analysis more accurate.
84-
1. Does These side effects act on every single value of resource? It probably
82+
1. Are these side effects ordered? The op should probably set the stage of
83+
side effects to make analyses more accurate.
84+
1. Do these side effects act on every single value of a resource? It probably
8585
should set the FullEffect on effect.
8686
1. Does it have side effects that must be preserved, like a volatile store or a
8787
syscall? It should probably implement `MemoryEffectsOpInterface` and model
@@ -106,9 +106,9 @@ add side effect correctly.
106106

107107
### SIMD compute operation
108108

109-
If we have a SIMD backend dialect with a "simd.abs" operation, which reads all
109+
Consider a SIMD backend dialect with a "simd.abs" operation which reads all
110110
values from the source memref, calculates their absolute values, and writes them
111-
to the target memref.
111+
to the target memref:
112112

113113
```mlir
114114
func.func @abs(%source : memref<10xf32>, %target : memref<10xf32>) {
@@ -139,10 +139,10 @@ A typical approach is as follows:
139139
}
140140
```
141141

142-
In the above example, we attach the side effect [MemReadAt<0, FullEffect>] to
142+
In the above example, we attach the side effect `[MemReadAt<0, FullEffect>]` to
143143
the source, indicating that the abs operation reads each individual value from
144144
the source during stage 0. Likewise, we attach the side effect
145-
[MemWriteAt<1, FullEffect>] to the target, indicating that the abs operation
145+
`[MemWriteAt<1, FullEffect>]` to the target, indicating that the abs operation
146146
writes to each individual value within the target during stage 1 (after reading
147147
from the source).
148148

@@ -174,7 +174,7 @@ A typical approach is as follows:
174174
}
175175
```
176176

177-
In the above example, we attach the side effect [MemReadAt<0, PartialEffect>] to
177+
In the above example, we attach the side effect `[MemReadAt<0, PartialEffect>]` to
178178
the source, indicating that the load operation reads parts of values from the
179179
memref during stage 0. Since side effects typically occur at stage 0 and are
180-
partial by default, we can abbreviate it as "[MemRead]".
180+
partial by default, we can abbreviate it as `[MemRead]`.

0 commit comments

Comments
 (0)