Skip to content

Commit d505a21

Browse files
committed
fixup! [mlir][linalg] Add e2e test for linalg.mmt4d
1 parent 3fa0071 commit d505a21

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mlir/test/Integration/Dialect/Linalg/CPU/pack-unpack-mmt4d.mlir

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// DEFINE: %{compile} = mlir-opt %s \
22
// DEFINE: -transform-interpreter -test-transform-dialect-erase-schedule \
3-
// DEFINE: -one-shot-bufferize -func-bufferize -cse -canonicalize -convert-vector-to-scf -test-lower-to-llvm -o %t
3+
// DEFINE: -one-shot-bufferize="bufferize-function-boundaries" -test-lower-to-llvm -o %t -o %t
44
// DEFINE: %{entry_point} = main
55
// DEFINE: %{run} = mlir-cpu-runner %t -e %{entry_point} -entry-point-result=void \
66
// DEFINE: -shared-libs=%mlir_runner_utils,%mlir_c_runner_utils
@@ -9,13 +9,13 @@
99

1010
// RUN: %{run} | FileCheck %s
1111

12-
/// End-to-end test for computing matrix-multiplicatin using linalg.mmt4d. In
12+
/// End-to-end test for computing matrix-multiplication using linalg.mmt4d. In
1313
/// particular, demonstrates how the following MLIR sequence (implemented in @mmt4d):
1414
///
1515
/// A_pack = tensor.pack A
1616
/// B_pack = tensor.pack B
1717
/// C_pack = tensor.pack C
18-
/// out_pack = linalg.mmt4d(A_pack, B_ pack, C_pack)
18+
/// out_pack = linalg.mmt4d(A_pack, B_pack, C_pack)
1919
///
2020
/// is equivalent to:
2121
///
@@ -55,7 +55,7 @@ func.func @main() {
5555
%xf = tensor.cast %C_mmt4d : tensor<7x13xi32> to tensor<*xi32>
5656
call @printMemrefI32(%xf) : (tensor<*xi32>) -> ()
5757

58-
// Matrix multiplicaiton with linalg.matmul
58+
// Matrix multiplication with linalg.matmul
5959
// CHECK: Unranked Memref
6060
// CHECK: [193, 200, 207, 214, 221, 228, 235, 242, 249, 256, 263, 270, 277]
6161
// CHECK: [194, 201, 208, 215, 222, 229, 236, 243, 250, 257, 264, 271, 278]
@@ -87,7 +87,7 @@ func.func @mmt4d(%A: tensor<7x16xi32>, %B: tensor<16x13xi32>, %C: tensor<7x13xi3
8787
%C_pack_empty = tensor.empty() : tensor<2x2x8x8xi32>
8888

8989
// Pack matrices
90-
%A_pack = tensor.pack %A padding_value(%zero : i32) outer_dims_perm = [0, 1] inner_dims_pos = [0, 1] inner_tiles = [8, 1] into %A_pack_empty : tensor<7x16xi32> -> tensor<2x16x8x1xi32>
90+
%A_pack = tensor.pack %A padding_value(%zero : i32) inner_dims_pos = [0, 1] inner_tiles = [8, 1] into %A_pack_empty : tensor<7x16xi32> -> tensor<2x16x8x1xi32>
9191
%B_pack = tensor.pack %B padding_value(%zero : i32) outer_dims_perm = [1, 0] inner_dims_pos = [1, 0] inner_tiles = [8, 1] into %B_pack_empty : tensor<16x13xi32> -> tensor<2x16x8x1xi32>
9292
%C_pack = tensor.pack %C padding_value(%zero : i32) outer_dims_perm = [0, 1] inner_dims_pos = [0, 1] inner_tiles = [8, 8] into %C_pack_empty : tensor<7x13xi32> -> tensor<2x2x8x8xi32>
9393

0 commit comments

Comments
 (0)