[Mlir-commits] [mlir] Rename structured.{vectorize => vectorize_children}. (PR #66575)

Ingo Müller llvmlistbot at llvm.org
Sun Sep 17 07:24:54 PDT 2023


https://github.com/ingomueller-net updated https://github.com/llvm/llvm-project/pull/66575

>From 6dd76c0eaaf04153b291968bf4b7f470d00b8c7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ingo=20M=C3=BCller?= <ingomueller at google.com>
Date: Sat, 16 Sep 2023 13:03:02 +0000
Subject: [PATCH 1/2] Rename structured.{vectorize => vectorize_children}.

---
 .../Linalg/TransformOps/LinalgTransformOps.td |  37 +++---
 .../TransformOps/LinalgTransformOps.cpp       |  30 ++---
 .../dialects/_structured_transform_ops_ext.py |   4 +-
 mlir/test/Dialect/LLVM/transform-e2e.mlir     |   2 +-
 .../transform-op-matmul-to-outerproduct.mlir  |   2 +-
 .../Linalg/transform-op-vectorize.mlir        |  12 +-
 mlir/test/Dialect/Linalg/vectorization.mlir   | 114 +++++++++---------
 .../Linalg/vectorize-tensor-extract.mlir      |  24 ++--
 .../Transform/selective-targeting.mlir        |   6 +-
 .../test/Dialect/Vector/transform-vector.mlir |   2 +-
 .../dialects/transform_structured_ext.py      |  12 +-
 11 files changed, 124 insertions(+), 121 deletions(-)

diff --git a/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td b/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
index 74c0909ce58e88a..6bd93633aaa6d4b 100644
--- a/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
+++ b/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
@@ -1947,37 +1947,38 @@ def TileToForallOp :
 }
 
 //===----------------------------------------------------------------------===//
-// VectorizeOp
+// VectorizeChildrenOp
 //===----------------------------------------------------------------------===//
 
-def VectorizeOp : Op<Transform_Dialect, "structured.vectorize",
+def VectorizeChildrenOp : Op<Transform_Dialect, "structured.vectorize_children",
     [FunctionalStyleTransformOpTrait, MemoryEffectsOpInterface,
      TransformEachOpTrait, TransformOpInterface,
      ReportTrackingListenerFailuresOpTrait]> {
   let description = [{
-    Indicates that the given `target` op all the ops it contains should be
-    vectorized with the configuration specified by the attributes of this op.
-    This vectorization only handles structured ops that operate on shaped types
-    and does not vectorize loops or straight-line. Internally, it applies a
-    set of rewrite patterns, some of which enable vectorization and some of
-    which clean up the results. Therefore, it can only be applied to an op with
-    the "isolated from above property". If finer granularity is required, it can
-    be achieved by outlining the target part of the payload IR into, e.g., a
-    function, performing the transformation, and inlining it back. This
-    transformation only fails if the entire pattern rewriting failed, i.e., it
-    does **not** fail when no ops were vectorized.
-
-    Note that this transformation is invalidating the handles to any payload IR
+    Vectorizes all children contained in the given `target` using the
+    configuration specified by the attributes of this op. This only vectorizes
+    structured ops that operate on shaped types and does not vectorize loops or
+    straight-line. Internally, it applies a set of rewrite patterns, some of
+    which enable vectorization and some of which clean up the results.
+    Therefore, it can only be applied to an op with the "isolated from above"
+    property. This transformation only fails if the entire pattern rewriting
+    failed, i.e., it does **not** fail when no ops were vectorized.
+
+    Finer granularity can be achieved either with the `VectorizeOp` for
+    individual ops or by outlining the target part of the payload IR into, e.g.,
+    a function, performing this transformation, and inlining it back.
+
+    Note that this transformation invalidates the handles to any payload IR
     operation that is contained inside the vectorization target.
 
     This transformation supports the following attributes:
-      - `vectorize_padding`: a UnitAttr to activate the vectorization of
+    - `vectorize_padding`: a `UnitAttr` to activate the vectorization of
       `tensor.pad` ops. Different pipelines may prefer to lower such ops to
       loops.
-      - `disable_multi_reduction_to_contract_patterns`: a UnitAttr to deactivate
+    - `disable_multi_reduction_to_contract_patterns`: a `UnitAttr` to deactivate
       the rewrite of `vector.multi_reduction` to `vector.contract`. This is
       intended to be used in tests only.
-      - `disable_transfer_permutation_map_lowering_patterns`: a UnitAttr to
+    - `disable_transfer_permutation_map_lowering_patterns`: a `UnitAttr` to
       deactivate the rewrite of `vector.transfer` with permutation maps into
       explicit `vector.transpose` operations. This is intended to be used in
       tests only but may be promoted to a first class attribute in the future.
diff --git a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
index dc65ac509d280dc..f4fc35d686a023a 100644
--- a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
+++ b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
@@ -2904,27 +2904,30 @@ LogicalResult TileToForallOp::verify() {
 }
 
 //===----------------------------------------------------------------------===//
-// VectorizeOp
+// VectorizeChildrenOp
 //===----------------------------------------------------------------------===//
 
-void transform::VectorizeOp::build(OpBuilder &builder, OperationState &result,
-                                   Value target, bool vectorizePadding,
-                                   bool vectorizeExtract) {
+void transform::VectorizeChildrenOp::build(OpBuilder &builder,
+                                           OperationState &result, Value target,
+                                           bool vectorizePadding,
+                                           bool vectorizeExtract) {
   result.addOperands(target);
   if (vectorizePadding) {
-    result.addAttribute(VectorizeOp::getVectorizePaddingAttrName(result.name),
-                        builder.getUnitAttr());
+    result.addAttribute(
+        VectorizeChildrenOp::getVectorizePaddingAttrName(result.name),
+        builder.getUnitAttr());
   }
   if (vectorizeExtract) {
-    result.addAttribute(VectorizeOp::getVectorizeNdExtractAttrName(result.name),
-                        builder.getUnitAttr());
+    result.addAttribute(
+        VectorizeChildrenOp::getVectorizeNdExtractAttrName(result.name),
+        builder.getUnitAttr());
   }
   result.addTypes(transform::AnyOpType::get(builder.getContext()));
 }
 
 namespace {
 /// This is an helper only to call vectorize via a pattern inside of
-/// VectorizeOp::applyToOne.
+/// VectorizeChildrenOp::applyToOne.
 struct VectorizationPattern : public RewritePattern {
   explicit VectorizationPattern(MLIRContext *context,
                                 bool vectorizeExtract = false)
@@ -2946,11 +2949,10 @@ struct VectorizationPattern : public RewritePattern {
 };
 } // namespace
 
-DiagnosedSilenceableFailure
-transform::VectorizeOp::applyToOne(transform::TransformRewriter &rewriter,
-                                   Operation *target,
-                                   transform::ApplyToEachResultList &results,
-                                   transform::TransformState &state) {
+DiagnosedSilenceableFailure transform::VectorizeChildrenOp::applyToOne(
+    transform::TransformRewriter &rewriter, Operation *target,
+    transform::ApplyToEachResultList &results,
+    transform::TransformState &state) {
   if (!target->hasTrait<OpTrait::IsIsolatedFromAbove>()) {
     auto diag = this->emitOpError("requires isolated-from-above targets");
     diag.attachNote(target->getLoc()) << "non-isolated target";
diff --git a/mlir/python/mlir/dialects/_structured_transform_ops_ext.py b/mlir/python/mlir/dialects/_structured_transform_ops_ext.py
index c5134b6e718f3b8..911d46d24991522 100644
--- a/mlir/python/mlir/dialects/_structured_transform_ops_ext.py
+++ b/mlir/python/mlir/dialects/_structured_transform_ops_ext.py
@@ -724,8 +724,8 @@ def __init__(
         )
 
 
-class VectorizeOp:
-    """Specialization for VectorizeOp class."""
+class VectorizeChildrenOp:
+    """Specialization for VectorizeChildrenOp class."""
 
     def __init__(
         self,
diff --git a/mlir/test/Dialect/LLVM/transform-e2e.mlir b/mlir/test/Dialect/LLVM/transform-e2e.mlir
index 2cb753a3d7fb8f3..a976036fd71ceee 100644
--- a/mlir/test/Dialect/LLVM/transform-e2e.mlir
+++ b/mlir/test/Dialect/LLVM/transform-e2e.mlir
@@ -17,7 +17,7 @@ transform.sequence failures(propagate) {
   %0 = transform.structured.match ops{["linalg.matmul"]} in %module_op : (!transform.any_op) -> !transform.any_op
   %1, %loops:3 = transform.structured.tile %0 [2, 2, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
   %2 = get_parent_op %1 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  transform.structured.vectorize %2 : (!transform.any_op) -> !transform.any_op
+  transform.structured.vectorize_children %2 : (!transform.any_op) -> !transform.any_op
   %b = transform.bufferization.one_shot_bufferize layout{IdentityLayoutMap}
       %module_op {bufferize_function_boundaries = true}
       : (!transform.any_op) -> !transform.any_op
diff --git a/mlir/test/Dialect/Linalg/transform-op-matmul-to-outerproduct.mlir b/mlir/test/Dialect/Linalg/transform-op-matmul-to-outerproduct.mlir
index ea84b6b7587687a..4227b860e74f73c 100644
--- a/mlir/test/Dialect/Linalg/transform-op-matmul-to-outerproduct.mlir
+++ b/mlir/test/Dialect/Linalg/transform-op-matmul-to-outerproduct.mlir
@@ -31,7 +31,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
   transform.apply_patterns to %2 {
     transform.apply_patterns.vector.lower_contraction lowering_strategy = "outerproduct"
   } : !transform.any_op
diff --git a/mlir/test/Dialect/Linalg/transform-op-vectorize.mlir b/mlir/test/Dialect/Linalg/transform-op-vectorize.mlir
index b335a65250d93e6..ef318d0bb32993a 100644
--- a/mlir/test/Dialect/Linalg/transform-op-vectorize.mlir
+++ b/mlir/test/Dialect/Linalg/transform-op-vectorize.mlir
@@ -20,7 +20,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -45,7 +45,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -65,7 +65,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.copy"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -111,7 +111,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -159,7 +159,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 {vectorize_padding} : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 {vectorize_padding} : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -176,5 +176,5 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   // expected-error @below {{op requires isolated-from-above targets}}
-  %2 = transform.structured.vectorize %0 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %0 : (!transform.any_op) -> !transform.any_op
 }
diff --git a/mlir/test/Dialect/Linalg/vectorization.mlir b/mlir/test/Dialect/Linalg/vectorization.mlir
index a5ec058b6e02c9c..b6dd0cff8452fd2 100644
--- a/mlir/test/Dialect/Linalg/vectorization.mlir
+++ b/mlir/test/Dialect/Linalg/vectorization.mlir
@@ -32,7 +32,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.matvec"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { disable_multi_reduction_to_contract_patterns } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { disable_multi_reduction_to_contract_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -50,7 +50,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { disable_multi_reduction_to_contract_patterns } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { disable_multi_reduction_to_contract_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -69,7 +69,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.batch_matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { disable_multi_reduction_to_contract_patterns } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { disable_multi_reduction_to_contract_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -109,7 +109,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { disable_multi_reduction_to_contract_patterns, disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { disable_multi_reduction_to_contract_patterns, disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -149,7 +149,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { disable_multi_reduction_to_contract_patterns, disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { disable_multi_reduction_to_contract_patterns, disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -176,7 +176,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { disable_multi_reduction_to_contract_patterns, disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { disable_multi_reduction_to_contract_patterns, disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -216,7 +216,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { disable_multi_reduction_to_contract_patterns, disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { disable_multi_reduction_to_contract_patterns, disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -236,7 +236,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { disable_multi_reduction_to_contract_patterns } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { disable_multi_reduction_to_contract_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -260,7 +260,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -284,7 +284,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -329,7 +329,7 @@ transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
    %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-   %2 = transform.structured.vectorize %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
+   %2 = transform.structured.vectorize_children %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -346,7 +346,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.fill"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -364,7 +364,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.fill"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -381,7 +381,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["memref.copy"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -401,7 +401,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["memref.copy"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -417,7 +417,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["memref.copy"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -445,7 +445,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -474,7 +474,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -559,7 +559,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -650,7 +650,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 { disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 { disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -694,7 +694,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -737,7 +737,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -769,7 +769,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { disable_multi_reduction_to_contract_patterns, disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { disable_multi_reduction_to_contract_patterns, disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -798,7 +798,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 { vectorize_padding } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 { vectorize_padding } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -827,7 +827,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { vectorize_padding } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { vectorize_padding } : (!transform.any_op) -> !transform.any_op
 }
 
 
@@ -864,7 +864,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { vectorize_padding } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { vectorize_padding } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -884,7 +884,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { vectorize_padding } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { vectorize_padding } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -914,7 +914,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 { vectorize_padding } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 { vectorize_padding } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -947,7 +947,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4  { vectorize_padding } : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4  { vectorize_padding } : (!transform.any_op) -> !transform.any_op
 }
 
 
@@ -984,7 +984,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4 { vectorize_padding } : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4 { vectorize_padding } : (!transform.any_op) -> !transform.any_op
 }
 
 
@@ -1018,7 +1018,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4  { vectorize_padding } : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4  { vectorize_padding } : (!transform.any_op) -> !transform.any_op
 }
 
 
@@ -1046,7 +1046,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4 : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1083,7 +1083,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4  { vectorize_padding } : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4  { vectorize_padding } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1118,7 +1118,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4 : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1163,7 +1163,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4  { disable_multi_reduction_to_contract_patterns, disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4  { disable_multi_reduction_to_contract_patterns, disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1193,7 +1193,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4 { vectorize_padding } : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4 { vectorize_padding } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1224,7 +1224,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4 : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1254,7 +1254,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4 : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1284,7 +1284,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4 : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1314,7 +1314,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4 : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1344,7 +1344,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4 : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1378,7 +1378,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4 : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1416,11 +1416,11 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.fill"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 
   %3 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4 : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1463,7 +1463,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 
@@ -1494,7 +1494,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1533,7 +1533,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { disable_multi_reduction_to_contract_patterns, disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { disable_multi_reduction_to_contract_patterns, disable_transfer_permutation_map_lowering_patterns } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1557,7 +1557,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.map"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1576,7 +1576,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.transpose"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1599,13 +1599,13 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.reduce"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
 
 // This is a regression test. This IR cannot be vectorized, but
-// structured.vectorize should nevertheless succeed. : (!transform.any_op) -> !transform.any_op
+// structured.vectorize_children should nevertheless succeed.
 
 #map = affine_map<(d0) -> (d0)>
 // CHECK-LABEL:   @not_vectorizable
@@ -1631,7 +1631,7 @@ func.func @not_vectorizable(%arg0: tensor<1x?xf32>, %arg1: index, %arg2: index,
 transform.sequence failures(propagate) {
 ^bb0(%arg0: !transform.any_op):
   %0 = transform.structured.match ops{["func.func"]} in %arg0 : (!transform.any_op) -> !transform.any_op
-  %1 = transform.structured.vectorize %0 : (!transform.any_op) -> !transform.any_op
+  %1 = transform.structured.vectorize_children %0 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1666,7 +1666,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // CHECK-LABEL: @wrong_reduction_detection
@@ -1695,7 +1695,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1716,7 +1716,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1  { vectorize_padding } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1  { vectorize_padding } : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -1738,7 +1738,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4 : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4 : (!transform.any_op) -> !transform.any_op
 }
 
 // CHECK-LABEL: func @zero_dim_tensor
@@ -1775,7 +1775,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %3 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %4 = get_parent_op %3 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %5 = transform.structured.vectorize %4 : (!transform.any_op) -> !transform.any_op
+  %5 = transform.structured.vectorize_children %4 : (!transform.any_op) -> !transform.any_op
 }
 
 // CHECK-LABEL: func @multi_output_generic_different_perm_maps
diff --git a/mlir/test/Dialect/Linalg/vectorize-tensor-extract.mlir b/mlir/test/Dialect/Linalg/vectorize-tensor-extract.mlir
index 84e36c8912c6501..8cd1fb7685bb917 100644
--- a/mlir/test/Dialect/Linalg/vectorize-tensor-extract.mlir
+++ b/mlir/test/Dialect/Linalg/vectorize-tensor-extract.mlir
@@ -31,7 +31,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
 }
 
 // -----
@@ -104,7 +104,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
 }
 
  // -----
@@ -156,7 +156,7 @@ transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
    %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-   %2 = transform.structured.vectorize %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
+   %2 = transform.structured.vectorize_children %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
  }
 
 // -----
@@ -204,7 +204,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  %2 = transform.structured.vectorize %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
+  %2 = transform.structured.vectorize_children %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
 }
 // -----
 
@@ -248,7 +248,7 @@ transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
    %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-   %2 = transform.structured.vectorize %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
+   %2 = transform.structured.vectorize_children %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
  }
 
 // -----
@@ -290,7 +290,7 @@ transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
    %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-   %2 = transform.structured.vectorize %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
+   %2 = transform.structured.vectorize_children %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
  }
 
 // -----
@@ -332,7 +332,7 @@ transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
    %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-   %2 = transform.structured.vectorize %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
+   %2 = transform.structured.vectorize_children %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
  }
 
 // -----
@@ -376,7 +376,7 @@ transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
    %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-   %2 = transform.structured.vectorize %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
+   %2 = transform.structured.vectorize_children %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
  }
 
 // -----
@@ -416,7 +416,7 @@ transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
    %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-   %2 = transform.structured.vectorize %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
+   %2 = transform.structured.vectorize_children %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
  }
 
 // -----
@@ -456,7 +456,7 @@ transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
    %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-   %2 = transform.structured.vectorize %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
+   %2 = transform.structured.vectorize_children %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
  }
 
 // -----
@@ -495,7 +495,7 @@ transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
    %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-   %2 = transform.structured.vectorize %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
+   %2 = transform.structured.vectorize_children %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
  }
 
 // -----
@@ -522,5 +522,5 @@ transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
    %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-   %2 = transform.structured.vectorize %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
+   %2 = transform.structured.vectorize_children %1 { vectorize_nd_extract } : (!transform.any_op) -> !transform.any_op
  }
diff --git a/mlir/test/Dialect/Transform/selective-targeting.mlir b/mlir/test/Dialect/Transform/selective-targeting.mlir
index 5bf47fd75d3d200..98c91e2267f9a83 100644
--- a/mlir/test/Dialect/Transform/selective-targeting.mlir
+++ b/mlir/test/Dialect/Transform/selective-targeting.mlir
@@ -80,7 +80,7 @@ transform.with_pdl_patterns {
     transform.structured.tile %0 [4, 4, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
     %1 = pdl_match @pdl_target_attrC in %arg1 : (!transform.any_op) -> !transform.any_op
     %2 = get_parent_op %1 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-    transform.structured.vectorize %2 : (!transform.any_op) -> !transform.any_op
+    transform.structured.vectorize_children %2 : (!transform.any_op) -> !transform.any_op
   }
 }
 
@@ -125,7 +125,7 @@ transform.with_pdl_patterns {
   ^bb1(%arg1: !transform.any_op):
     %0 = pdl_match @pdl_target in %arg1 : (!transform.any_op) -> !transform.any_op
     %1 = get_parent_op %0 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-    transform.structured.vectorize %1 : (!transform.any_op) -> !transform.any_op
+    transform.structured.vectorize_children %1 : (!transform.any_op) -> !transform.any_op
   }
 }
 
@@ -150,5 +150,5 @@ func.func @vectorize_all(
 
 transform.sequence failures(propagate) {
 ^bb0(%arg0: !transform.any_op):
-  transform.structured.vectorize %arg0 : (!transform.any_op) -> !transform.any_op
+  transform.structured.vectorize_children %arg0 : (!transform.any_op) -> !transform.any_op
 }
diff --git a/mlir/test/Dialect/Vector/transform-vector.mlir b/mlir/test/Dialect/Vector/transform-vector.mlir
index 3e62a8fbf718f92..b5cb3c7249d5088 100644
--- a/mlir/test/Dialect/Vector/transform-vector.mlir
+++ b/mlir/test/Dialect/Vector/transform-vector.mlir
@@ -19,7 +19,7 @@ transform.sequence failures(propagate) {
   %1, %loops:3 = transform.structured.tile %0 [8, 4, 2]
     : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
   %2 = get_parent_op %1 {isolated_from_above} : (!transform.any_op) -> !transform.any_op
-  transform.structured.vectorize %2 : (!transform.any_op) -> !transform.any_op
+  transform.structured.vectorize_children %2 : (!transform.any_op) -> !transform.any_op
   %b = transform.bufferization.one_shot_bufferize
       layout{IdentityLayoutMap} %module_op
       {bufferize_function_boundaries = true, allow_return_allocs = true}
diff --git a/mlir/test/python/dialects/transform_structured_ext.py b/mlir/test/python/dialects/transform_structured_ext.py
index 5d5ee945b66867e..4860f86c98c09cd 100644
--- a/mlir/test/python/dialects/transform_structured_ext.py
+++ b/mlir/test/python/dialects/transform_structured_ext.py
@@ -487,15 +487,15 @@ def testTileToForallMapping(target):
 
 @run
 @create_sequence
-def testVectorizeAllAttrs(target):
-    structured.VectorizeOp(
+def testVectorizeChildrenAllAttrs(target):
+    structured.VectorizeChildrenOp(
         target,
         disable_multi_reduction_to_contract_patterns=True,
         disable_transfer_permutation_map_lowering_patterns=True,
         vectorize_nd_extract=True,
         vectorize_padding=True,
     )
-    # CHECK-LABEL: TEST: testVectorizeAllAttrs
+    # CHECK-LABEL: TEST: testVectorizeChildrenAllAttrs
     # CHECK: transform.sequence
     # CHECK: = transform.structured.vectorize
     # CHECK-SAME: disable_multi_reduction_to_contract_patterns
@@ -506,15 +506,15 @@ def testVectorizeAllAttrs(target):
 
 @run
 @create_sequence
-def testVectorizeNoAttrs(target):
-    structured.VectorizeOp(
+def testVectorizeChildrenNoAttrs(target):
+    structured.VectorizeChildrenOp(
         target,
         disable_multi_reduction_to_contract_patterns=False,
         disable_transfer_permutation_map_lowering_patterns=False,
         vectorize_nd_extract=False,
         vectorize_padding=False,
     )
-    # CHECK-LABEL: TEST: testVectorizeNoAttrs
+    # CHECK-LABEL: TEST: testVectorizeChildrenNoAttrs
     # CHECK: transform.sequence
     # CHECK: = transform.structured.vectorize
     # CHECK-NOT: disable_multi_reduction_to_contract_patterns

>From 888b52f48bf0f32971bff844c3f52df680bb2f58 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ingo=20M=C3=BCller?= <ingomueller at google.com>
Date: Sun, 17 Sep 2023 14:22:41 +0000
Subject: [PATCH 2/2] Rename structured.{masked_vectorize => vectorize}.

---
 .../Linalg/TransformOps/LinalgTransformOps.td |  6 +--
 .../TransformOps/LinalgTransformOps.cpp       | 10 ++---
 .../dialects/_structured_transform_ops_ext.py |  4 +-
 .../Dialect/Linalg/masked_vectorization.mlir  |  2 +-
 .../Linalg/matmul-shared-memory-padding.mlir  |  8 ++--
 .../Linalg/pad-to-specific-memory-space.mlir  |  2 +-
 .../Dialect/Linalg/vectorization-masked.mlir  | 30 +++++++-------
 .../Linalg/vectorization-scalable.mlir        |  8 ++--
 mlir/test/Dialect/Linalg/vectorization.mlir   |  2 +-
 .../vectorize-tensor-extract-masked.mlir      | 12 +++---
 .../Linalg/vectorize-tensor-extract.mlir      |  2 +-
 .../Dialect/Linalg/CPU/ArmSME/fill-2d.mlir    |  2 +-
 .../Dialect/Linalg/CPU/ArmSVE/fill-1d.mlir    |  2 +-
 .../Linalg/CPU/test-matmul-masked-vec.mlir    |  2 +-
 .../dialects/transform_structured_ext.py      | 40 +++++++++----------
 15 files changed, 66 insertions(+), 66 deletions(-)

diff --git a/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td b/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
index 6bd93633aaa6d4b..bcfee42f96abbe2 100644
--- a/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
+++ b/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
@@ -2016,7 +2016,7 @@ def VectorizeChildrenOp : Op<Transform_Dialect, "structured.vectorize_children",
   }];
 }
 
-def MaskedVectorizeOp : Op<Transform_Dialect, "structured.masked_vectorize",
+def VectorizeOp : Op<Transform_Dialect, "structured.vectorize",
     [DeclareOpInterfaceMethods<MemoryEffectsOpInterface>,
      TransformOpInterface, ReportTrackingListenerFailuresOpTrait]> {
   let description = [{
@@ -2030,9 +2030,9 @@ def MaskedVectorizeOp : Op<Transform_Dialect, "structured.masked_vectorize",
 
     ```mlir
     # Masked vectorization - vector sizes are specified explicitly
-    transform.structured.masked_vectorize %target vector_sizes [1, 4] : !transform.any_op
+    transform.structured.vectorize %target vector_sizes [1, 4] : !transform.any_op
     # Regular vectorization - vector sizes are inferred from the target Op
-    transform.structured.masked_vectorize %target : !transform.any_op
+    transform.structured.vectorize %target : !transform.any_op
     ```
 
     The vector sizes can be either static or dynamic (SSA values). In case of
diff --git a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
index f4fc35d686a023a..6662e374e4830b9 100644
--- a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
+++ b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
@@ -2994,9 +2994,9 @@ DiagnosedSilenceableFailure transform::VectorizeChildrenOp::applyToOne(
 }
 
 //===----------------------------------------------------------------------===//
-// MaskedVectorizeOp
+// VectorizeOp
 //===----------------------------------------------------------------------===//
-DiagnosedSilenceableFailure transform::MaskedVectorizeOp::apply(
+DiagnosedSilenceableFailure transform::VectorizeOp::apply(
     transform::TransformRewriter &rewriter,
     mlir::transform::TransformResults &transformResults,
     mlir::transform::TransformState &state) {
@@ -3060,19 +3060,19 @@ DiagnosedSilenceableFailure transform::MaskedVectorizeOp::apply(
   return DiagnosedSilenceableFailure::success();
 }
 
-void transform::MaskedVectorizeOp::getEffects(
+void transform::VectorizeOp::getEffects(
     SmallVectorImpl<MemoryEffects::EffectInstance> &effects) {
   consumesHandle(getTarget(), effects);
   onlyReadsHandle(getVectorSizes(), effects);
   modifiesPayload(effects);
 }
 
-SmallVector<OpFoldResult> MaskedVectorizeOp::getMixedVectorSizes() {
+SmallVector<OpFoldResult> VectorizeOp::getMixedVectorSizes() {
   OpBuilder b(getContext());
   return getMixedValues(getStaticVectorSizes(), getVectorSizes(), b);
 }
 
-LogicalResult transform::MaskedVectorizeOp::verify() {
+LogicalResult transform::VectorizeOp::verify() {
   if (getStaticVectorSizes().size() != getScalableSizes().size())
     return emitOpError("expected same number of vector sizes (")
            << getStaticVectorSizes().size() << ") and scalable sizes ("
diff --git a/mlir/python/mlir/dialects/_structured_transform_ops_ext.py b/mlir/python/mlir/dialects/_structured_transform_ops_ext.py
index 911d46d24991522..57d0f55b40e4f24 100644
--- a/mlir/python/mlir/dialects/_structured_transform_ops_ext.py
+++ b/mlir/python/mlir/dialects/_structured_transform_ops_ext.py
@@ -360,8 +360,8 @@ def __init__(
         )
 
 
-class MaskedVectorizeOp:
-    """Specialization for MaskedVectorizeOp class."""
+class VectorizeOp:
+    """Specialization for VectorizeOp class."""
 
     def __init__(
         self,
diff --git a/mlir/test/Dialect/Linalg/masked_vectorization.mlir b/mlir/test/Dialect/Linalg/masked_vectorization.mlir
index 8797d847c43a952..07cb79fdba2d242 100644
--- a/mlir/test/Dialect/Linalg/masked_vectorization.mlir
+++ b/mlir/test/Dialect/Linalg/masked_vectorization.mlir
@@ -26,7 +26,7 @@ transform.sequence  failures(propagate) {
     : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
   %tiled_linalg_op_0, %loops_1:3 = transform.structured.tile %tiled_linalg_op[8, 8, 8] 
     : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
-  transform.structured.masked_vectorize %tiled_linalg_op_0 vector_sizes [8, 8, 8] 
+  transform.structured.vectorize %tiled_linalg_op_0 vector_sizes [8, 8, 8]
     : !transform.any_op
 
   %func = transform.structured.match ops{["func.func"]} in %module 
diff --git a/mlir/test/Dialect/Linalg/matmul-shared-memory-padding.mlir b/mlir/test/Dialect/Linalg/matmul-shared-memory-padding.mlir
index da6ebdbd24ded48..37a925cf0df9a3a 100644
--- a/mlir/test/Dialect/Linalg/matmul-shared-memory-padding.mlir
+++ b/mlir/test/Dialect/Linalg/matmul-shared-memory-padding.mlir
@@ -80,7 +80,7 @@ transform.sequence failures(propagate) {
       : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
 
   // Apply masked vectorization to padding ops.
-  transform.structured.masked_vectorize %tiled_pad_op vector_sizes [128, 4]
+  transform.structured.vectorize %tiled_pad_op vector_sizes [128, 4]
       : !transform.any_op
 
   // Assign shared memory buffer to padding.
@@ -105,7 +105,7 @@ transform.sequence failures(propagate) {
       : (!transform.any_op) -> !transform.any_op
   %bufferized_copy_back = transform.structured.match ops{["linalg.copy"]} in %func_op_2
       : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize
+  transform.structured.vectorize
       %bufferized_copy_back vector_sizes [128, 4] : !transform.any_op
 
   // Canonicalize, cleanup and vector lowering. This step also removes buffer
@@ -192,7 +192,7 @@ transform.sequence failures(propagate) {
   }
 
   // Apply masked vectorization to padding ops.
-  transform.structured.masked_vectorize %tiled_pad_op vector_sizes [128, 4]
+  transform.structured.vectorize %tiled_pad_op vector_sizes [128, 4]
       : !transform.any_op
 
   // Assign shared memory buffer to padding.
@@ -217,7 +217,7 @@ transform.sequence failures(propagate) {
       : (!transform.any_op) -> !transform.any_op
   %bufferized_copy_back = transform.structured.match ops{["linalg.copy"]} in %func_op_2
       : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize
+  transform.structured.vectorize
       %bufferized_copy_back vector_sizes [128, 4] : !transform.any_op
 
   // Canonicalize, cleanup and vector lowering. This step also removes buffer
diff --git a/mlir/test/Dialect/Linalg/pad-to-specific-memory-space.mlir b/mlir/test/Dialect/Linalg/pad-to-specific-memory-space.mlir
index 45c2eb5dfdf5022..be807a9d5691733 100644
--- a/mlir/test/Dialect/Linalg/pad-to-specific-memory-space.mlir
+++ b/mlir/test/Dialect/Linalg/pad-to-specific-memory-space.mlir
@@ -111,7 +111,7 @@ transform.sequence failures(propagate) {
     padding_dimensions=[0, 1, 2],
     pack_paddings=[1, 1, 1]
   } : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
-  transform.structured.masked_vectorize %pad vector_sizes [10, 12] : !transform.any_op
+  transform.structured.vectorize %pad vector_sizes [10, 12] : !transform.any_op
   %vector_write = transform.structured.match ops{["vector.transfer_write"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %mask_op = transform.get_parent_op %vector_write {op_name = "vector.mask"} : (!transform.any_op) -> !transform.any_op
   %buffer, %new_ops = transform.structured.bufferize_to_allocation %mask_op {memory_space = 3, emit_dealloc} : !transform.any_op
diff --git a/mlir/test/Dialect/Linalg/vectorization-masked.mlir b/mlir/test/Dialect/Linalg/vectorization-masked.mlir
index 82e8dfe37f79992..ddeaff76a04df23 100644
--- a/mlir/test/Dialect/Linalg/vectorization-masked.mlir
+++ b/mlir/test/Dialect/Linalg/vectorization-masked.mlir
@@ -29,7 +29,7 @@ func.func @vectorize_dynamic_identity(%arg0: tensor<?xf32>,
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [4] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [4] : !transform.any_op
 }
 
 // -----
@@ -63,7 +63,7 @@ func.func @vectorize_dynamic_1d_broadcast(%arg0: tensor<?xf32>,
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [4] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [4] : !transform.any_op
 }
 
 // -----
@@ -101,7 +101,7 @@ func.func @vectorize_dynamic_2d_transpose(%arg0: tensor<?x?xf32>,
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [4, 8] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [4, 8] : !transform.any_op
 }
 
 // -----
@@ -138,7 +138,7 @@ func.func @vectorize_dynamic_generic_2d_broadcast(%arg0: tensor<?x?xf32>,
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [4, 8] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [4, 8] : !transform.any_op
 }
 
 // -----
@@ -160,7 +160,7 @@ func.func @vectorize_dynamic_reduction(%arg0: tensor<?x?xf32>,
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [4, 8] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [4, 8] : !transform.any_op
 }
 
 // CHECK-LABEL:   @vectorize_dynamic_reduction(
@@ -198,7 +198,7 @@ func.func @vectorize_dynamic_transpose_reduction(%arg0: tensor<?x?x?xf32>,
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [4, 8, 16] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [4, 8, 16] : !transform.any_op
 }
 
 // CHECK-LABEL:   @vectorize_dynamic_transpose_reduction(
@@ -256,7 +256,7 @@ func.func @vectorize_partial_dynamic_identity(%arg0: tensor<8x?xf32>,
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [8, 32] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [8, 32] : !transform.any_op
 }
 
 // -----
@@ -283,7 +283,7 @@ func.func @do_not_generate_masks(%arg0: tensor<8x32xf32>,
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [8, 32] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [8, 32] : !transform.any_op
 }
 
 // -----
@@ -323,7 +323,7 @@ func.func @vectorize_static_shape_with_mask(%arg0: tensor<8x30xf32>,
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [8, 32] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [8, 32] : !transform.any_op
 }
 
 // -----
@@ -343,7 +343,7 @@ func.func @vectorize_dynamic_fill(%A : tensor<?x?xf32>, %arg0 : f32) -> tensor<?
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.fill"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [8, 16] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [8, 16] : !transform.any_op
 }
 
 // -----
@@ -364,7 +364,7 @@ func.func @test_masked_vectorize_linalg_copy(%A : memref<?x?xf32>, %B : memref<?
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.copy"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [2, 4] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [2, 4] : !transform.any_op
 }
 
 // -----
@@ -400,7 +400,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["tensor.pad"]} in %arg1
     : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [2, 4] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [2, 4] : !transform.any_op
 }
 
 // -----
@@ -442,7 +442,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["tensor.pad"]} in %arg1
     : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [2, 4] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [2, 4] : !transform.any_op
 }
 
 // -----
@@ -476,7 +476,7 @@ func.func @matmul(%A: memref<?x?xf32>, %B: memref<?x?xf32>, %C: memref<?x?xf32>)
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %matmul = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %matmul vector_sizes [8, 16, 4] : !transform.any_op
+  transform.structured.vectorize %matmul vector_sizes [8, 16, 4] : !transform.any_op
 }
 
 // -----
@@ -510,5 +510,5 @@ func.func @matmul_scalable(%A: memref<?x?xf32>, %B: memref<?x?xf32>, %C: memref<
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %matmul = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %matmul vector_sizes [8, [16], 4] : !transform.any_op
+  transform.structured.vectorize %matmul vector_sizes [8, [16], 4] : !transform.any_op
 }
diff --git a/mlir/test/Dialect/Linalg/vectorization-scalable.mlir b/mlir/test/Dialect/Linalg/vectorization-scalable.mlir
index 957313b43d4b309..641b626f576e1ea 100644
--- a/mlir/test/Dialect/Linalg/vectorization-scalable.mlir
+++ b/mlir/test/Dialect/Linalg/vectorization-scalable.mlir
@@ -29,7 +29,7 @@ func.func @vectorize_dynamic_identity(%arg0: tensor<?xf32>,
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [[4]] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [[4]] : !transform.any_op
 }
 
 // -----
@@ -71,7 +71,7 @@ func.func @vectorize_partial_dynamic_identity(%arg0: tensor<8x?xf32>,
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [8, [32]] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [8, [32]] : !transform.any_op
 }
 
 // -----
@@ -111,7 +111,7 @@ func.func @vectorize_static_shape_with_mask(%arg0: tensor<8x30xf32>,
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [8, [32]] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [8, [32]] : !transform.any_op
 }
 
 // -----
@@ -131,6 +131,6 @@ func.func @vectorize_dynamic_fill(%A : tensor<?x?xf32>, %arg0 : f32) -> tensor<?
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.fill"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [8, [16]] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [8, [16]] : !transform.any_op
 }
 
diff --git a/mlir/test/Dialect/Linalg/vectorization.mlir b/mlir/test/Dialect/Linalg/vectorization.mlir
index b6dd0cff8452fd2..f31197f0ed85808 100644
--- a/mlir/test/Dialect/Linalg/vectorization.mlir
+++ b/mlir/test/Dialect/Linalg/vectorization.mlir
@@ -13,7 +13,7 @@ func.func @contraction_dot(%A: memref<1584xf32>, %B: memref<1584xf32>, %C: memre
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.dot"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0  : !transform.any_op
+  transform.structured.vectorize %0  : !transform.any_op
 }
 
 // -----
diff --git a/mlir/test/Dialect/Linalg/vectorize-tensor-extract-masked.mlir b/mlir/test/Dialect/Linalg/vectorize-tensor-extract-masked.mlir
index da861942cc3eff7..3187385b5398816 100644
--- a/mlir/test/Dialect/Linalg/vectorize-tensor-extract-masked.mlir
+++ b/mlir/test/Dialect/Linalg/vectorize-tensor-extract-masked.mlir
@@ -28,7 +28,7 @@ func.func @masked_static_vectorize_nd_tensor_extract_with_affine_apply_contiguou
 transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-   transform.structured.masked_vectorize %0 vector_sizes [1, 4] vectorize_nd_extract : !transform.any_op
+   transform.structured.vectorize %0 vector_sizes [1, 4] vectorize_nd_extract : !transform.any_op
  }
 
  // -----
@@ -83,7 +83,7 @@ func.func @masked_dynamic_vectorize_nd_tensor_extract_with_affine_apply_contiguo
 transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-   transform.structured.masked_vectorize %0 vector_sizes [1, 4] vectorize_nd_extract : !transform.any_op
+   transform.structured.vectorize %0 vector_sizes [1, 4] vectorize_nd_extract : !transform.any_op
 }
 
 // -----
@@ -121,7 +121,7 @@ func.func @masked_vectorize_nd_tensor_extract_with_affine_apply_gather(%6: tenso
 transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-   transform.structured.masked_vectorize %0 vector_sizes [1, 4] vectorize_nd_extract : !transform.any_op
+   transform.structured.vectorize %0 vector_sizes [1, 4] vectorize_nd_extract : !transform.any_op
  }
 
  // -----
@@ -176,7 +176,7 @@ func.func @masked_dynamic_vectorize_nd_tensor_extract_with_affine_apply_gather(%
 transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-   transform.structured.masked_vectorize %0 vector_sizes [1, 4] vectorize_nd_extract : !transform.any_op
+   transform.structured.vectorize %0 vector_sizes [1, 4] vectorize_nd_extract : !transform.any_op
  }
 
 // -----
@@ -226,7 +226,7 @@ func.func @extract_masked_vectorize(%arg0: tensor<?x?xf32>, %arg1: tensor<?x?xf3
 transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-   transform.structured.masked_vectorize %0 vector_sizes [3, 3] vectorize_nd_extract : !transform.any_op
+   transform.structured.vectorize %0 vector_sizes [3, 3] vectorize_nd_extract : !transform.any_op
  }
 
 // -----
@@ -269,5 +269,5 @@ func.func @tensor_extract_dynamic_shape(%arg1: tensor<123x321xf32>, %arg2: tenso
 transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-   transform.structured.masked_vectorize %0 vector_sizes [1, 3, 8] vectorize_nd_extract : !transform.any_op
+   transform.structured.vectorize %0 vector_sizes [1, 3, 8] vectorize_nd_extract : !transform.any_op
 }
diff --git a/mlir/test/Dialect/Linalg/vectorize-tensor-extract.mlir b/mlir/test/Dialect/Linalg/vectorize-tensor-extract.mlir
index 8cd1fb7685bb917..ccc076c9c44903b 100644
--- a/mlir/test/Dialect/Linalg/vectorize-tensor-extract.mlir
+++ b/mlir/test/Dialect/Linalg/vectorize-tensor-extract.mlir
@@ -65,7 +65,7 @@ func.func @vectorize_nd_tensor_extract_constant_idx(%arg0: tensor<3x3xf32>, %arg
 transform.sequence failures(propagate) {
  ^bb1(%arg1: !transform.any_op):
    %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 { vectorize_nd_extract }  : !transform.any_op
+  transform.structured.vectorize %0 { vectorize_nd_extract }  : !transform.any_op
  }
 
 // -----
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/fill-2d.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/fill-2d.mlir
index dabf0dac4680e5f..08f14dfae3249f2 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/fill-2d.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/ArmSME/fill-2d.mlir
@@ -112,7 +112,7 @@ func.func @entry() {
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.fill"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [[4], [4]] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [[4], [4]] : !transform.any_op
 }
 
 llvm.func @printCString(!llvm.ptr<i8>)
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/fill-1d.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/fill-1d.mlir
index 34b3835c40775b8..c3f49b2f39cf137 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/fill-1d.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/fill-1d.mlir
@@ -49,7 +49,7 @@ func.func @entry() {
 transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.fill"]} in %arg1 : (!transform.any_op) -> !transform.any_op
-  transform.structured.masked_vectorize %0 vector_sizes [[4]] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [[4]] : !transform.any_op
 }
 
 llvm.func @printCString(!llvm.ptr<i8>)
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-matmul-masked-vec.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-matmul-masked-vec.mlir
index 8a95d1c864d21cc..64954098aa03c56 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/test-matmul-masked-vec.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-matmul-masked-vec.mlir
@@ -51,7 +51,7 @@ transform.sequence failures(propagate) {
 ^bb1(%arg1: !transform.any_op):
   %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
   %func_op = get_parent_op %0 : (!transform.any_op) -> !transform.op<"func.func">
-  transform.structured.masked_vectorize %0 vector_sizes [4, 4, 2] : !transform.any_op
+  transform.structured.vectorize %0 vector_sizes [4, 4, 2] : !transform.any_op
   transform.apply_patterns to %func_op {
     transform.apply_patterns.vector.lower_multi_reduction lowering_strategy = "innerreduction"
   } : !transform.op<"func.func">
diff --git a/mlir/test/python/dialects/transform_structured_ext.py b/mlir/test/python/dialects/transform_structured_ext.py
index 4860f86c98c09cd..91c14abede7f367 100644
--- a/mlir/test/python/dialects/transform_structured_ext.py
+++ b/mlir/test/python/dialects/transform_structured_ext.py
@@ -171,58 +171,58 @@ def testMatchOpNamesList(target):
 
 @run
 @create_sequence
-def testMaskedVectorizeStatic(target):
-    structured.MaskedVectorizeOp(target, [16, 4])
-    # CHECK-LABEL: TEST: testMaskedVectorizeStatic
+def testVectorizeStatic(target):
+    structured.VectorizeOp(target, [16, 4])
+    # CHECK-LABEL: TEST: testVectorizeStatic
     # CHECK: transform.sequence
-    # CHECK: transform.structured.masked_vectorize
+    # CHECK: transform.structured.vectorize
     # CHECK-SAME:     vector_sizes [16, 4]
 
 
 @run
 @create_sequence
-def testMaskedVectorizeArray(target):
+def testVectorizeArray(target):
     sizes = Attribute.parse("[16, 4]")
-    structured.MaskedVectorizeOp(target, sizes)
-    # CHECK-LABEL: TEST: testMaskedVectorizeArray
+    structured.VectorizeOp(target, sizes)
+    # CHECK-LABEL: TEST: testVectorizeArray
     # CHECK: transform.sequence
-    # CHECK: transform.structured.masked_vectorize
+    # CHECK: transform.structured.vectorize
     # CHECK-SAME:     vector_sizes [16, 4]
 
 
 @run
 @create_sequence
-def testMaskedVectorizeMixed(target):
+def testVectorizeMixed(target):
     sz1 = structured.MatchOp.match_op_names(target, ["arith.constant"])
     sz2 = Attribute.parse("4")
-    structured.MaskedVectorizeOp(target, [sz1, sz2])
-    # CHECK-LABEL: TEST: testMaskedVectorizeMixed
+    structured.VectorizeOp(target, [sz1, sz2])
+    # CHECK-LABEL: TEST: testVectorizeMixed
     # CHECK: transform.sequence
     # CHECK: %[[V0:.*]] = transform.structured.match
-    # CHECK: transform.structured.masked_vectorize
+    # CHECK: transform.structured.vectorize
     # CHECK-SAME:     vector_sizes [%[[V0]] : !transform.any_op, 4]
 
 
 @run
 @create_sequence
-def testMaskedVectorizeScalable(target):
+def testVectorizeScalable(target):
     sz1 = structured.MatchOp.match_op_names(target, ["arith.constant"])
     sz2 = Attribute.parse("4")
-    structured.MaskedVectorizeOp(target, [16, [sz1], [sz2], [8]])
-    # CHECK-LABEL: TEST: testMaskedVectorizeScalable
+    structured.VectorizeOp(target, [16, [sz1], [sz2], [8]])
+    # CHECK-LABEL: TEST: testVectorizeScalable
     # CHECK: transform.sequence
     # CHECK-DAG: %[[V0:.*]] = transform.structured.match
-    # CHECK-DAG: transform.structured.masked_vectorize
+    # CHECK-DAG: transform.structured.vectorize
     # CHECK-SAME:     vector_sizes [16, [%[[V0]] : !transform.any_op], [4], [8]]
 
 
 @run
 @create_sequence
-def testMaskedVectorizeArgs(target):
-    structured.MaskedVectorizeOp(target, [16, 4], vectorize_nd_extract=True)
-    # CHECK-LABEL: TEST: testMaskedVectorizeArgs
+def testVectorizeArgs(target):
+    structured.VectorizeOp(target, [16, 4], vectorize_nd_extract=True)
+    # CHECK-LABEL: TEST: testVectorizeArgs
     # CHECK: transform.sequence
-    # CHECK: transform.structured.masked_vectorize
+    # CHECK: transform.structured.vectorize
     # CHECK-SAME: vectorize_nd_extract
 
 



More information about the Mlir-commits mailing list