[Mlir-commits] [mlir] [mlir][linalg] Add vectorization to the e2e test for tensor.unpack (PR #123032)

Han-Chung Wang llvmlistbot at llvm.org
Sun Feb 2 22:40:59 PST 2025


================
@@ -90,14 +91,19 @@ module @transforms attributes { transform.with_named_sequence } {
     %func_op = transform.get_parent_op %tiled_pack_op_p {isolated_from_above} : (!transform.any_op) -> !transform.op<"func.func">
     transform.apply_patterns to %func_op {
       transform.apply_patterns.linalg.decompose_pack_unpack
-      transform.apply_patterns.linalg.decompose_pad
+      transform.apply_patterns.canonicalization
     } : !transform.op<"func.func">
 
+    // 3. Vectorize tensor.insert_slice
+    // Vector sizes match the inner tiles in the payload IR.
+    %slice = transform.structured.match ops{["tensor.insert_slice"]} in %func_op : (!transform.op<"func.func">) -> !transform.any_op
+    transform.structured.vectorize %slice vector_sizes [8, 1] : !transform.any_op
+
     // 3. Bufferize before lowering to LLVM
----------------
hanhanW wrote:

The number needs to be updated, if you want to keep the numbers.

https://github.com/llvm/llvm-project/pull/123032


More information about the Mlir-commits mailing list