Skip to content

Commit 2a2af7c

Browse files
committed
better grouping of tests
1 parent 1f21d4d commit 2a2af7c

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

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

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// RUN: mlir-opt %s -canonicalize="test-convergence" -split-input-file -allow-unregistered-dialect | FileCheck %s
22

3-
// This file contains some canonicalizations tests involving vector.transpose.
3+
// This file contains some tests of canonicalizations and foldings involving vector.transpose.
4+
5+
// +----------------------------------------
6+
// Tests of FoldTransposeBroadcast
7+
// +----------------------------------------
48

59
// CHECK-LABEL: func @transpose_scalar_broadcast1
610
// CHECK-SAME: (%[[ARG:.+]]: vector<1xf32>)
@@ -251,7 +255,10 @@ func.func @negative_transpose_of_shape_cast(%arg : vector<6xi8>) -> vector<2x3xi
251255

252256
// -----
253257

254-
// Test of transpose folding
258+
// +-----------------------------------
259+
// Tests of transpose folding
260+
// +-----------------------------------
261+
255262
// CHECK-LABEL: transpose_1D_identity
256263
// CHECK-SAME: [[ARG:%.*]]: vector<4xf32>
257264
// CHECK-NEXT: return [[ARG]]
@@ -262,7 +269,6 @@ func.func @transpose_1D_identity(%arg : vector<4xf32>) -> vector<4xf32> {
262269

263270
// -----
264271

265-
// Test of transpose folding
266272
// CHECK-LABEL: transpose_2D_identity
267273
// CHECK-SAME: [[ARG:%.*]]: vector<4x3xf32>
268274
// CHECK-NEXT: return [[ARG]]
@@ -273,11 +279,20 @@ func.func @transpose_2D_identity(%arg : vector<4x3xf32>) -> vector<4x3xf32> {
273279

274280
// -----
275281

276-
// Test of transpose folding
277282
// CHECK-LABEL: transpose_shape_and_order_preserving
278283
// CHECK-SAME: [[ARG:%.*]]: vector<6x1x1x4xi8>
279284
// CHECK-NEXT: return [[ARG]]
280285
func.func @transpose_shape_and_order_preserving(%arg : vector<6x1x1x4xi8>) -> vector<6x1x1x4xi8> {
281286
%0 = vector.transpose %arg, [0, 2, 1, 3] : vector<6x1x1x4xi8> to vector<6x1x1x4xi8>
282287
return %0 : vector<6x1x1x4xi8>
283288
}
289+
290+
// -----
291+
292+
// CHECK-LABEL: negative_transpose_fold
293+
// CHECK: [[TRANSP:%.*]] = vector.transpose
294+
// CHECK: return [[TRANSP]]
295+
func.func @negative_transpose_fold(%arg : vector<2x2xi8>) -> vector<2x2xi8> {
296+
%0 = vector.transpose %arg, [1, 0] : vector<2x2xi8> to vector<2x2xi8>
297+
return %0 : vector<2x2xi8>
298+
}

0 commit comments

Comments
 (0)