Commit b27d97b
authored
[mlir][tensor] Add test for invalid tensor.unpack + update error msg (llvm#118275)
Adds a new test for invalid `tensor.unpack` operations where the output
rank does not match the expected rank (input rank + num inner tile
sizes). For example:
```mlir
tensor.unpack %output
inner_dims_pos = [0, 1]
inner_tiles = [32, 16]
into %input : tensor<64x32x16xf32> -> tensor<256x128xf32>
```
In addition, updates the corresponding error message to make it more
informative:
BEFORE:
```mlir
error: packed rank must equal unpacked rank + tiling factors}
```
AFTER:
```mlir
error: packed rank != (unpacked rank + num tiling factors), got 3 != 4
```1 parent 608f4ae commit b27d97b
File tree
2 files changed
+14
-4
lines changed- mlir
- lib/Dialect/Tensor/IR
- test/Dialect/Tensor
2 files changed
+14
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3983 | 3983 | | |
3984 | 3984 | | |
3985 | 3985 | | |
3986 | | - | |
| 3986 | + | |
| 3987 | + | |
3987 | 3988 | | |
3988 | | - | |
| 3989 | + | |
| 3990 | + | |
3989 | 3991 | | |
3990 | 3992 | | |
3991 | 3993 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
695 | | - | |
| 695 | + | |
696 | 696 | | |
697 | 697 | | |
698 | 698 | | |
699 | 699 | | |
700 | 700 | | |
701 | 701 | | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
702 | 710 | | |
703 | 711 | | |
704 | 712 | | |
| |||
0 commit comments