aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zinenko <zinenko@google.com>2022-07-12 09:17:36 +0000
committerAlex Zinenko <zinenko@google.com>2022-07-12 09:18:51 +0000
commit80e17355cd37d0c8dcd61b1ce52a242f3f1caa8f (patch)
tree34ee47ad5d3b1a3d2212cfccd22ba172d1d89968
parentd1e9d0b27f3a59f80787bfe5cf10d4373275c477 (diff)
downloadllvm-80e17355cd37d0c8dcd61b1ce52a242f3f1caa8f.zip
llvm-80e17355cd37d0c8dcd61b1ce52a242f3f1caa8f.tar.gz
llvm-80e17355cd37d0c8dcd61b1ce52a242f3f1caa8f.tar.bz2
[mlir] assorted fixes in transform dialect documentation
Various typos and formatting fixes that make the generated documentation hard to follow.
-rw-r--r--mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td40
-rw-r--r--mlir/include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td12
-rw-r--r--mlir/include/mlir/Dialect/Transform/IR/TransformOps.td16
3 files changed, 34 insertions, 34 deletions
diff --git a/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td b/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
index 5c8c203..003d2eb 100644
--- a/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
+++ b/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
@@ -24,8 +24,8 @@ def DecomposeOp : Op<Transform_Dialect, "structured.decompose",
(depthwise) convolutions, into combinations of lower-dimensional equivalents
when possible.
- Return modes:
- =============
+ #### Return modes
+
This operation ignores non-Linalg ops and drops them in the return.
If all the operations referred to by the `target` PDLOperation decompose
properly, the transform succeeds. Otherwise the transform silently fails.
@@ -68,11 +68,11 @@ def GeneralizeOp : Op<Transform_Dialect, "structured.generalize",
[FunctionalStyleTransformOpTrait, MemoryEffectsOpInterface,
TransformOpInterface, TransformEachOpTrait]> {
let description = [{
- Transforms a named structued operation into the generic form with the
+ Transforms a named structured operation into the generic form with the
explicit attached region.
- Return modes:
- =============
+ #### Return modes
+
This operation ignores non-Linalg ops and drops them in the return.
If all the operations referred to by the `target` PDLOperation generalize
properly, the transform succeeds. Otherwise the transform silently fails.
@@ -100,8 +100,8 @@ def InterchangeOp : Op<Transform_Dialect, "structured.interchange",
Interchanges the iterators of the operations pointed to by the target handle
using the iterator interchange attribute.
- Return modes:
- =============
+ #### Return modes
+
This operation ignores non-linalg::Generic ops and drops them in the return.
This operation fails if the interchange attribute is invalid.
If all the operations referred to by the `target` PDLOperation interchange
@@ -134,8 +134,8 @@ def PadOp : Op<Transform_Dialect, "structured.pad",
Pads the operations pointed to by the target handle using the options
provides as operation attributes.
- Return modes:
- =============
+ #### Return modes
+
This operation ignores non-Linalg ops and drops them in the return.
This operation may produce a definiteFailure if the padding fails for any
reason.
@@ -174,8 +174,8 @@ def ScalarizeOp : Op<Transform_Dialect, "structured.scalarize",
Indicates that ops of a specific kind in the given function should be
scalarized (i.e. their dynamic dimensions tiled by 1).
- Return modes:
- =============
+ #### Return modes:
+
This operation ignores non-Linalg ops and drops them in the return.
This operation produces `definiteFailure` if the scalarization fails for any
reason.
@@ -259,8 +259,8 @@ def SplitReductionOp : Op<Transform_Dialect, "structured.split_reduction",
- use_alloc: whether to use an alloc op to allocate the temporary
tensor (default: do not use alloc op)
- Return modes:
- =============
+ #### Return modes
+
This operation ignores non-Linalg ops and drops them in the return.
This operation produces `definiteFailure` if the splitting fails for any
reason.
@@ -275,8 +275,8 @@ def SplitReductionOp : Op<Transform_Dialect, "structured.split_reduction",
- the split op and
- the result-combining op.
- Example (default: use_scaling_algorithm = false, use_alloc = false):
- ====================================================================
+ #### Example (default: `use_scaling_algorithm = false, use_alloc = false`):
+
```
%r = linalg.generic {indexing_maps = [affine_map<(d0) -> (d0)>,
affine_map<(d0) -> ()>],
@@ -314,8 +314,8 @@ def SplitReductionOp : Op<Transform_Dialect, "structured.split_reduction",
} -> tensor<f32>
```
- Example (use_scaling_algorithm = true, use_alloc = true):
- =========================================================
+ #### Example (`use_scaling_algorithm = true, use_alloc = true`):
+
Instead of introducing an ExpandShapeOp, this scaling-based implementation
rewrites a reduction dimension `k` into `k * split_factor + kk`.
The dimension `kk` is added as an extra parallel dimension to the
@@ -329,7 +329,7 @@ def SplitReductionOp : Op<Transform_Dialect, "structured.split_reduction",
b. O(i, j) += O_i(kk, i, j)
The intermediate tensor O_i is of shape (128/16)x3x5 == 8x3x5.
- Example:
+ #### Example:
```
%0 = linalg.matmul ins(%A, %B: tensor<16x256xf32>, tensor<256x32xf32>)
@@ -439,8 +439,8 @@ def VectorizeOp : Op<Transform_Dialect, "structured.vectorize",
Note that this transformation is invalidating the handles to any payload IR
operation that is contained inside the vectorization target.
- Return modes:
- =============
+ #### Return modes:
+
This operation produces `definiteFailure` if vectorization fails for any
reason.
The operation always returns the handle to the target op that is expected
diff --git a/mlir/include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td b/mlir/include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td
index 655b817..c30fbd3 100644
--- a/mlir/include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td
+++ b/mlir/include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td
@@ -73,8 +73,8 @@ def LoopPeelOp : Op<Transform_Dialect, "loop.peel",
In the absence of sufficient static information, this op may peel a loop,
even if the step always divides the range evenly at runtime.
- Return modes:
- =============
+ #### Return modes
+
This operation ignores non-scf::ForOp ops and drops them in the return.
This operation always succeeds and returns the scf::ForOp with the
@@ -122,8 +122,8 @@ def LoopPipelineOp : Op<Transform_Dialect, "loop.pipeline",
arguments. Currently supports memref and vector transfer operations as
memory reads/writes.
- Return modes:
- =============
+ #### Return modes
+
This operation ignores non-scf::For ops and drops them in the return.
If all the operations referred to by the `target` PDLOperation pipeline
properly, the transform succeeds. Otherwise the transform silently fails.
@@ -155,8 +155,8 @@ def LoopUnrollOp : Op<Transform_Dialect, "loop.unroll",
number of loop body copies per iteration. If the unroll factor is larger
than the loop trip count, the latter is used as the unroll factor instead.
- Return modes:
- ==============
+ #### Return modes
+
This operation ignores non-scf::For ops and drops them in the return.
If all the operations referred to by the `target` PDLOperation unroll
properly, the transform succeeds. Otherwise the transform silently fails.
diff --git a/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td b/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
index 8ee8c1a..d578c15e 100644
--- a/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
+++ b/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
@@ -38,7 +38,7 @@ def AlternativesOp : TransformDialectOp<"alternatives",
"alternatives" transformation fails.
It is up to the nested operations to define which errors are "recoverable"
- (or "silencable") and allow another alternatives to be attempted, and which
+ (or "silenceable") and allow another alternatives to be attempted, and which
errors should be propagated without attempting the other alternatives.
The single operand of this operation is the scope in which the alternative
@@ -51,7 +51,7 @@ def AlternativesOp : TransformDialectOp<"alternatives",
irrecoverable error and thus abort the execution without attempting the
remaining alternatives. Note that the payload IR outside of the given scope
is not necessarily in the valid state, or even accessible to the
- tranfsormation.
+ transformation.
The changes to the IR within the scope performed by transforms in the failed
alternative region are reverted before attempting the next region.
@@ -79,7 +79,7 @@ def AlternativesOp : TransformDialectOp<"alternatives",
transform.yield %0 : !pdl.operation
}, {
^bb0(%arg0: !pdl.operation):
- // Otherwise, the second alternative is tried and it always succeeeds by
+ // Otherwise, the second alternative is tried and it always succeeds by
// returning the original handle.
transform.yield %arg0 : !pdl.operation
}
@@ -106,8 +106,8 @@ def GetClosestIsolatedParentOp : TransformDialectOp<"get_closest_isolated_parent
there usually is a top-level ModuleOp), the transformation is considered to
have failed.
- Ancestor ops follow the same order as the ops assocaited with the
- operand, except for potential duplicates (multiple Payload IR ops assocaited
+ Ancestor ops follow the same order as the ops associated with the
+ operand, except for potential duplicates (multiple Payload IR ops associated
with the operand have the same parent) for which the ancestor will only be
listed once for the first time it occurs. For example, given the list
"(childof(A), childof(B), childof(B), childof(A), childof(B))", the
@@ -154,11 +154,11 @@ def PDLMatchOp : TransformDialectOp<"pdl_match",
Produces a Transform IR value associated with the list of Payload IR ops
that matched the pattern. The order of results in the list is that of the
Operation::walk, clients are advised not to rely on a specific order though.
- If the operand is assocaited with multiple Payload IR ops, finds matching
+ If the operand is associated with multiple Payload IR ops, finds matching
ops nested within each of those and produces a single list containing all
of the matched ops.
- The tranfsormation is considered successful regardless of whether some
+ The transformation is considered successful regardless of whether some
Payload IR ops actually matched the pattern and only fails if the pattern
could not be looked up or compiled.
}];
@@ -312,7 +312,7 @@ def YieldOp : TransformDialectOp<"yield", [Terminator]> {
}];
let arguments = (ins
- Arg<Variadic<AnyType>, "Opration handles yielded back to the parent",
+ Arg<Variadic<AnyType>, "Operation handles yielded back to the parent",
[TransformMappingRead]>:$operands);
let assemblyFormat = "operands attr-dict (`:` type($operands)^)?";