Commit f6cff33
committed
[mlir][linalg] Extend DecomposeOuterUnitDimsPackOpPattern (linalg.pack)
Similarly to #152960, this PR fixes `getTiledOuterDims` for
`linalg.pack` by ensuring that the `outer_dims_perm` attributeis
properly taken into account.
This enables the main change in this PR: relaxing the constraints in
* `DecomposeOuterUnitDimsPackOpPattern`.
Specifically, the pattern is extended to allow non-unit untiled outer
dimensions. This makes it consistent with the corresponding pattern for
`linalg.unpack`:
* `DecomposeOuterUnitDimsUnPackOpPattern`.
One notable assumption remains: untiled outer dimensions are not
permuted. This was already the case but is now explicitly documented.1 parent f53b624 commit f6cff33
File tree
5 files changed
+91
-21
lines changed- mlir
- include/mlir/Dialect/Linalg/Transforms
- lib/Dialect
- Linalg
- IR
- Transforms
- Tensor/IR
- test/Dialect/Linalg
5 files changed
+91
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1651 | 1651 | | |
1652 | 1652 | | |
1653 | 1653 | | |
1654 | | - | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
1655 | 1658 | | |
1656 | 1659 | | |
1657 | 1660 | | |
| |||
1691 | 1694 | | |
1692 | 1695 | | |
1693 | 1696 | | |
| 1697 | + | |
1694 | 1698 | | |
1695 | 1699 | | |
1696 | 1700 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5272 | 5272 | | |
5273 | 5273 | | |
5274 | 5274 | | |
5275 | | - | |
| 5275 | + | |
5276 | 5276 | | |
5277 | 5277 | | |
| 5278 | + | |
| 5279 | + | |
| 5280 | + | |
| 5281 | + | |
| 5282 | + | |
| 5283 | + | |
| 5284 | + | |
5278 | 5285 | | |
5279 | | - | |
| 5286 | + | |
5280 | 5287 | | |
5281 | 5288 | | |
5282 | 5289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1134 | 1134 | | |
1135 | 1135 | | |
1136 | 1136 | | |
1137 | | - | |
1138 | | - | |
1139 | | - | |
| 1137 | + | |
1140 | 1138 | | |
1141 | 1139 | | |
1142 | 1140 | | |
| |||
1149 | 1147 | | |
1150 | 1148 | | |
1151 | 1149 | | |
1152 | | - | |
1153 | 1150 | | |
1154 | 1151 | | |
1155 | 1152 | | |
| |||
1160 | 1157 | | |
1161 | 1158 | | |
1162 | 1159 | | |
1163 | | - | |
1164 | | - | |
1165 | | - | |
1166 | | - | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
1167 | 1168 | | |
1168 | 1169 | | |
1169 | 1170 | | |
| |||
1179 | 1180 | | |
1180 | 1181 | | |
1181 | 1182 | | |
1182 | | - | |
1183 | | - | |
1184 | | - | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
1185 | 1196 | | |
1186 | 1197 | | |
1187 | 1198 | | |
| |||
1206 | 1217 | | |
1207 | 1218 | | |
1208 | 1219 | | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
1213 | | - | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
1214 | 1232 | | |
1215 | 1233 | | |
1216 | 1234 | | |
1217 | 1235 | | |
1218 | 1236 | | |
1219 | | - | |
1220 | 1237 | | |
1221 | 1238 | | |
1222 | | - | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
1223 | 1243 | | |
1224 | 1244 | | |
1225 | 1245 | | |
| 1246 | + | |
| 1247 | + | |
1226 | 1248 | | |
1227 | 1249 | | |
1228 | 1250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2310 | 2310 | | |
2311 | 2311 | | |
2312 | 2312 | | |
| 2313 | + | |
2313 | 2314 | | |
2314 | 2315 | | |
2315 | 2316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
34 | 53 | | |
35 | 54 | | |
36 | 55 | | |
| |||
295 | 314 | | |
296 | 315 | | |
297 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
0 commit comments