Commit f350dd2
committed
[mlir][tensor][linalg] Move Pack/Unpack Ops to Linalg (extra)
This is merely moving code around, no new functionality is added.
PATCH 5: Create `LinalgRelayoutOpInterface` to be able to exclude
`linalg::PackOp` + `linalg::UnpackOp` Ops from patterns/folders outside
the Linalg dialect, e.g. `FoldTensorCastProducerOp` from the Tensor
dialect. Note that there's `FoldTensorCastUnPackOp` and
`FoldTensorCastPackOp` in LinalgOps.cpp (i.e. Linalg dialect) that
provides similar folder (but which fold "correctly"). See e.g. llvm#121393
and llvm#114559 for context.
CONTEXT:
This change was discussed in the following RFC:
* https://discourse.llvm.org/t/rfc-move-tensor-pack-and-tensor-unpack-into-linalg1 parent 55f4c72 commit f350dd2
File tree
3 files changed
+13
-3
lines changed- mlir
- include/mlir/Dialect/Linalg/IR
- lib/Dialect/Tensor/IR
3 files changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
181 | 189 | | |
182 | 190 | | |
183 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3935 | 3935 | | |
3936 | 3936 | | |
3937 | 3937 | | |
3938 | | - | |
| 3938 | + | |
| 3939 | + | |
3939 | 3940 | | |
3940 | | - | |
| 3941 | + | |
3941 | 3942 | | |
3942 | 3943 | | |
3943 | 3944 | | |
| |||
0 commit comments