|
1 | 1 | // DEFINE: %{compile} = mlir-opt %s \
|
2 | 2 | // 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 |
4 | 4 | // DEFINE: %{entry_point} = main
|
5 | 5 | // DEFINE: %{run} = mlir-cpu-runner %t -e %{entry_point} -entry-point-result=void \
|
6 | 6 | // DEFINE: -shared-libs=%mlir_runner_utils,%mlir_c_runner_utils
|
|
9 | 9 |
|
10 | 10 | // RUN: %{run} | FileCheck %s
|
11 | 11 |
|
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 |
13 | 13 | /// particular, demonstrates how the following MLIR sequence (implemented in @mmt4d):
|
14 | 14 | ///
|
15 | 15 | /// A_pack = tensor.pack A
|
16 | 16 | /// B_pack = tensor.pack B
|
17 | 17 | /// 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) |
19 | 19 | ///
|
20 | 20 | /// is equivalent to:
|
21 | 21 | ///
|
@@ -55,7 +55,7 @@ func.func @main() {
|
55 | 55 | %xf = tensor.cast %C_mmt4d : tensor<7x13xi32> to tensor<*xi32>
|
56 | 56 | call @printMemrefI32(%xf) : (tensor<*xi32>) -> ()
|
57 | 57 |
|
58 |
| - // Matrix multiplicaiton with linalg.matmul |
| 58 | + // Matrix multiplication with linalg.matmul |
59 | 59 | // CHECK: Unranked Memref
|
60 | 60 | // CHECK: [193, 200, 207, 214, 221, 228, 235, 242, 249, 256, 263, 270, 277]
|
61 | 61 | // 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
|
87 | 87 | %C_pack_empty = tensor.empty() : tensor<2x2x8x8xi32>
|
88 | 88 |
|
89 | 89 | // 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> |
91 | 91 | %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>
|
92 | 92 | %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>
|
93 | 93 |
|
|
0 commit comments