Skip to content

Commit ca889b5

Browse files
committed
fix roundtrip test
1 parent 486c62b commit ca889b5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

mlir/test/Dialect/Linalg/roundtrip.mlir

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,15 +708,27 @@ func.func @conv2d_channel_first_q_promote(%img: tensor<100x3x224x224xi8>, %filt:
708708
// CHECK: linalg.conv_2d_nchw_fchw_q {dilations = dense<1> : tensor<2xi64>, strides = dense<1> : tensor<2xi64>} ins(%[[arg0]], %[[arg1]], %[[arg2]], %[[arg3]] : tensor<100x3x224x224xi8>, tensor<64x3x5x5xi8>, i8, i8) outs(%{{.*}} : tensor<100x64x220x220xi32>) -> tensor<100x64x220x220xi32>
709709

710710
// -----
711+
711712
func.func @pack_memref(%source: memref<128x256xf32>, %dest: memref<8x16x8x32xf32>) {
712713
linalg.pack %source outer_dims_perm = [1, 0] inner_dims_pos = [0, 1] inner_tiles = [8, 32]
713714
into %dest : memref<128x256xf32> -> memref<8x16x8x32xf32>
714715
return
715716
}
716717

718+
// CHECK-label: func @pack_memref(
719+
// CHECK: %[[source:[a-zA-z0-9]*]]: memref<128x256xf32>, %[[dest:[a-zA-z0-9]*]]: memref<8x16x8x32xf32>) {
720+
// CHECK: %pack = linalg.pack %arg0 outer_dims_perm = [1, 0] inner_dims_pos = [0, 1] inner_tiles = [8, 32] into %arg1 : memref<128x256xf32> -> memref<8x16x8x32xf32>
721+
// CHECK: return
722+
// CHECK: }
717723
// -----
724+
718725
func.func @unpack_memref(%source: memref<16x8x8x32xf32>, %dest: memref<128x256xf32>) {
719726
linalg.unpack %source inner_dims_pos = [0, 1] inner_tiles = [8, 32]
720727
into %dest : memref<16x8x8x32xf32> -> memref<128x256xf32>
721728
return
722729
}
730+
731+
// CHECK-label: func @unpack_memref(
732+
// CHECK: %[[source:[a-zA-z0-9]*]]: memref<16x8x8x32xf32>, %[[dest:[a-zA-z0-9]*]]: memref<128x256xf32>) {
733+
// CHECK: %unpack = linalg.unpack %arg0 inner_dims_pos = [0, 1] inner_tiles = [8, 32] into %arg1 : memref<16x8x8x32xf32> -> memref<128x256xf32>
734+
// CHECK: return

0 commit comments

Comments
 (0)