Commit 277807c
[Codegen] Materialize 0D set_encoding into no-op (iree-org#21418)
We can have set_encoding ops 0D tensors if encodings are propagated
through generic ops with 0D tensor operands. If these operands are
materialized normally, then 0D transpose ops get generated, which breaks
the assumption of a non-0D permutation and causes an assertion error.
This PR just materializes 0D tensors into a no-op, since they are just
scalars, and are not affected by data tiling layouts.
Signed-off-by: Max Dawkins <[email protected]>
Signed-off-by: keshavvinayak01 <[email protected]>1 parent 428db83 commit 277807c
File tree
2 files changed
+25
-0
lines changed- compiler/src/iree/compiler/Codegen/Common
- test
2 files changed
+25
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
683 | 687 | | |
684 | 688 | | |
685 | 689 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1314 | 1314 | | |
1315 | 1315 | | |
1316 | 1316 | | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
0 commit comments