Skip to content

Commit 3266f9c

Browse files
authored
[MLIR] Documentation updates and typo fixes (#125273)
1 parent ccbbb17 commit 3266f9c

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

Diff for: mlir/docs/DefiningDialects/Operations.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ To declare a variadic operand that has a variadic number of sub-ranges, wrap the
248248
`TypeConstraint` for the operand with `VariadicOfVariadic<...,
249249
"<segment-attribute-name>">`.
250250

251-
The second field of the `VariadicOfVariadic` is the name of an `I32ElementsAttr`
251+
The second field of the `VariadicOfVariadic` is the name of a `DenseI32ArrayAttr`
252252
argument that contains the sizes of the variadic sub-ranges. This attribute will
253253
be used when determining the size of sub-ranges, or when updating the size of
254254
sub-ranges.
@@ -906,11 +906,12 @@ declarative parameter to `parse` method argument is detailed below:
906906
- Variadic: `SmallVectorImpl<Type> &`
907907
- VariadicOfVariadic: `SmallVectorImpl<SmallVector<Type>> &`
908908
* `attr-dict` Directive: `NamedAttrList &`
909+
* `prop-dict` Directive: `OperationState &`
909910

910911
When a variable is optional, the value should only be specified if the variable
911912
is present. Otherwise, the value should remain `None` or null.
912913

913-
The arguments to the `print<UserDirective>` method is firstly a reference to the
914+
The arguments to the `print<UserDirective>` method are firstly a reference to the
914915
`OpAsmPrinter`(`OpAsmPrinter &`), second the op (e.g. `FooOp op` which can be
915916
`Operation *op` alternatively), and finally a set of output parameters
916917
corresponding to the parameters specified in the format. The mapping of
@@ -940,6 +941,7 @@ declarative parameter to `print` method argument is detailed below:
940941
- Variadic: `TypeRange`
941942
- VariadicOfVariadic: `TypeRangeRange`
942943
* `attr-dict` Directive: `DictionaryAttr`
944+
* `prop-dict` Directive: `FooOp::Properties`
943945

944946
When a variable is optional, the provided value may be null. When a variable is
945947
referenced in a custom directive parameter using `ref`, it is passed in by

Diff for: mlir/docs/Traits/_index.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ mechanism which abstracts implementation details and properties that are common
88
across many different attributes/operations/types/etc.. `Traits` may be used to
99
specify special properties and constraints of the object, including whether an
1010
operation has side effects or that its output has the same type as the input.
11-
Some examples of operation traits are `Commutative`, `SingleResult`,
12-
`Terminator`, etc. See the more comprehensive list of
13-
[operation traits](#operation-traits-list) below for more examples of what is
14-
possible.
11+
Some examples of operation traits are `Commutative`, `Terminator`, etc. See the
12+
more comprehensive list of [operation traits](#operation-traits-list) below for
13+
more examples of what is possible.
1514

1615
## Defining a Trait
1716

Diff for: mlir/include/mlir/IR/BuiltinAttributeInterfaces.td

+1-1
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def MemRefLayoutAttrInterface : AttrInterface<"MemRefLayoutAttrInterface"> {
481481
Note: the MemRef type's layout is assumed to represent simple strided buffer
482482
layout. For more complicated case, like sparse storage buffers,
483483
it is preferable to use separate type with more specic layout, rather then
484-
introducing extra complexity to the builin MemRef type.
484+
introducing extra complexity to the builtin MemRef type.
485485
}];
486486

487487
let methods = [

Diff for: mlir/lib/IR/SymbolTable.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -808,9 +808,9 @@ static std::optional<SymbolTable::UseRange> getSymbolUsesImpl(SymbolT symbol,
808808
}
809809

810810
/// Get all of the uses of the given symbol that are nested within the given
811-
/// operation 'from', invoking the provided callback for each. This does not
812-
/// traverse into any nested symbol tables. This function returns std::nullopt
813-
/// if there are any unknown operations that may potentially be symbol tables.
811+
/// operation 'from'. This does not traverse into any nested symbol tables.
812+
/// This function returns std::nullopt if there are any unknown operations that
813+
/// may potentially be symbol tables.
814814
auto SymbolTable::getSymbolUses(StringAttr symbol, Operation *from)
815815
-> std::optional<UseRange> {
816816
return getSymbolUsesImpl(symbol, from);

0 commit comments

Comments
 (0)