Skip to content

Commit f8b561d

Browse files
committed
Update test with transpose that is now folded
Signed-off-by: James Newling <[email protected]>
1 parent 5eaf190 commit f8b561d

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

mlir/test/Dialect/Vector/vector-transpose-lowering.mlir

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,15 @@ func.func @transpose102_8x1x8xf32(%arg0: vector<8x1x8xf32>) -> vector<1x8x8xf32>
6565
return %0 : vector<1x8x8xf32>
6666
}
6767

68-
// CHECK-LABEL: func @transpose1023_1x1x8x8xf32(
69-
func.func @transpose1023_1x1x8x8xf32(%arg0: vector<1x1x8x8xf32>) -> vector<1x1x8x8xf32> {
70-
// Note the single 2-D extract/insert pair since 2 and 3 are not transposed!
71-
// CHECK: vector.extract {{.*}}[0, 0] : vector<8x8xf32> from vector<1x1x8x8xf32>
72-
// CHECK-NEXT: vector.insert {{.*}} [0, 0] : vector<8x8xf32> into vector<1x1x8x8xf32>
73-
%0 = vector.transpose %arg0, [1, 0, 2, 3] : vector<1x1x8x8xf32> to vector<1x1x8x8xf32>
74-
return %0 : vector<1x1x8x8xf32>
68+
// CHECK-LABEL: func @transpose1023_2x1x8x4xf32(
69+
func.func @transpose1023_2x1x8x4xf32(%arg0: vector<2x1x8x4xf32>) -> vector<1x2x8x4xf32> {
70+
// Note the 2-D extract/insert pair since dimensions 2 and 3 are not transposed!
71+
// CHECK: vector.extract {{.*}}[0, 0] : vector<8x4xf32> from vector<2x1x8x4xf32>
72+
// CHECK-NEXT: vector.insert {{.*}} [0, 0] : vector<8x4xf32> into vector<1x2x8x4xf32>
73+
// CHECK-NEXT: vector.extract {{.*}}[1, 0] : vector<8x4xf32> from vector<2x1x8x4xf32>
74+
// CHECK-NEXT: vector.insert {{.*}} [0, 1] : vector<8x4xf32> into vector<1x2x8x4xf32>
75+
%0 = vector.transpose %arg0, [1, 0, 2, 3] : vector<2x1x8x4xf32> to vector<1x2x8x4xf32>
76+
return %0 : vector<1x2x8x4xf32>
7577
}
7678

7779
/// Scalable dim should not be unrolled.

0 commit comments

Comments
 (0)