Skip to content

Commit 6e225a3

Browse files
committed
Address more review
1 parent f9184d0 commit 6e225a3

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

mlir/docs/Tutorials/transform/Ch4.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ Up until now, we were applying transform dialect scripts under the assumption
77
that specific payload operations are identified by the caller when the transform
88
dialect interpreter is invoked. This may be seen as contrary to the idea of
99
driving transformations from a dialect since the transformation targets must be
10-
identified by the caller in C++. It also adds practical overhead due to
10+
identified through mechanisms external to the transform dialect interpreter, for
11+
example, when invoking the interpreter programmatically in C++ or through pass
12+
arguments as seen in previous chapters. It also adds practical overhead due to
1113
increased interaction with the interpreter in C++, and cognitive overhead of
1214
manipulating two interfaces at once. To remedy this, Transform dialect proposes
1315
a subset of operations for _matching_ payload operations that need to be
@@ -24,8 +26,9 @@ directly within the transform dialect.
2426

2527
## Simple match
2628

27-
Let us reconsider the “fully connected layer” example from Chapter 1, reproduced
28-
below for convenience.
29+
Let us reconsider the “fully connected layer” example from [Chapter
30+
1](Ch1.md#chaining-transformations-with-handles), reproduced below for
31+
convenience.
2932

3033

3134
```mlir
@@ -123,12 +126,12 @@ module @transforms attributes { transform.with_named_sequence } {
123126

124127
This script can be executed using the non-test interpreter pass running on the
125128
root operation of the translation unit without additional flags: `mlir-opt
126-
--transform-interpreter`. It will emit corresponding remarks at elementwise and
127-
matmul operations. In debug builds, the infrastructure provides a convenient
128-
method to understand the matching process by passing
129-
`-debug-only=transform-matcher` to `mlir-opt` or a derived tool. It will print
130-
the silenceable failure messages produced by the match operations into the debug
131-
stream, for example:
129+
--transform-interpreter`. It will emit corresponding remarks at
130+
`linalg.elemwise_binary` and `linalg.matmul` operations. In debug builds, the
131+
infrastructure provides a convenient method to understand the matching process
132+
by passing `-debug-only=transform-matcher` to `mlir-opt` or a derived tool. It
133+
will print the silenceable failure messages produced by the match operations
134+
into the debug stream, for example:
132135

133136

134137
```

mlir/docs/Tutorials/transform/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ The tutorial is divided into the following chapters.
2626
- [Chapter #1](Ch1.md): Combining Existing Transformations
2727
- [Chapter #2](Ch2.md): Adding a Simple New Transformation Operation
2828
- [Chapter #3](Ch3.md): More than Simple Transform Operations
29+
- [Chapter #4](Ch4.md): Matching Payload with Transform Operations
2930
- [Chapter H](ChH.md): Reproducing Halide Schedule
3031

3132
The code corresponding to this tutorial is located under

mlir/test/lit.cfg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ def add_runtime(name):
154154
ToolSubst("toyc-ch5", unresolved="ignore"),
155155
ToolSubst("toyc-ch6", unresolved="ignore"),
156156
ToolSubst("toyc-ch7", unresolved="ignore"),
157-
ToolSubst('transform-opt-ch2', unresolved='ignore'),
158-
ToolSubst('transform-opt-ch3', unresolved='ignore'),
159-
ToolSubst('transform-opt-ch4', unresolved='ignore'),
157+
ToolSubst("transform-opt-ch2", unresolved="ignore"),
158+
ToolSubst("transform-opt-ch3", unresolved="ignore"),
159+
ToolSubst("transform-opt-ch4", unresolved="ignore"),
160160
ToolSubst("%mlir_lib_dir", config.mlir_lib_dir, unresolved="ignore"),
161161
ToolSubst("%mlir_src_dir", config.mlir_src_root, unresolved="ignore"),
162162
]

0 commit comments

Comments
 (0)