Skip to content

Commit 603a8a6

Browse files
committed
[mlir] NFC: fix trivial typos in documents
Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D86563
1 parent ea7b1c7 commit 603a8a6

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

mlir/docs/CAPI.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ for creation functions). For example, `mlirOperationGetNumOperands` inspects an
4545

4646
The *ownership* model is encoded in the naming convention as follows.
4747

48-
- By default, the ownership is not transerred.
49-
- Functions that tranfer the ownership of the result to the caller can be in
48+
- By default, the ownership is not transferred.
49+
- Functions that transfer the ownership of the result to the caller can be in
5050
one of two forms:
5151
* functions that create a new object have the name `mlirXCreate<...>`, for
5252
example, `mlirOperationCreate`;
@@ -127,7 +127,7 @@ stored and perform the copy. There is no guarantee that the pointer supplied to
127127
the callback points to a null-terminated string, the size argument should be
128128
used to find the end of the string. The callback may be called multiple times
129129
with consecutive chunks of the string representation (the printing itself is
130-
bufferred).
130+
buffered).
131131

132132
*Rationale*: this approach allows the caller to have full control of the
133133
allocation and avoid unnecessary allocation and copying inside the printer.
@@ -143,20 +143,20 @@ The API adopts the following patterns for recurrent functionality in MLIR.
143143

144144
An object has an _indexed component_ if it has fields accessible using a
145145
zero-based contiguous integer index, typically arrays. For example, an
146-
`MlirBlock` has its arguments as a indexed component. An object may have several
147-
such components. For example, an `MlirOperation` has attributes, operands,
148-
regions, results and successors.
146+
`MlirBlock` has its arguments as an indexed component. An object may have
147+
several such components. For example, an `MlirOperation` has attributes,
148+
operands, regions, results and successors.
149149

150150
For indexed components, the following pair of functions is provided.
151151

152152
- `intptr_t mlirXGetNum<Y>s(MlirX)` returns the upper bound on the index.
153153
- `MlirY mlirXGet<Y>(MlirX, intptr_t pos)` returns 'pos'-th subobject.
154154

155155
The sizes are accepted and returned as signed pointer-sized integers, i.e.
156-
`intptr_t`. This typedef is avalable in C99.
156+
`intptr_t`. This typedef is available in C99.
157157

158158
Note that the name of subobject in the function does not necessarily match the
159-
type of the subobject. For example, `mlirOperationGetOperand` returns a
159+
type of the subobject. For example, `mlirOperationGetOperand` returns an
160160
`MlirValue`.
161161

162162
### Iterable Components
@@ -190,12 +190,12 @@ for (iter = mlirXGetFirst<Y>(x); !mlirYIsNull(iter);
190190

191191
### Extensions for Dialect Attributes and Types
192192

193-
Dialect attributes and types can follow the example of standard attrbutes and
193+
Dialect attributes and types can follow the example of standard attributes and
194194
types, provided that implementations live in separate directories, i.e.
195195
`include/mlir-c/<...>Dialect/` and `lib/CAPI/<...>Dialect/`. The core APIs
196196
provide implementation-private headers in `include/mlir/CAPI/IR` that allow one
197197
to convert between opaque C structures for core IR components and their C++
198198
counterparts. `wrap` converts a C++ class into a C structure and `unwrap` does
199-
the inverse conversion. Once the a C++ object is available, the API
199+
the inverse conversion. Once the C++ object is available, the API
200200
implementation should rely on `isa` to implement `mlirXIsAY` and is expected to
201201
use `cast` inside other API calls.

mlir/docs/Dialects/Linalg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ to correspond to the operations inside the region: the region can capture
268268
buffers arbitrarily and write into them. If this conflicts with some parallel
269269
iterator requirement, this is undefined behavior.
270270

271-
Previous examples already ellaborate compute payloads with an unregistered function `"some_compute"`. The following code snippet shows what the result will be when using a concrete operation `addf`:
271+
Previous examples already elaborate compute payloads with an unregistered function `"some_compute"`. The following code snippet shows what the result will be when using a concrete operation `addf`:
272272
```
273273
// File name: example3.mlir
274274
#indexing_maps = [

mlir/docs/OpDefinitions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ to convert between the internal storage and the helper method.
10781078

10791079
### Attribute decorators
10801080

1081-
There are a few important attribute adapters/decorators/modifers that can be
1081+
There are a few important attribute adapters/decorators/modifiers that can be
10821082
applied to ODS attributes to specify common additional properties like
10831083
optionality, default values, etc.:
10841084

mlir/docs/Rationale/Rationale.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ operations.
214214
We allow `index` types in tensors and memrefs as a code generation strategy has
215215
to map `index` to an implementation type and hence needs to be able to
216216
materialize corresponding values. However, the target might lack support for
217-
`vector` values with the target specfic equivalent of the `index` type.
217+
`vector` values with the target specific equivalent of the `index` type.
218218

219219
### Bit width of a non-primitive type and `index` is undefined
220220

mlir/docs/SPIRVToLLVMDialectConversion.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ at the moment. Hence, we adhere to the following mapping:
8484
size of the previous struct elements) are **not** supported. In this case,
8585
offsets can be emulated with padding fields (*e.g.* integers). However, such
8686
a design would require index recalculation in the conversion of ops that
87-
involve memmory addressing.
87+
involve memory addressing.
8888

8989
Examples of SPIR-V struct conversion are:
9090
```mlir
@@ -204,7 +204,7 @@ to note:
204204
be:
205205
206206
```mlir
207-
// Zero extending offest after broadcasting
207+
// Zero extending offset after broadcasting
208208
%res_offset = llvm.zext %vec_offset: !llvm.vec<2 x i8> to !llvm.vec<2 x i32>
209209
```
210210
@@ -515,7 +515,7 @@ Also, at the moment initialization is only possible via `spv.constant`.
515515
llvm.store %c, %res : !llvm.ptr<i64>
516516
```
517517

518-
Note that simple conversion to `alloca` may not be sufficent if the code has
518+
Note that simple conversion to `alloca` may not be sufficient if the code has
519519
some scoping. For example, if converting ops executed in a loop into `alloca`s,
520520
a stack overflow may occur. For this case, `stacksave`/`stackrestore` pair can
521521
be used (TODO).
@@ -618,7 +618,7 @@ As well as:
618618

619619
`spv.Branch` and `spv.BranchConditional` are mapped to `llvm.br` and
620620
`llvm.cond_br`. Branch weigths for `spv.BranchConditional` are mapped to
621-
coresponding `branch_weights` attribute of `llvm.cond_br`. When translated to
621+
corresponding `branch_weights` attribute of `llvm.cond_br`. When translated to
622622
proper LLVM, `branch_weights` are converted into LLVM metadata associated with
623623
the conditional branch.
624624

@@ -744,7 +744,7 @@ to LLVM dialect.
744744

745745
### `spv.func`
746746
This op declares or defines a SPIR-V function and it is converted to `llvm.func`.
747-
This conversion handles signarture conversion, and function control attributes
747+
This conversion handles signature conversion, and function control attributes
748748
remapping to LLVM dialect function [`passthrough` attribute](Dialects/LLVM.md#Attribute-pass-through).
749749

750750
The following mapping is used to map [SPIR-V function control](SPIRVFunctionAttributes) to

0 commit comments

Comments
 (0)