[Mlir-commits] [mlir] 8a2a65f - [mlir][ArmSME][test] Unroll reduction dimension in multi-tile-matmul.mlir (#81160)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Feb 12 01:41:01 PST 2024


Author: Benjamin Maxwell
Date: 2024-02-12T09:40:58Z
New Revision: 8a2a65ffdf7fb2bb0195dcc0d1dc6705cef8bce5

URL: https://github.com/llvm/llvm-project/commit/8a2a65ffdf7fb2bb0195dcc0d1dc6705cef8bce5
DIFF: https://github.com/llvm/llvm-project/commit/8a2a65ffdf7fb2bb0195dcc0d1dc6705cef8bce5.diff

LOG: [mlir][ArmSME][test] Unroll reduction dimension in multi-tile-matmul.mlir (#81160)

This tests both #80148 and #80170 work together to allow unrolling the
reduction dimension of a matmul.

Added: 
    

Modified: 
    mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/multi-tile-matmul.mlir

Removed: 
    


################################################################################
diff  --git a/mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/multi-tile-matmul.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/multi-tile-matmul.mlir
index 327f237ba8948a..d5c35068ccb32e 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/multi-tile-matmul.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/multi-tile-matmul.mlir
@@ -73,14 +73,14 @@ module attributes {transform.with_named_sequence} {
     %matmul = transform.structured.match ops{["linalg.matmul"]} in %module
       : (!transform.any_op) -> !transform.any_op
 
-    // Step 1: Tile for size [8] x [8], which corresponds to (2 x SVLs) x (2 x SVLs),
-    // where SVLs is the number of 32-bit elements in a vector of SVL bits.
-    // This uses all four 32-bit SME virtual tiles.
-    %tiled_linalg_op, %loop_i, %loop_j, %loop_k = transform.structured.tile_using_for %matmul[[8], [8], 1]
+    // Step 1: Tile for size [8] x [8] (unrolled by 4), which corresponds to
+    // (2 x SVLs) x (2 x SVLs), where SVLs is the number of 32-bit elements in a
+    // vector of SVL bits. This uses all four 32-bit SME virtual tiles.
+    %tiled_linalg_op, %loop_i, %loop_j, %loop_k = transform.structured.tile_using_for %matmul[[8], [8], 4]
       : (!transform.any_op) -> (!transform.any_op, !transform.op<"scf.for">, !transform.op<"scf.for">, !transform.op<"scf.for">)
 
     // Step 2: Vectorize.
-    transform.structured.vectorize %tiled_linalg_op vector_sizes [[8], [8], 1]
+    transform.structured.vectorize %tiled_linalg_op vector_sizes [[8], [8], 4]
       : !transform.any_op
 
     // Step 3: Bufferize ahead of TransferReadDropUnitDimsPattern, which


        


More information about the Mlir-commits mailing list