[Mlir-commits] [mlir] 9813c18 - [mlir] NFC: use !transform.any_op in relevant tests
Alex Zinenko
llvmlistbot at llvm.org
Mon May 22 01:19:57 PDT 2023
Author: Alex Zinenko
Date: 2023-05-22T08:19:46Z
New Revision: 9813c184f76666af78da44b13191ace68d8fca27
URL: https://github.com/llvm/llvm-project/commit/9813c184f76666af78da44b13191ace68d8fca27
DIFF: https://github.com/llvm/llvm-project/commit/9813c184f76666af78da44b13191ace68d8fca27.diff
LOG: [mlir] NFC: use !transform.any_op in relevant tests
Update various tests using Transform dialect extensions to pervasively
use `!transform.any_op` instead of `!pdl.operation`. Tests are sometimes
used as source of knowledge for best practices and these were doing the
opposite of what is considered best practices per
https://discourse.llvm.org/t/rfc-type-system-for-the-transform-dialect/65702.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D150785
Added:
Modified:
mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
mlir/test/Dialect/SCF/transform-op-coalesce.mlir
mlir/test/Dialect/SCF/transform-ops-invalid.mlir
mlir/test/Dialect/SCF/transform-ops.mlir
mlir/test/Dialect/Vector/vector-broadcast-lowering-transforms.mlir
mlir/test/Dialect/Vector/vector-contract-matvec-transforms.mlir
mlir/test/Dialect/Vector/vector-contract-to-dot-transforms.mlir
mlir/test/Dialect/Vector/vector-contract-to-matrix-intrinsics-transforms.mlir
mlir/test/Dialect/Vector/vector-contract-to-outerproduct-transforms.mlir
mlir/test/Dialect/Vector/vector-contract-to-parallel-arith-transforms.mlir
mlir/test/Dialect/Vector/vector-mask-lowering-transforms.mlir
mlir/test/Dialect/Vector/vector-multi-reduction-lowering.mlir
mlir/test/Dialect/Vector/vector-multi-reduction-outer-lowering.mlir
mlir/test/Dialect/Vector/vector-outerproduct-lowering-transforms.mlir
mlir/test/Dialect/Vector/vector-shape-cast-lowering-transforms.mlir
mlir/test/Dialect/Vector/vector-transfer-drop-unit-dims-patterns.mlir
mlir/test/Dialect/Vector/vector-transfer-full-partial-split-copy-transform.mlir
mlir/test/Dialect/Vector/vector-transfer-full-partial-split.mlir
mlir/test/Dialect/Vector/vector-transfer-to-vector-load-store.mlir
mlir/test/Dialect/Vector/vector-transpose-lowering.mlir
mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir
mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir
mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir
mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir
mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir
mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir
mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir
mlir/test/python/dialects/transform.py
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td b/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
index 4f78b7d6c80d0..179cafdbf274f 100644
--- a/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
+++ b/mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
@@ -819,7 +819,7 @@ def HoistPadBuildPackingLoopNestOp :
loop nests, which can be empty.
}];
- // Also allow any !pdl.operation for simpler composition. Non-tensor.pad ops
+ // Also allow any payload operation for simpler composition. Non-tensor.pad ops
// will be dropped from the results.
let arguments =
(ins TransformHandleTypeInterface:$target,
@@ -862,7 +862,7 @@ def HoistPadOp : Op<Transform_Dialect, "structured.hoist_pad",
tensor.pad operations, which can be empty.
}];
- // Also allow any !pdl.operation for simpler composition. Non-tensor.pad ops
+ // Also allow any operation for simpler composition. Non-tensor.pad ops
// will be dropped from the results.
let arguments =
(ins TransformHandleTypeInterface:$target,
diff --git a/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td b/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
index 0408b341b7c63..525698274ab78 100644
--- a/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
+++ b/mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
@@ -77,16 +77,16 @@ def AlternativesOp : TransformDialectOp<"alternatives",
```mlir
%result = transform.alternatives %scope {
- ^bb0(%arg0: !pdl.operation):
+ ^bb0(%arg0: !transform.any_op):
// Try a fallible transformation.
%0 = transform.fallible %arg0 // ...
// If succeeded, yield the the result of the transformation.
- transform.yield %0 : !pdl.operation
+ transform.yield %0 : !transform.any_op
}, {
- ^bb0(%arg0: !pdl.operation):
+ ^bb0(%arg0: !transform.any_op):
// Otherwise, the second alternative is tried and it always succeeds by
// returning the original handle.
- transform.yield %arg0 : !pdl.operation
+ transform.yield %arg0 : !transform.any_op
}
```
}];
@@ -767,7 +767,7 @@ def WithPDLPatternsOp : TransformDialectOp<"with_pdl_patterns",
```mlir
transform.with_pdl_patterns {
- ^bb0(%arg0: !pdl.operation):
+ ^bb0(%arg0: !transform.any_op):
pdl.pattern @my_pattern : benefit(1) {
%0 = pdl.operation //...
// Regular PDL goes here.
@@ -775,7 +775,7 @@ def WithPDLPatternsOp : TransformDialectOp<"with_pdl_patterns",
}
sequence %arg0 failures(propagate) {
- ^bb0(%arg1: !pdl.operation):
+ ^bb0(%arg1: !transform.any_op):
%1 = pdl_match @my_pattern in %arg1
// Use %1 as handle
}
diff --git a/mlir/test/Dialect/SCF/transform-op-coalesce.mlir b/mlir/test/Dialect/SCF/transform-op-coalesce.mlir
index 2e7bbc53b196b..12b546516b235 100644
--- a/mlir/test/Dialect/SCF/transform-op-coalesce.mlir
+++ b/mlir/test/Dialect/SCF/transform-op-coalesce.mlir
@@ -23,9 +23,9 @@ func.func @coalesce_inner() {
}
transform.sequence failures(propagate) {
-^bb1(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["scf.for"]} attributes {coalesce} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1 = transform.cast %0 : !pdl.operation to !transform.op<"scf.for">
+^bb1(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["scf.for"]} attributes {coalesce} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1 = transform.cast %0 : !transform.any_op to !transform.op<"scf.for">
%2 = transform.loop.coalesce %1: (!transform.op<"scf.for">) -> (!transform.op<"scf.for">)
}
@@ -49,9 +49,9 @@ func.func @coalesce_outer(%arg1: memref<64x64xf32, 1>, %arg2: memref<64x64xf32,
}
transform.sequence failures(propagate) {
-^bb1(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["affine.for"]} attributes {coalesce} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1 = transform.cast %0 : !pdl.operation to !transform.op<"affine.for">
+^bb1(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["affine.for"]} attributes {coalesce} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1 = transform.cast %0 : !transform.any_op to !transform.op<"affine.for">
%2 = transform.loop.coalesce %1 : (!transform.op<"affine.for">) -> (!transform.op<"affine.for">)
}
@@ -84,9 +84,9 @@ func.func @coalesce_and_unroll(%arg1: memref<64x64xf32, 1>, %arg2: memref<64x64x
}
transform.sequence failures(propagate) {
-^bb1(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["scf.for"]} attributes {coalesce} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1 = transform.cast %0 : !pdl.operation to !transform.op<"scf.for">
+^bb1(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["scf.for"]} attributes {coalesce} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1 = transform.cast %0 : !transform.any_op to !transform.op<"scf.for">
%2 = transform.loop.coalesce %1 : (!transform.op<"scf.for">) -> (!transform.op<"scf.for">)
transform.loop.unroll %2 {factor = 3} : !transform.op<"scf.for">
}
diff --git a/mlir/test/Dialect/SCF/transform-ops-invalid.mlir b/mlir/test/Dialect/SCF/transform-ops-invalid.mlir
index 2e15abdd260db..b69ea0f5975cd 100644
--- a/mlir/test/Dialect/SCF/transform-ops-invalid.mlir
+++ b/mlir/test/Dialect/SCF/transform-ops-invalid.mlir
@@ -11,9 +11,9 @@ func.func @test_loops_do_not_get_coalesced() {
}
transform.sequence failures(propagate) {
-^bb1(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["affine.for"]} attributes {coalesce} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1 = transform.cast %0 : !pdl.operation to !transform.op<"affine.for">
+^bb1(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["affine.for"]} attributes {coalesce} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1 = transform.cast %0 : !transform.any_op to !transform.op<"affine.for">
// expected-error @below {{failed to coalesce}}
%2 = transform.loop.coalesce %1: (!transform.op<"affine.for">) -> (!transform.op<"affine.for">)
}
@@ -28,9 +28,9 @@ func.func @test_loops_do_not_get_unrolled() {
}
transform.sequence failures(propagate) {
-^bb1(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1 = transform.loop.get_parent_for %0 { affine = true } : (!pdl.operation) -> !transform.op<"affine.for">
+^bb1(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1 = transform.loop.get_parent_for %0 { affine = true } : (!transform.any_op) -> !transform.op<"affine.for">
// expected-error @below {{failed to unroll}}
transform.loop.unroll %1 { factor = 8 } : !transform.op<"affine.for">
}
diff --git a/mlir/test/Dialect/SCF/transform-ops.mlir b/mlir/test/Dialect/SCF/transform-ops.mlir
index 8fe9eddf6c193..28c40ef18c0a5 100644
--- a/mlir/test/Dialect/SCF/transform-ops.mlir
+++ b/mlir/test/Dialect/SCF/transform-ops.mlir
@@ -16,12 +16,12 @@ func.func @get_parent_for_op(%arg0: index, %arg1: index, %arg2: index) {
}
transform.sequence failures(propagate) {
-^bb1(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!pdl.operation) -> !pdl.operation
+^bb1(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!transform.any_op) -> !transform.any_op
// CHECK: = transform.loop.get_parent_for
- %1 = transform.loop.get_parent_for %0 : (!pdl.operation) -> !transform.op<"scf.for">
- %2 = transform.loop.get_parent_for %0 { num_loops = 2 } : (!pdl.operation) -> !transform.op<"scf.for">
- %3 = transform.loop.get_parent_for %0 { num_loops = 3 } : (!pdl.operation) -> !transform.op<"scf.for">
+ %1 = transform.loop.get_parent_for %0 : (!transform.any_op) -> !transform.op<"scf.for">
+ %2 = transform.loop.get_parent_for %0 { num_loops = 2 } : (!transform.any_op) -> !transform.op<"scf.for">
+ %3 = transform.loop.get_parent_for %0 { num_loops = 3 } : (!transform.any_op) -> !transform.op<"scf.for">
transform.test_print_remark_at_operand %1, "third loop" : !transform.op<"scf.for">
transform.test_print_remark_at_operand %2, "second loop" : !transform.op<"scf.for">
transform.test_print_remark_at_operand %3, "first loop" : !transform.op<"scf.for">
@@ -36,10 +36,10 @@ func.func @get_parent_for_op_no_loop(%arg0: index, %arg1: index) {
}
transform.sequence failures(propagate) {
-^bb1(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!pdl.operation) -> !pdl.operation
+^bb1(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!transform.any_op) -> !transform.any_op
// expected-error @below {{could not find an 'scf.for' parent}}
- %1 = transform.loop.get_parent_for %0 : (!pdl.operation) -> !transform.op<"scf.for">
+ %1 = transform.loop.get_parent_for %0 : (!transform.any_op) -> !transform.op<"scf.for">
}
// -----
@@ -104,10 +104,10 @@ func.func @loop_peel_op() {
}
transform.sequence failures(propagate) {
-^bb1(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1 = transform.loop.get_parent_for %0 : (!pdl.operation) -> !transform.op<"scf.for">
- transform.loop.peel %1 : (!transform.op<"scf.for">) -> !pdl.operation
+^bb1(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1 = transform.loop.get_parent_for %0 : (!transform.any_op) -> !transform.op<"scf.for">
+ transform.loop.peel %1 : (!transform.op<"scf.for">) -> !transform.any_op
}
// -----
@@ -137,12 +137,12 @@ func.func @loop_pipeline_op(%A: memref<?xf32>, %result: memref<?xf32>) {
}
transform.sequence failures(propagate) {
-^bb1(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["arith.addf"]} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1 = transform.loop.get_parent_for %0 : (!pdl.operation) -> !transform.op<"scf.for">
- %2 = transform.loop.pipeline %1 : (!transform.op<"scf.for">) -> !pdl.operation
+^bb1(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["arith.addf"]} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1 = transform.loop.get_parent_for %0 : (!transform.any_op) -> !transform.op<"scf.for">
+ %2 = transform.loop.pipeline %1 : (!transform.op<"scf.for">) -> !transform.any_op
// Verify that the returned handle is usable.
- transform.test_print_remark_at_operand %2, "transformed" : !pdl.operation
+ transform.test_print_remark_at_operand %2, "transformed" : !transform.any_op
}
// -----
@@ -161,9 +161,9 @@ func.func @loop_unroll_op() {
}
transform.sequence failures(propagate) {
-^bb1(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1 = transform.loop.get_parent_for %0 : (!pdl.operation) -> !transform.op<"scf.for">
+^bb1(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1 = transform.loop.get_parent_for %0 : (!transform.any_op) -> !transform.op<"scf.for">
transform.loop.unroll %1 { factor = 4 } : !transform.op<"scf.for">
}
@@ -185,12 +185,12 @@ func.func @get_parent_for_op(%arg0: index, %arg1: index, %arg2: index) {
}
transform.sequence failures(propagate) {
-^bb1(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!pdl.operation) -> !pdl.operation
+^bb1(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!transform.any_op) -> !transform.any_op
// CHECK: = transform.loop.get_parent_for
- %1 = transform.loop.get_parent_for %0 { affine = true } : (!pdl.operation) -> !transform.op<"affine.for">
- %2 = transform.loop.get_parent_for %0 { num_loops = 2, affine = true } : (!pdl.operation) -> !transform.op<"affine.for">
- %3 = transform.loop.get_parent_for %0 { num_loops = 3, affine = true } : (!pdl.operation) -> !transform.op<"affine.for">
+ %1 = transform.loop.get_parent_for %0 { affine = true } : (!transform.any_op) -> !transform.op<"affine.for">
+ %2 = transform.loop.get_parent_for %0 { num_loops = 2, affine = true } : (!transform.any_op) -> !transform.op<"affine.for">
+ %3 = transform.loop.get_parent_for %0 { num_loops = 3, affine = true } : (!transform.any_op) -> !transform.op<"affine.for">
transform.test_print_remark_at_operand %1, "third loop" : !transform.op<"affine.for">
transform.test_print_remark_at_operand %2, "second loop" : !transform.op<"affine.for">
transform.test_print_remark_at_operand %3, "first loop" : !transform.op<"affine.for">
@@ -205,10 +205,10 @@ func.func @get_parent_for_op_no_loop(%arg0: index, %arg1: index) {
}
transform.sequence failures(propagate) {
-^bb1(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!pdl.operation) -> !pdl.operation
+^bb1(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!transform.any_op) -> !transform.any_op
// expected-error @below {{could not find an 'affine.for' parent}}
- %1 = transform.loop.get_parent_for %0 { affine = true } : (!pdl.operation) -> !transform.op<"affine.for">
+ %1 = transform.loop.get_parent_for %0 { affine = true } : (!transform.any_op) -> !transform.op<"affine.for">
}
// -----
@@ -227,9 +227,9 @@ func.func @loop_unroll_op() {
}
transform.sequence failures(propagate) {
-^bb1(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1 = transform.loop.get_parent_for %0 { affine = true } : (!pdl.operation) -> !transform.op<"affine.for">
+^bb1(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1 = transform.loop.get_parent_for %0 { affine = true } : (!transform.any_op) -> !transform.op<"affine.for">
transform.test_print_remark_at_operand %1, "affine for loop" : !transform.op<"affine.for">
transform.loop.unroll %1 { factor = 4, affine = true } : !transform.op<"affine.for">
}
@@ -252,9 +252,9 @@ func.func @test_mixed_loops() {
}
transform.sequence failures(propagate) {
-^bb1(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1 = transform.loop.get_parent_for %0 { num_loops = 1, affine = true } : (!pdl.operation) -> !transform.op<"affine.for">
+^bb1(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["arith.addi"]} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1 = transform.loop.get_parent_for %0 { num_loops = 1, affine = true } : (!transform.any_op) -> !transform.op<"affine.for">
transform.test_print_remark_at_operand %1, "affine for loop" : !transform.op<"affine.for">
transform.loop.unroll %1 { factor = 4 } : !transform.op<"affine.for">
}
diff --git a/mlir/test/Dialect/Vector/vector-broadcast-lowering-transforms.mlir b/mlir/test/Dialect/Vector/vector-broadcast-lowering-transforms.mlir
index 69a6483cf6902..9712031f4fc81 100644
--- a/mlir/test/Dialect/Vector/vector-broadcast-lowering-transforms.mlir
+++ b/mlir/test/Dialect/Vector/vector-broadcast-lowering-transforms.mlir
@@ -163,10 +163,10 @@ func.func @broadcast_stretch_in_middle(%arg0: vector<4x1x2xf32>) -> vector<4x3x2
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
%f = transform.structured.match ops{["func.func"]} in %module_op
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
transform.vector.lower_broadcast %f
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-contract-matvec-transforms.mlir b/mlir/test/Dialect/Vector/vector-contract-matvec-transforms.mlir
index eb597e7d58707..2a006034a87d8 100644
--- a/mlir/test/Dialect/Vector/vector-contract-matvec-transforms.mlir
+++ b/mlir/test/Dialect/Vector/vector-contract-matvec-transforms.mlir
@@ -209,8 +209,8 @@ func.func @redpar_vecmattrans2x2(%arg0: memref<vector<2x2xf32>>, %arg1: memref<v
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.lower_contraction %module_op
lowering_strategy = "outerproduct"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-contract-to-dot-transforms.mlir b/mlir/test/Dialect/Vector/vector-contract-to-dot-transforms.mlir
index ccb5e77d1fcf5..eb05ae11b8647 100644
--- a/mlir/test/Dialect/Vector/vector-contract-to-dot-transforms.mlir
+++ b/mlir/test/Dialect/Vector/vector-contract-to-dot-transforms.mlir
@@ -296,11 +296,11 @@ func.func @contract_one_sided_unit_reduction_dim(%arg0 : vector<1x2xi32>, %arg1
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
%f = transform.structured.match ops{["func.func"]} in %module_op
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
%f2 = transform.vector.lower_contraction %f
lowering_strategy = "dot"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-contract-to-matrix-intrinsics-transforms.mlir b/mlir/test/Dialect/Vector/vector-contract-to-matrix-intrinsics-transforms.mlir
index e411258633b32..2101a5a1d59eb 100644
--- a/mlir/test/Dialect/Vector/vector-contract-to-matrix-intrinsics-transforms.mlir
+++ b/mlir/test/Dialect/Vector/vector-contract-to-matrix-intrinsics-transforms.mlir
@@ -44,14 +44,14 @@ func.func @matmul(%arg0: vector<2x4xf32>,
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
%f = transform.structured.match ops{["func.func"]} in %module_op
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
%f2 = transform.vector.lower_contraction %f
lowering_strategy = "matmulintrinsics"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
%f3 = transform.vector.lower_shape_cast %f2
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-contract-to-outerproduct-transforms.mlir b/mlir/test/Dialect/Vector/vector-contract-to-outerproduct-transforms.mlir
index cfa70e1d9985d..0c12ebb24be70 100644
--- a/mlir/test/Dialect/Vector/vector-contract-to-outerproduct-transforms.mlir
+++ b/mlir/test/Dialect/Vector/vector-contract-to-outerproduct-transforms.mlir
@@ -343,11 +343,11 @@ func.func @matmul_7(%arg0: vector<2x1xf32>, %arg1: vector<1x3xf32>, %arg2: vecto
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
%f = transform.structured.match ops{["func.func"]} in %module_op
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
%f2 = transform.vector.lower_contraction %f
lowering_strategy = "outerproduct"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-contract-to-parallel-arith-transforms.mlir b/mlir/test/Dialect/Vector/vector-contract-to-parallel-arith-transforms.mlir
index 6322e3fb72ff6..2614e35fb4784 100644
--- a/mlir/test/Dialect/Vector/vector-contract-to-parallel-arith-transforms.mlir
+++ b/mlir/test/Dialect/Vector/vector-contract-to-parallel-arith-transforms.mlir
@@ -52,11 +52,11 @@ func.func @parallel_contract_lowering_scalar(%arg0: vector<1x1xf32>, %arg1: vect
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
%f = transform.structured.match ops{["func.func"]} in %module_op
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
%f2 = transform.vector.lower_contraction %f
lowering_strategy = "parallelarith"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-mask-lowering-transforms.mlir b/mlir/test/Dialect/Vector/vector-mask-lowering-transforms.mlir
index 58184b8467e43..ffb0c3ccc427d 100644
--- a/mlir/test/Dialect/Vector/vector-mask-lowering-transforms.mlir
+++ b/mlir/test/Dialect/Vector/vector-mask-lowering-transforms.mlir
@@ -92,12 +92,12 @@ func.func @genbool_var_3d(%arg0: index, %arg1: index, %arg2: index) -> vector<2x
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
%f = transform.structured.match ops{["func.func"]} in %module_op
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
transform.vector.lower_masks %f
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
// -----
@@ -122,10 +122,10 @@ func.func @transfer_read_3d(
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
%f = transform.structured.match ops{["func.func"]} in %module_op
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
transform.vector.lower_masked_transfers %f
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-multi-reduction-lowering.mlir b/mlir/test/Dialect/Vector/vector-multi-reduction-lowering.mlir
index 07e473f1de522..d986d3c701437 100644
--- a/mlir/test/Dialect/Vector/vector-multi-reduction-lowering.mlir
+++ b/mlir/test/Dialect/Vector/vector-multi-reduction-lowering.mlir
@@ -266,8 +266,8 @@ func.func @vector_multi_reduction_parallel_middle(%arg0: vector<3x4x5xf32>, %acc
// CHECK: vector.transpose %[[INPUT]], [1, 0, 2] : vector<3x4x5xf32> to vector<4x3x5xf32>
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.lower_multi_reduction %module_op
lowering_strategy = "innerreduction"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-multi-reduction-outer-lowering.mlir b/mlir/test/Dialect/Vector/vector-multi-reduction-outer-lowering.mlir
index f42ca2501797d..d3c4ecb9be812 100644
--- a/mlir/test/Dialect/Vector/vector-multi-reduction-outer-lowering.mlir
+++ b/mlir/test/Dialect/Vector/vector-multi-reduction-outer-lowering.mlir
@@ -189,8 +189,8 @@ func.func @vector_multi_reduction_to_scalar(%arg0: vector<2x3xf32>, %acc: f32) -
// CHECK: return %{{.+}}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.lower_multi_reduction %module_op
lowering_strategy = "innerparallel"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-outerproduct-lowering-transforms.mlir b/mlir/test/Dialect/Vector/vector-outerproduct-lowering-transforms.mlir
index d61cc481bb5fc..a60d1c48c40d0 100644
--- a/mlir/test/Dialect/Vector/vector-outerproduct-lowering-transforms.mlir
+++ b/mlir/test/Dialect/Vector/vector-outerproduct-lowering-transforms.mlir
@@ -136,13 +136,13 @@ func.func @axpy_int_add(%arg0: vector<16xi32>, %arg1: i32, %arg2: vector<16xi32>
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
%f = transform.structured.match ops{["func.func"]} in %module_op
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
%f2 = transform.vector.lower_outerproduct %f
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
%f3 = transform.vector.lower_broadcast %f2
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-shape-cast-lowering-transforms.mlir b/mlir/test/Dialect/Vector/vector-shape-cast-lowering-transforms.mlir
index 19256af717169..716537ed76ff7 100644
--- a/mlir/test/Dialect/Vector/vector-shape-cast-lowering-transforms.mlir
+++ b/mlir/test/Dialect/Vector/vector-shape-cast-lowering-transforms.mlir
@@ -125,10 +125,10 @@ func.func @shape_cast_1d3d(%arg0 : vector<6xf32>) -> vector<2x1x3xf32> {
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
%f = transform.structured.match ops{["func.func"]} in %module_op
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
%f2 = transform.vector.lower_shape_cast %f
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-transfer-drop-unit-dims-patterns.mlir b/mlir/test/Dialect/Vector/vector-transfer-drop-unit-dims-patterns.mlir
index dd18111023649..e4e2e3b69c67b 100644
--- a/mlir/test/Dialect/Vector/vector-transfer-drop-unit-dims-patterns.mlir
+++ b/mlir/test/Dialect/Vector/vector-transfer-drop-unit-dims-patterns.mlir
@@ -30,7 +30,7 @@ func.func @transfer_write_rank_reducing(%arg : memref<1x1x3x2xi8, strided<[6, 6,
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.apply_rank_reducing_subview_patterns %module_op
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-transfer-full-partial-split-copy-transform.mlir b/mlir/test/Dialect/Vector/vector-transfer-full-partial-split-copy-transform.mlir
index 6f11d69a98a92..ff167bc639b04 100644
--- a/mlir/test/Dialect/Vector/vector-transfer-full-partial-split-copy-transform.mlir
+++ b/mlir/test/Dialect/Vector/vector-transfer-full-partial-split-copy-transform.mlir
@@ -107,10 +107,10 @@ func.func @split_vector_transfer_read_strided_2d(
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.split_transfer_full_partial %module_op
split_transfer_strategy = "linalg-copy"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
// -----
@@ -168,10 +168,10 @@ func.func @split_vector_transfer_write_2d(%V: vector<4x8xf32>, %A: memref<?x8xf3
// CHECK: }
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.split_transfer_full_partial %module_op
split_transfer_strategy = "linalg-copy"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
// -----
@@ -236,8 +236,8 @@ func.func @split_vector_transfer_write_strided_2d(
// CHECK: }
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.split_transfer_full_partial %module_op
split_transfer_strategy = "linalg-copy"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-transfer-full-partial-split.mlir b/mlir/test/Dialect/Vector/vector-transfer-full-partial-split.mlir
index 4914e1b33563a..8ae8400712092 100644
--- a/mlir/test/Dialect/Vector/vector-transfer-full-partial-split.mlir
+++ b/mlir/test/Dialect/Vector/vector-transfer-full-partial-split.mlir
@@ -102,10 +102,10 @@ func.func @split_vector_transfer_read_strided_2d(
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.split_transfer_full_partial %module_op
split_transfer_strategy = "vector-transfer"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
// -----
@@ -160,10 +160,10 @@ func.func @split_vector_transfer_write_2d(%V: vector<4x8xf32>, %A: memref<?x8xf3
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.split_transfer_full_partial %module_op
split_transfer_strategy = "vector-transfer"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
// -----
@@ -222,10 +222,10 @@ func.func @split_vector_transfer_write_strided_2d(
// CHECK: }
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.split_transfer_full_partial %module_op
split_transfer_strategy = "vector-transfer"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
// -----
@@ -264,8 +264,8 @@ func.func @transfer_read_within_scf_for(%A : memref<?x?xf32>, %lb : index, %ub :
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.split_transfer_full_partial %module_op
split_transfer_strategy = "vector-transfer"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-transfer-to-vector-load-store.mlir b/mlir/test/Dialect/Vector/vector-transfer-to-vector-load-store.mlir
index 0a1667aa89784..b948abb7c0a51 100644
--- a/mlir/test/Dialect/Vector/vector-transfer-to-vector-load-store.mlir
+++ b/mlir/test/Dialect/Vector/vector-transfer-to-vector-load-store.mlir
@@ -239,12 +239,12 @@ func.func @transfer_broadcasting_complex(%mem : memref<10x20x30x8x8xf32>, %i : i
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
%m2 = transform.vector.lower_transfer %module_op
max_transfer_rank = 99
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
transform.vector.apply_transfer_permutation_patterns %m2
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
// -----
@@ -362,10 +362,10 @@ func.func @transfer_write_broadcast_unit_dim(
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
%m2 = transform.vector.lower_transfer %module_op
max_transfer_rank = 99
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
transform.vector.apply_transfer_permutation_patterns %m2
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Dialect/Vector/vector-transpose-lowering.mlir b/mlir/test/Dialect/Vector/vector-transpose-lowering.mlir
index a668b49efc6e5..ba4e2177088ca 100644
--- a/mlir/test/Dialect/Vector/vector-transpose-lowering.mlir
+++ b/mlir/test/Dialect/Vector/vector-transpose-lowering.mlir
@@ -75,10 +75,10 @@ func.func @transpose1023_1x1x8x8xf32(%arg0: vector<1x1x8x8xf32>) -> vector<1x1x8
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.lower_transpose %module_op
lowering_strategy = "eltwise"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
// -----
@@ -98,10 +98,10 @@ func.func @transpose(%arg0: vector<2x4xf32>) -> vector<4x2xf32> {
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.lower_transpose %module_op
lowering_strategy = "shuffle_1d"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
// -----
@@ -117,10 +117,10 @@ func.func @transpose(%arg0: vector<2x4xf32>) -> vector<4x2xf32> {
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.lower_transpose %module_op
lowering_strategy = "flat_transpose"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
// -----
@@ -604,10 +604,10 @@ func.func @transpose210_1x8x8xf32(%arg0: vector<1x8x8xf32>) -> vector<8x8x1xf32>
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.lower_transpose %module_op
avx2_lowering_strategy = true
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
// -----
@@ -682,10 +682,10 @@ func.func @transpose_shuffle16x16xf32(%arg0: vector<16x16xf32>) -> vector<16x16x
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.lower_transpose %module_op
lowering_strategy = "shuffle_16x16"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
// -----
@@ -761,8 +761,8 @@ func.func @transpose021_shuffle16x16xf32(%arg0: vector<1x16x16xf32>) -> vector<1
}
transform.sequence failures(propagate) {
-^bb1(%module_op: !pdl.operation):
+^bb1(%module_op: !transform.any_op):
transform.vector.lower_transpose %module_op
lowering_strategy = "shuffle_16x16"
- : (!pdl.operation) -> !pdl.operation
+ : (!transform.any_op) -> !transform.any_op
}
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir
index 08a7022fb5466..ff46a4db6227b 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir
@@ -25,9 +25,9 @@ func.func @conv_1d(%arg0: memref<?xf32>, %arg1: memref<?xf32>, %arg2: memref<?xf
}
transform.sequence failures(propagate) {
- ^bb0(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["linalg.conv_1d"]} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1, %loop = transform.structured.tile %0 [4] : (!pdl.operation) -> (!pdl.operation, !pdl.operation)
+ ^bb0(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["linalg.conv_1d"]} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1, %loop = transform.structured.tile %0 [4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
}
func.func @main() {
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir
index 8b3cd1f2b9659..4c49fc6ec8c60 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir
@@ -27,9 +27,9 @@ func.func @conv_1d_nwc_wcf(%arg0: memref<?x?x?xf32>, %arg1: memref<?x?x?xf32>, %
}
transform.sequence failures(propagate) {
- ^bb0(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["linalg.conv_1d_nwc_wcf"]} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1, %loops:2 = transform.structured.tile %0 [2, 4] : (!pdl.operation) -> (!pdl.operation, !pdl.operation, !pdl.operation)
+ ^bb0(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["linalg.conv_1d_nwc_wcf"]} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1, %loops:2 = transform.structured.tile %0 [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
}
func.func @main() {
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir
index 553cb925acab5..fd51b7554779f 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir
@@ -25,9 +25,9 @@ func.func @conv_2d(%arg0: memref<?x?xf32>, %arg1: memref<?x?xf32>, %arg2: memref
}
transform.sequence failures(propagate) {
- ^bb0(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["linalg.conv_2d"]} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1, %loops:2 = transform.structured.tile %0 [2, 2] : (!pdl.operation) -> (!pdl.operation, !pdl.operation, !pdl.operation)
+ ^bb0(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["linalg.conv_2d"]} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1, %loops:2 = transform.structured.tile %0 [2, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op)
}
func.func @main() {
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir
index 8e5677db9569e..e48872d691d27 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir
@@ -27,9 +27,9 @@ func.func @conv_2d_nhwc_hwcf(%arg0: memref<?x?x?x?xf32>, %arg1: memref<?x?x?x?xf
}
transform.sequence failures(propagate) {
- ^bb0(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["linalg.conv_2d_nhwc_hwcf"]} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1, %loops:4 = transform.structured.tile %0 [2, 3, 3, 2] : (!pdl.operation) -> (!pdl.operation, !pdl.operation, !pdl.operation, !pdl.operation, !pdl.operation)
+ ^bb0(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["linalg.conv_2d_nhwc_hwcf"]} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1, %loops:4 = transform.structured.tile %0 [2, 3, 3, 2] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
}
func.func @main() {
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir
index da06de0205913..831bb11efa823 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir
@@ -25,9 +25,9 @@ func.func @conv_3d(%arg0: memref<?x?x?xf32>, %arg1: memref<?x?x?xf32>, %arg2: me
}
transform.sequence failures(propagate) {
- ^bb0(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["linalg.conv_3d"]} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1, %loops:3 = transform.structured.tile %0 [2, 2, 2] : (!pdl.operation) -> (!pdl.operation, !pdl.operation, !pdl.operation, !pdl.operation)
+ ^bb0(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["linalg.conv_3d"]} in %arg1 : (!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)
}
func.func @main() {
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir
index 4949c7d54fd77..4f9f03230f92d 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir
@@ -27,9 +27,9 @@ func.func @conv_3d_ndhwc_dhwcf(%arg0: memref<?x?x?x?x?xf32>, %arg1: memref<?x?x?
}
transform.sequence failures(propagate) {
- ^bb0(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["linalg.conv_3d_ndhwc_dhwcf"]} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1, %loops:3 = transform.structured.tile %0 [0, 5, 5, 5] : (!pdl.operation) -> (!pdl.operation, !pdl.operation, !pdl.operation, !pdl.operation)
+ ^bb0(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["linalg.conv_3d_ndhwc_dhwcf"]} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1, %loops:3 = transform.structured.tile %0 [0, 5, 5, 5] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
}
func.func @main() {
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir
index ed28547901a9b..15cff356d0747 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir
@@ -37,9 +37,9 @@ func.func @main() {
}
transform.sequence failures(propagate) {
- ^bb0(%arg1: !pdl.operation):
- %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!pdl.operation) -> !pdl.operation
- %1, %loops:3 = transform.structured.tile %0 [1, 2, 3] : (!pdl.operation) -> (!pdl.operation, !pdl.operation, !pdl.operation, !pdl.operation)
+ ^bb0(%arg1: !transform.any_op):
+ %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
+ %1, %loops:3 = transform.structured.tile %0 [1, 2, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op)
}
func.func private @printMemrefF32(%ptr : tensor<*xf32>)
diff --git a/mlir/test/python/dialects/transform.py b/mlir/test/python/dialects/transform.py
index ed6b68edcece6..5b64582dcd6de 100644
--- a/mlir/test/python/dialects/transform.py
+++ b/mlir/test/python/dialects/transform.py
@@ -32,38 +32,38 @@ def testTypes():
@run
def testSequenceOp():
sequence = transform.SequenceOp(transform.FailurePropagationMode.PROPAGATE,
- [pdl.OperationType.get()],
- pdl.OperationType.get())
+ [transform.AnyOpType.get()],
+ transform.AnyOpType.get())
with InsertionPoint(sequence.body):
transform.YieldOp([sequence.bodyTarget])
# CHECK-LABEL: TEST: testSequenceOp
- # CHECK: = transform.sequence -> !pdl.operation failures(propagate) {
- # CHECK: ^{{.*}}(%[[ARG0:.+]]: !pdl.operation):
- # CHECK: yield %[[ARG0]] : !pdl.operation
+ # CHECK: = transform.sequence -> !transform.any_op failures(propagate) {
+ # CHECK: ^{{.*}}(%[[ARG0:.+]]: !transform.any_op):
+ # CHECK: yield %[[ARG0]] : !transform.any_op
# CHECK: }
@run
def testNestedSequenceOp():
- sequence = transform.SequenceOp(transform.FailurePropagationMode.PROPAGATE, [], pdl.OperationType.get())
+ sequence = transform.SequenceOp(transform.FailurePropagationMode.PROPAGATE, [], transform.AnyOpType.get())
with InsertionPoint(sequence.body):
nested = transform.SequenceOp(transform.FailurePropagationMode.PROPAGATE, [], sequence.bodyTarget)
with InsertionPoint(nested.body):
doubly_nested = transform.SequenceOp(
transform.FailurePropagationMode.PROPAGATE,
- [pdl.OperationType.get()], nested.bodyTarget)
+ [transform.AnyOpType.get()], nested.bodyTarget)
with InsertionPoint(doubly_nested.body):
transform.YieldOp([doubly_nested.bodyTarget])
transform.YieldOp()
transform.YieldOp()
# CHECK-LABEL: TEST: testNestedSequenceOp
# CHECK: transform.sequence failures(propagate) {
- # CHECK: ^{{.*}}(%[[ARG0:.+]]: !pdl.operation):
- # CHECK: sequence %[[ARG0]] : !pdl.operation failures(propagate) {
- # CHECK: ^{{.*}}(%[[ARG1:.+]]: !pdl.operation):
- # CHECK: = sequence %[[ARG1]] : !pdl.operation -> !pdl.operation failures(propagate) {
- # CHECK: ^{{.*}}(%[[ARG2:.+]]: !pdl.operation):
- # CHECK: yield %[[ARG2]] : !pdl.operation
+ # CHECK: ^{{.*}}(%[[ARG0:.+]]: !transform.any_op):
+ # CHECK: sequence %[[ARG0]] : !transform.any_op failures(propagate) {
+ # CHECK: ^{{.*}}(%[[ARG1:.+]]: !transform.any_op):
+ # CHECK: = sequence %[[ARG1]] : !transform.any_op -> !transform.any_op failures(propagate) {
+ # CHECK: ^{{.*}}(%[[ARG2:.+]]: !transform.any_op):
+ # CHECK: yield %[[ARG2]] : !transform.any_op
# CHECK: }
# CHECK: }
# CHECK: }
@@ -103,58 +103,58 @@ def testNestedSequenceOpWithExtras():
@run
def testTransformPDLOps():
- withPdl = transform.WithPDLPatternsOp(pdl.OperationType.get())
+ withPdl = transform.WithPDLPatternsOp(transform.AnyOpType.get())
with InsertionPoint(withPdl.body):
sequence = transform.SequenceOp(transform.FailurePropagationMode.PROPAGATE,
- [pdl.OperationType.get()],
+ [transform.AnyOpType.get()],
withPdl.bodyTarget)
with InsertionPoint(sequence.body):
- match = transform.PDLMatchOp(pdl.OperationType.get(), sequence.bodyTarget, "pdl_matcher")
+ match = transform.PDLMatchOp(transform.AnyOpType.get(), sequence.bodyTarget, "pdl_matcher")
transform.YieldOp(match)
# CHECK-LABEL: TEST: testTransformPDLOps
# CHECK: transform.with_pdl_patterns {
- # CHECK: ^{{.*}}(%[[ARG0:.+]]: !pdl.operation):
- # CHECK: = sequence %[[ARG0]] : !pdl.operation -> !pdl.operation failures(propagate) {
- # CHECK: ^{{.*}}(%[[ARG1:.+]]: !pdl.operation):
+ # CHECK: ^{{.*}}(%[[ARG0:.+]]: !transform.any_op):
+ # CHECK: = sequence %[[ARG0]] : !transform.any_op -> !transform.any_op failures(propagate) {
+ # CHECK: ^{{.*}}(%[[ARG1:.+]]: !transform.any_op):
# CHECK: %[[RES:.+]] = pdl_match @pdl_matcher in %[[ARG1]]
- # CHECK: yield %[[RES]] : !pdl.operation
+ # CHECK: yield %[[RES]] : !transform.any_op
# CHECK: }
# CHECK: }
@run
def testGetClosestIsolatedParentOp():
- sequence = transform.SequenceOp(transform.FailurePropagationMode.PROPAGATE, [], pdl.OperationType.get())
+ sequence = transform.SequenceOp(transform.FailurePropagationMode.PROPAGATE, [], transform.AnyOpType.get())
with InsertionPoint(sequence.body):
- transform.GetClosestIsolatedParentOp(pdl.OperationType.get(), sequence.bodyTarget)
+ transform.GetClosestIsolatedParentOp(transform.AnyOpType.get(), sequence.bodyTarget)
transform.YieldOp()
# CHECK-LABEL: TEST: testGetClosestIsolatedParentOp
# CHECK: transform.sequence
- # CHECK: ^{{.*}}(%[[ARG1:.+]]: !pdl.operation):
+ # CHECK: ^{{.*}}(%[[ARG1:.+]]: !transform.any_op):
# CHECK: = get_closest_isolated_parent %[[ARG1]]
@run
def testMergeHandlesOp():
- sequence = transform.SequenceOp(transform.FailurePropagationMode.PROPAGATE, [], pdl.OperationType.get())
+ sequence = transform.SequenceOp(transform.FailurePropagationMode.PROPAGATE, [], transform.AnyOpType.get())
with InsertionPoint(sequence.body):
transform.MergeHandlesOp([sequence.bodyTarget])
transform.YieldOp()
# CHECK-LABEL: TEST: testMergeHandlesOp
# CHECK: transform.sequence
- # CHECK: ^{{.*}}(%[[ARG1:.+]]: !pdl.operation):
+ # CHECK: ^{{.*}}(%[[ARG1:.+]]: !transform.any_op):
# CHECK: = merge_handles %[[ARG1]]
@run
def testReplicateOp():
- with_pdl = transform.WithPDLPatternsOp(pdl.OperationType.get())
+ with_pdl = transform.WithPDLPatternsOp(transform.AnyOpType.get())
with InsertionPoint(with_pdl.body):
sequence = transform.SequenceOp(
transform.FailurePropagationMode.PROPAGATE, [], with_pdl.bodyTarget)
with InsertionPoint(sequence.body):
- m1 = transform.PDLMatchOp(pdl.OperationType.get(), sequence.bodyTarget, "first")
- m2 = transform.PDLMatchOp(pdl.OperationType.get(), sequence.bodyTarget, "second")
+ m1 = transform.PDLMatchOp(transform.AnyOpType.get(), sequence.bodyTarget, "first")
+ m2 = transform.PDLMatchOp(transform.AnyOpType.get(), sequence.bodyTarget, "second")
transform.ReplicateOp(m1, [m2])
transform.YieldOp()
# CHECK-LABEL: TEST: testReplicateOp
More information about the Mlir-commits
mailing list