Commit d392744
[DT][NFC] Refactor linalg.fill/generic op lowering to interface implementation. (iree-org#22343)
The revision deletes two patterns and moves the implementation to
interface methods:
- MaterializeDPSOperation<linalg::FillOp>
- MaterializeDPSOperation<linalg::GenericOp>
The lowerGenericOpWithResolvedLayouts method is very similar to the
original lowerGenericOpWithEncoding. The new method takes the same input
arguments like `lowerOp` method with an additional
`LayoutMaterializerAttr` attribute, because it needs the packing info to
generate indexing maps. In the new implementation, it uses
`getEncodingInfoFromLayout` method directly while the method in the type
converter is just a wrapper. I.e., it reduces the dependency from the
type converter. See
https://gist.github.com/hanhanW/e89aa9e5052f8db37b2543fa368ed605 for the
diff.
It is a step towards iree-org#20160, as
the padding resolver no longer rely on "fallback" path to drop the
encodings. It has its own implementation that uses `clone`.
---------
Signed-off-by: hanhanW <[email protected]>1 parent 42b2a09 commit d392744
File tree
7 files changed
+363
-379
lines changed- compiler/src/iree/compiler/Codegen
- Common
- ExternalInterfaces
7 files changed
+363
-379
lines changedLines changed: 7 additions & 356 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
Lines changed: 34 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
284 | 283 | | |
285 | 284 | | |
286 | 285 | | |
287 | | - | |
| 286 | + | |
288 | 287 | | |
289 | 288 | | |
290 | 289 | | |
291 | | - | |
| 290 | + | |
292 | 291 | | |
293 | 292 | | |
294 | 293 | | |
| |||
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
304 | | - | |
| 303 | + | |
305 | 304 | | |
306 | 305 | | |
307 | 306 | | |
308 | 307 | | |
309 | 308 | | |
310 | 309 | | |
311 | | - | |
| 310 | + | |
312 | 311 | | |
313 | 312 | | |
314 | 313 | | |
| |||
725 | 724 | | |
726 | 725 | | |
727 | 726 | | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
733 | 742 | | |
734 | 743 | | |
735 | 744 | | |
| |||
869 | 878 | | |
870 | 879 | | |
871 | 880 | | |
872 | | - | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | | - | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
877 | 896 | | |
878 | 897 | | |
879 | 898 | | |
| |||
Lines changed: 15 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
335 | 333 | | |
336 | 334 | | |
337 | 335 | | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | 336 | | |
343 | 337 | | |
344 | 338 | | |
| |||
517 | 511 | | |
518 | 512 | | |
519 | 513 | | |
520 | | - | |
521 | | - | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
522 | 529 | | |
523 | 530 | | |
524 | 531 | | |
| |||
0 commit comments