Commit 1752740
authored
[mlir][tensor] Fix FoldTensorCastProducerOp for multiple result operations (llvm#93374)
For patterns where there are multiple results apart from dpsInits, this
fails.
E.g.:
```
%13:2 = iree_codegen.ukernel.generic "iree_uk_unpack"
ins(%extracted_slice : tensor<?x1x16x16xf32>) outs(%11 :
tensor<?x?xf32>) ... -> tensor<?x?xf32>, i32
```
The above op has results apart from dpsInit and hence fails. The PR
assumes that the result has dpsInits followed by nonDpsInits.1 parent 670fa2b commit 1752740
File tree
2 files changed
+19
-3
lines changed- mlir
- lib/Dialect/Tensor/IR
- test/Dialect/Tensor
2 files changed
+19
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4531 | 4531 | | |
4532 | 4532 | | |
4533 | 4533 | | |
4534 | | - | |
4535 | | - | |
| 4534 | + | |
4536 | 4535 | | |
4537 | 4536 | | |
| 4537 | + | |
| 4538 | + | |
4538 | 4539 | | |
4539 | 4540 | | |
4540 | 4541 | | |
4541 | 4542 | | |
4542 | 4543 | | |
4543 | 4544 | | |
4544 | | - | |
| 4545 | + | |
4545 | 4546 | | |
4546 | 4547 | | |
4547 | 4548 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2523 | 2523 | | |
2524 | 2524 | | |
2525 | 2525 | | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
0 commit comments