|
1 |
| -// RUN: mlir-opt <%s -split-input-file -verify-diagnostics |
| 1 | +// RUN: mlir-opt %s -split-input-file -verify-diagnostics |
2 | 2 |
|
3 | 3 | // Asking the dimension of a 0-D shape doesn't make sense.
|
4 | 4 | func.func @dim_0_ranked(%arg : tensor<f32>, %arg1 : index) {
|
@@ -692,13 +692,21 @@ func.func @pack_invalid_duplicate_element_in_outer_perm(%input: tensor<256x128xf
|
692 | 692 | // -----
|
693 | 693 |
|
694 | 694 | func.func @pack_invalid_output_rank(%input: tensor<256x128xf32>, %output: tensor<64x32x16xf32>) -> tensor<64x32x16xf32> {
|
695 |
| - // expected-error@+1 {{packed rank must equal unpacked rank + tiling factors}} |
| 695 | + // expected-error@+1 {{packed rank != (unpacked rank + num tiling factors), got 3 != 4}} |
696 | 696 | %0 = tensor.pack %input inner_dims_pos = [0, 1] inner_tiles = [32, 16] into %output : tensor<256x128xf32> -> tensor<64x32x16xf32>
|
697 | 697 | return %0 : tensor<64x32x16xf32>
|
698 | 698 | }
|
699 | 699 |
|
700 | 700 | // -----
|
701 | 701 |
|
| 702 | +func.func @pack_invalid_output_rank(%input: tensor<256x128xf32>, %output: tensor<64x32x16xf32>) -> tensor<256x128xf32> { |
| 703 | + // expected-error@+1 {{packed rank != (unpacked rank + num tiling factors), got 3 != 4}} |
| 704 | + %0 = tensor.unpack %output inner_dims_pos = [0, 1] inner_tiles = [32, 16] into %input : tensor<64x32x16xf32> -> tensor<256x128xf32> |
| 705 | + return %0 : tensor<256x128xf32> |
| 706 | +} |
| 707 | + |
| 708 | +// ----- |
| 709 | + |
702 | 710 | func.func @unpack_invalid_out_of_bound_outer_perm(%input: tensor<256x128xf32>, %output: tensor<8x8x32x16xf32>) -> tensor<8x8x32x16xf32> {
|
703 | 711 | // expected-error@+1 {{invalid outer_dims_perm vector}}
|
704 | 712 | %0 = tensor.unpack %output outer_dims_perm = [2, 1] inner_dims_pos = [0, 1] inner_tiles = [2, 2] into %input : tensor<8x8x32x16xf32> -> tensor<256x128xf32>
|
|
0 commit comments