Skip to content

Commit 4330d78

Browse files
committed
[mlir] NFC: Fix trivial typo under Dialects
Differential Revision: https://reviews.llvm.org/D78090
1 parent 0312b9f commit 4330d78

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

mlir/docs/Dialects/LLVM.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ llvm-canonical-type ::= <canonical textual representation defined by LLVM>
3232

3333
For example, one can use primitive types `!llvm.i32`, pointer types
3434
`!llvm<"i8*">`, vector types `!llvm<"<4 x float>">` or structure types
35-
`!llvm<"{i32, float}">`. The parsing and printing of the canonical form is
35+
`!llvm<"{i32, float}">`. The parsing and printing of the canonical form are
3636
delegated to the LLVM assembly parser and printer.
3737

3838
LLVM IR dialect types contain an `llvm::Type*` object that can be obtained by
@@ -346,7 +346,7 @@ constants must be created as SSA values before being used in other operations.
346346
`llvm.mlir.constant` creates such values for scalars and vectors. It has a
347347
mandatory `value` attribute, which may be an integer, floating point attribute;
348348
dense or sparse attribute containing integers or floats. The type of the
349-
attribute is one the corresponding MLIR standard types. It may be omitted for
349+
attribute is one of the corresponding MLIR standard types. It may be omitted for
350350
`i64` and `f64` types that are implied. The operation produces a new SSA value
351351
of the specified LLVM IR dialect type. The type of that value _must_ correspond
352352
to the attribute type converted to LLVM IR.

mlir/docs/Dialects/Linalg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ performed on the Linalg IR and that have influenced its design:
2929
1. Tiled Producer-Consumer Fusion with Parametric Tile-And-Fuse.
3030
1. Map to Parallel and Reduction Loops and Hardware.
3131
1. Vectorization: Rewrite in Vector Form.
32-
1. Lower to Loops (Affine, Generic and Parallel).
32+
1. Lower to Loops (Affine, Generic, and Parallel).
3333
1. Lower to Library Calls or Special Instructions, Intrinsics or ISA.
3434
1. Partially Lower to Iterations Over a Finer-Grained Linalg Op.
3535

mlir/docs/Dialects/SPIR-V.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The SPIR-V dialect adopts the following conventions for IR:
7979
* The prefix for all SPIR-V types and operations are `spv.`.
8080
* All instructions in an extended instruction set are further qualified with
8181
the extended instruction set's prefix. For example, all operations in the
82-
GLSL extended instruction set is has the prefix of `spv.GLSL.`.
82+
GLSL extended instruction set have the prefix of `spv.GLSL.`.
8383
* Ops that directly mirror instructions in the specification have `CamelCase`
8484
names that are the same as the instruction opnames (without the `Op`
8585
prefix). For example, `spv.FMul` is a direct mirror of `OpFMul` in the
@@ -93,7 +93,7 @@ The SPIR-V dialect adopts the following conventions for IR:
9393
* Ops with `_snake_case` names are those that have no corresponding
9494
instructions (or concepts) in the binary format. They are introduced to
9595
satisfy MLIR structural requirements. For example, `spv._module_end` and
96-
`spv._merge`. They maps to no instructions during (de)serialization.
96+
`spv._merge`. They map to no instructions during (de)serialization.
9797

9898
(TODO: consider merging the last two cases and adopting `spv.mlir.` prefix for
9999
them.)
@@ -148,7 +148,7 @@ instructions are represented in the SPIR-V dialect:
148148
#### Use MLIR attributes for metadata
149149

150150
* Requirements for capabilities, extensions, extended instruction sets,
151-
addressing model, and memory model is conveyed using `spv.module`
151+
addressing model, and memory model are conveyed using `spv.module`
152152
attributes. This is considered better because these information are for the
153153
execution environment. It's easier to probe them if on the module op itself.
154154
* Annotations/decoration instructions are "folded" into the instructions they
@@ -172,17 +172,17 @@ instructions are represented in the SPIR-V dialect:
172172
* Normal constants are not placed in `spv.module`'s region; they are localized
173173
into functions. This is to make functions in the SPIR-V dialect to be
174174
isolated and explicit capturing. Constants are cheap to duplicate given
175-
attributes are uniqued in `MLIRContext`.
175+
attributes are made unique in `MLIRContext`.
176176

177177
#### Adopt symbol-based global variables and specialization constant
178178

179179
* Global variables are defined with the `spv.globalVariable` op. They do not
180180
generate SSA values. Instead they have symbols and should be referenced via
181-
symbols. To use a global variables in a function block, `spv._address_of` is
182-
needed to turn the symbol into a SSA value.
181+
symbols. To use global variables in a function block, `spv._address_of` is
182+
needed to turn the symbol into an SSA value.
183183
* Specialization constants are defined with the `spv.specConstant` op. Similar
184184
to global variables, they do not generate SSA values and have symbols for
185-
reference, too. `spv._reference_of` is needed to turn the symbol into a SSA
185+
reference, too. `spv._reference_of` is needed to turn the symbol into an SSA
186186
value for use in a function block.
187187

188188
The above choices enables functions in the SPIR-V dialect to be isolated and
@@ -415,13 +415,13 @@ functions or non-SPIR-V operations. `spv.module` verifies these requirements.
415415

416416
A major difference between the SPIR-V dialect and the SPIR-V specification for
417417
functions is that the former are isolated and require explicit capturing, while
418-
the latter allow implicit capturing. In SPIR-V specification, functions can
418+
the latter allows implicit capturing. In SPIR-V specification, functions can
419419
refer to SSA values (generated by constants, global variables, etc.) defined in
420420
modules. The SPIR-V dialect adjusted how constants and global variables are
421421
modeled to enable isolated functions. Isolated functions are more friendly to
422422
compiler analyses and transformations. This also enables the SPIR-V dialect to
423423
better utilize core infrastructure: many functionalities in the core
424-
infrastructure requires ops to be isolated, e.g., the
424+
infrastructure require ops to be isolated, e.g., the
425425
[greedy pattern rewriter][GreedyPatternRewriter] can only act on ops isolated
426426
from above.
427427

@@ -742,23 +742,23 @@ func @foo() -> () {
742742
SPIR-V supports versions, extensions, and capabilities as ways to indicate the
743743
availability of various features (types, ops, enum cases) on target hardware.
744744
For example, non-uniform group operations were missing before v1.3, and they
745-
require special capabilites like `GroupNonUniformArithmetic` to be used. These
745+
require special capabilities like `GroupNonUniformArithmetic` to be used. These
746746
availability information relates to [target environment](#target-environment)
747747
and affects the legality of patterns during dialect conversion.
748748

749749
SPIR-V ops' availability requirements are modeled with
750750
[op interfaces][MlirOpInterface]:
751751

752-
* `QueryMinVersionInterface` and `QueryMaxVersionInterface` for vesion
752+
* `QueryMinVersionInterface` and `QueryMaxVersionInterface` for version
753753
requirements
754754
* `QueryExtensionInterface` for extension requirements
755755
* `QueryCapabilityInterface` for capability requirements
756756

757-
These interface declarations are auto-generated from TableGen defintions
757+
These interface declarations are auto-generated from TableGen definitions
758758
included in [`SPIRVBase.td`][MlirSpirvBase]. At the moment all SPIR-V ops
759-
implements the above interfaces.
759+
implement the above interfaces.
760760

761-
SPIR-V ops' availability implemention methods are automatically synthesized
761+
SPIR-V ops' availability implementation methods are automatically synthesized
762762
from the availability specification on each op and enum attribute in TableGen.
763763
An op needs to look into not only the opcode but also operands to derive its
764764
availability requirements. For example, `spv.ControlBarrier` requires no
@@ -917,9 +917,9 @@ interface.
917917
Although the main objective of the SPIR-V dialect is to act as a proper IR for
918918
compiler transformations, being able to serialize to and deserialize from the
919919
binary format is still very valuable for many good reasons. Serialization
920-
enables the artifacts of SPIR-V compilation to be consumed by a execution
920+
enables the artifacts of SPIR-V compilation to be consumed by an execution
921921
environment; deserialization allows us to import SPIR-V binary modules and run
922-
transformations on them. So serialization and deserialization is supported from
922+
transformations on them. So serialization and deserialization are supported from
923923
the very beginning of the development of the SPIR-V dialect.
924924

925925
The serialization library provides two entry points, `mlir::spirv::serialize()`
@@ -1009,21 +1009,21 @@ Standard scalar types are converted to their corresponding SPIR-V scalar types.
10091009
it will be unconditionally converted to 32-bit. This should be switched to
10101010
properly emulating non-32-bit scalar types.)
10111011

1012-
[Standard index Type][MlirIndexType] need special handling since they are not
1012+
[Standard index type][MlirIndexType] need special handling since they are not
10131013
directly supported in SPIR-V. Currently the `index` type is converted to `i32`.
10141014

10151015
(TODO: Allow for configuring the integer width to use for `index` types in the
10161016
SPIR-V dialect)
10171017

10181018
SPIR-V only supports vectors of 2/3/4 elements; so
1019-
[standard vector types][MlirVectorType] of these length can be converted
1019+
[standard vector types][MlirVectorType] of these lengths can be converted
10201020
directly.
10211021

10221022
(TODO: Convert other vectors of lengths to scalars or arrays)
10231023

10241024
[Standard memref types][MlirMemrefType] with static shape and stride are
10251025
converted to `spv.ptr<spv.struct<spv.array<...>>>`s. The resultant SPIR-V array
1026-
types has the same element type as the source memref and its number of elements
1026+
types have the same element type as the source memref and its number of elements
10271027
is obtained from the layout specification of the memref. The storage class of
10281028
the pointer type are derived from the memref's memory space with
10291029
`SPIRVTypeConverter::getStorageClassForMemorySpace()`.
@@ -1068,7 +1068,7 @@ returns an SSA value generated from an `spv._address_of` operation.
10681068

10691069
### Current conversions to SPIR-V
10701070

1071-
Using the above infrastructure, conversion are implemented from
1071+
Using the above infrastructure, conversions are implemented from
10721072

10731073
* [Standard Dialect][MlirStandardDialect] : Only arithmetic and logical
10741074
operations conversions are implemented.
@@ -1240,7 +1240,7 @@ static LogicalResult verify(spirv::<spirv-op-symbol>Op op);
12401240

12411241
See any such function in [`SPIRVOps.cpp`][MlirSpirvOpsCpp] as an example.
12421242

1243-
If no additional verification is needed, one need to add the following to
1243+
If no additional verification is needed, one needs to add the following to
12441244
the op's Op Definition Spec:
12451245

12461246
```

mlir/docs/Dialects/Vector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ bottom-up abstractions:
4444
intrinsics. This is referred to as the `LLVM` level.
4545
2. Set of machine-specific operations and types that are built to translate
4646
almost 1-1 with the HW ISA. This is referred to as the Hardware Vector level;
47-
a.k.a `HWV`. For instance, we have (a) a `NVVM` dialect (for `CUDA`) with
47+
a.k.a `HWV`. For instance, we have (a) the `NVVM` dialect (for `CUDA`) with
4848
tensor core ops, (b) accelerator-specific dialects (internal), a potential
4949
(future) `CPU` dialect to capture `LLVM` intrinsics more closely and other
5050
dialects for specific hardware. Ideally this should be auto-generated as much

0 commit comments

Comments
 (0)