Skip to content

Commit

Permalink
[mlir][docs] Capitalize "Transform" in "transform dialect" (llvm#76840)
Browse files Browse the repository at this point in the history
A mix of "Transform dialect" and "transform dialect" is used ATM. This
patch capitalizes the outstanding instances of "transform".
  • Loading branch information
banach-space committed Jan 3, 2024
1 parent bdcd7c0 commit 39298b0
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions mlir/docs/Dialects/Transform.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ operations, and then applying loop unrolling to the inner loops produced by the
previous transformations. As such, it is not intended as a replacement for the
pass infrastructure, nor for the pattern rewriting infrastructure. In the most
common case, the transform IR will be processed and applied to the payload IR by
a pass. Transformations expressed by the transform dialect may be implemented
a pass. Transformations expressed by the Transform dialect may be implemented
using the pattern infrastructure or any other relevant MLIR component.

The following IR gives a rough idea of what the operations in this dialect
Expand Down Expand Up @@ -271,7 +271,7 @@ operation lists.
## Handle Invalidation
The execution model of the transform dialect allows a payload IR operation to be
The execution model of the Transform dialect allows a payload IR operation to be
associated with _multiple_ handles as well as nested payload IR operations to be
associated with different handles. Similarly, a payload IR value may be
associated with multiple transform IR value handles. When a transform IR
Expand Down Expand Up @@ -373,13 +373,13 @@ to specify which transformations the pass should run. The transform dialect
provides a uniform, extensible mechanism for controlling transformations in
such cases.

The transform dialect is supposed to be consumed by an "interpreter" pass
The Transform dialect is supposed to be consumed by an "interpreter" pass
that drives the application of transformations. To ensure extensibility and
composability, this pass is not expected to actually perform the
transformations specified by the ops. Instead, the transformations are
implemented by the transform ops themselves via `TransformOpInterface`. The
pass serves as the entry point, handles the flow of transform operations and
takes care of bookkeeping. As such, the transform dialect does not provide
takes care of bookkeeping. As such, the Transform dialect does not provide
the interpreter pass. Instead, it provides a set of utilities that can be
used by clients to define their own interpreter passes or as part of a more
complex pass. For example, the mapping between values in the transform IR
Expand Down
6 changes: 3 additions & 3 deletions mlir/docs/Tutorials/transform/Ch1.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ transform.sequence failures(propagate) {

## Transform Dialect Interpreter

Since we don’t want to recompile the compiler every time we change a transformation, we can use a transform dialect interpreter pass to apply this transformation sequence to the payload IR. As we will see in the next chapter, it is possible to define custom passes or even integrate the transform interpreter into a larger pass. For now, we can use the existing test pass:
Since we don’t want to recompile the compiler every time we change a transformation, we can use a Transform dialect interpreter pass to apply this transformation sequence to the payload IR. As we will see in the next chapter, it is possible to define custom passes or even integrate the transform interpreter into a larger pass. For now, we can use the existing test pass:


```sh
Expand Down Expand Up @@ -168,7 +168,7 @@ Besides producing new handles, the tiling transform operation _consumes_ the ope
## Handle Invalidation and Expensive Checks Mode
Undefined behavior is difficult to grapple with when it does happen, so the transform dialect interpreter provides a set of additional expensive checks that detect most undefined behavior in the transform IR. For example, if we wanted to use the `%arg1` handle after it is consumed, it would cause undefined behavior that manifests as an assertion in the debug build, and likely as a segmentation fault in the release mode.
Undefined behavior is difficult to grapple with when it does happen, so the Transform dialect interpreter provides a set of additional expensive checks that detect most undefined behavior in the transform IR. For example, if we wanted to use the `%arg1` handle after it is consumed, it would cause undefined behavior that manifests as an assertion in the debug build, and likely as a segmentation fault in the release mode.
```mlir
transform.sequence failures(propagate) {
Expand Down Expand Up @@ -379,7 +379,7 @@ Finally, we would like to replace the call to the outlined function with a call
## Tracking IR Modifications
The transform dialect automatically tracks all IR changes that are made as part
The Transform dialect automatically tracks all IR changes that are made as part
of transform ops. (Implementations must use the provided rewriter to modify IR.)
If a payload op is erased, it is automatically removed from all handles that it
is currently associated with. If a payload op is replaced, the transform dialect
Expand Down
6 changes: 3 additions & 3 deletions mlir/docs/Tutorials/transform/Ch2.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Transform dialect uses the dialect extension mechanism to allow additional o
// In MyExtension.cpp.
#include "mlir/Dialect/Transform/IR/TransformDialect.h"

// Define a new transform dialect extension. This uses the CRTP idiom to identify
// Define a new Transform dialect extension. This uses the CRTP idiom to identify
// extensions.
class MyExtension : public ::mlir::transform::TransformDialectExtension<MyExtension> {
public:
Expand Down Expand Up @@ -200,7 +200,7 @@ must be modified with the provided rewriter.
```c++
// In MyExtension.cpp

// Implementation of our transform dialect operation.
// Implementation of our Transform dialect operation.
// This operation returns a tri-state result that can be one of:
// - success when the transformation succeeded;
// - definite failure when the transformation failed in such a way that
Expand Down Expand Up @@ -277,7 +277,7 @@ void registerMyExtension(::mlir::DialectRegistry &registry) {
}
```
After registering the extension, it becomes possible to use our new operation in the transform dialect interpreter. The upstream testing pass can be used as is.
After registering the extension, it becomes possible to use our new operation in the Transform dialect interpreter. The upstream testing pass can be used as is.
```mlir
transform.sequence failures(propagate) {
Expand Down
2 changes: 1 addition & 1 deletion mlir/docs/Tutorials/transform/Ch3.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void MyExtension::init() {
}
```

This type is now directly available in the transform dialect and can be used in operations.
This type is now directly available in the Transform dialect and can be used in operations.


```mlir
Expand Down
6 changes: 3 additions & 3 deletions mlir/docs/Tutorials/transform/ChH.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Chapter H: Reproducing Halide Schedule

This chapter demonstrates how a schedule from the [Halide
DSL](http://halide-lang.org) can be implemented using transform dialect for
DSL](http://halide-lang.org) can be implemented using Transform dialect for
structured ops.

Note that the IR below is pseudo-code with types removed for brevity. It may
Expand Down Expand Up @@ -408,7 +408,7 @@ identical_ to the code with the full schedule. Therefore, we will only unroll
the corresponding loops corresponding to `xi` and `ci` dimensions that actually
get unrolled by Halide.

As tiling in the transform dialect produces handles to the loops materialized by
As tiling in the Transform dialect produces handles to the loops materialized by
tiling, unrolling those loops is just a matter of chaining the corresponding
transformation. Note that the inner loop must be unrolled first as unrolling the
outer loop will invalidate the handles to the inner loop.
Expand Down Expand Up @@ -499,7 +499,7 @@ bufferization is directly available as a transform operation.

One-shot bufferization itself does not produce buffer deallocations, which may
lead to leaks. So we have to run the buffer deallocation pass pipeline to avoid
them. Note that the transform dialect seamlessly runs named passes and pass
them. Note that the Transform dialect seamlessly runs named passes and pass
pipelines: if desired, one could replace complex `--pass-pipeline expressions`
with operations. Note that we apply the pipeline to functions rather than entire
module to avoid running it on the transform IR that is contained in the module.
Expand Down
10 changes: 5 additions & 5 deletions mlir/docs/Tutorials/transform/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ scheduling languages). This tutorial presents the concepts of the MLIR transform
dialect and related infrastructure. It will be accompanied by a practical
demonstration of three use scenarios:

- Composing transform dialect operations available in (upstream) MLIR to perform
- Composing Transform dialect operations available in (upstream) MLIR to perform
a sequence of optimizing transformations that results in efficient code for an
MLIR linear algebra operation.
- Defining new transform dialect operations and adapting existing transformation
code to work with the transform dialect infrastructure.
- Setting up and using the transform dialect infrastructure in a downstream
- Defining new Transform dialect operations and adapting existing transformation
code to work with the Transform dialect infrastructure.
- Setting up and using the Transform dialect infrastructure in a downstream
out-of-tree project with custom dialects, transformations and passes.

After following the tutorial, one will be able to apply the transform dialect in
After following the tutorial, one will be able to apply the Transform dialect in
their work and extend it when necessary. Basic familiarity with MLIR is a
prerequisite. See [Toy tutorial](../Toy) for introduction to MLIR.

Expand Down

0 comments on commit 39298b0

Please sign in to comment.