diff --git a/mlir/test/Dialect/Linalg/convert-conv2d-to-img2col.mlir b/mlir/test/Dialect/Linalg/convert-conv2d-to-img2col.mlir --- a/mlir/test/Dialect/Linalg/convert-conv2d-to-img2col.mlir +++ b/mlir/test/Dialect/Linalg/convert-conv2d-to-img2col.mlir @@ -16,10 +16,10 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.conv_2d_nhwc_hwcf"]} in %arg1 : (!pdl.operation) -> !pdl.operation +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.conv_2d_nhwc_hwcf"]} in %arg1 : (!transform.any_op) -> !transform.any_op // expected-error@below {{failed to apply}} - %1:2 = transform.structured.convert_conv2d_to_img2col %0 : (!pdl.operation) -> (!pdl.operation, !pdl.operation) + %1:2 = transform.structured.convert_conv2d_to_img2col %0 : (!transform.any_op) -> (!transform.any_op, !transform.any_op) } // ----- @@ -88,11 +88,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.conv_2d_nhwc_hwcf"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %img2col_tensor_producer, %transformed = transform.structured.convert_conv2d_to_img2col %0 : (!pdl.operation) -> (!pdl.operation, !pdl.operation) - transform.print %img2col_tensor_producer {name = "tensor_producer"}: !pdl.operation - transform.print %transformed {name = "transformed"}: !pdl.operation +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.conv_2d_nhwc_hwcf"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %img2col_tensor_producer, %transformed = transform.structured.convert_conv2d_to_img2col %0 : (!transform.any_op) -> (!transform.any_op, !transform.any_op) + transform.print %img2col_tensor_producer {name = "tensor_producer"}: !transform.any_op + transform.print %transformed {name = "transformed"}: !transform.any_op } // ----- @@ -167,9 +167,9 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.depthwise_conv_2d_nhwc_hwc"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1:2 = transform.structured.convert_conv2d_to_img2col %0 : (!pdl.operation) -> (!pdl.operation, !pdl.operation) +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.depthwise_conv_2d_nhwc_hwc"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1:2 = transform.structured.convert_conv2d_to_img2col %0 : (!transform.any_op) -> (!transform.any_op, !transform.any_op) } // ----- @@ -209,9 +209,9 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.conv_2d_nhwc_hwcf"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1:2 = transform.structured.convert_conv2d_to_img2col %0 : (!pdl.operation) -> (!pdl.operation, !pdl.operation) +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.conv_2d_nhwc_hwcf"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1:2 = transform.structured.convert_conv2d_to_img2col %0 : (!transform.any_op) -> (!transform.any_op, !transform.any_op) } // ----- @@ -272,9 +272,9 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.conv_2d_nchw_fchw"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1:2 = transform.structured.convert_conv2d_to_img2col %0 : (!pdl.operation) -> (!pdl.operation, !pdl.operation) +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.conv_2d_nchw_fchw"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1:2 = transform.structured.convert_conv2d_to_img2col %0 : (!transform.any_op) -> (!transform.any_op, !transform.any_op) } // ----- @@ -308,9 +308,9 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.conv_2d_nhwc_hwcf"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %img2col_tensor_producer, %transformed = transform.structured.convert_conv2d_to_img2col %0 : (!pdl.operation) -> (!pdl.operation, !pdl.operation) - transform.print %img2col_tensor_producer {name = "tensor_producer"}: !pdl.operation - transform.print %transformed {name = "transformed"}: !pdl.operation +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.conv_2d_nhwc_hwcf"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %img2col_tensor_producer, %transformed = transform.structured.convert_conv2d_to_img2col %0 : (!transform.any_op) -> (!transform.any_op, !transform.any_op) + transform.print %img2col_tensor_producer {name = "tensor_producer"}: !transform.any_op + transform.print %transformed {name = "transformed"}: !transform.any_op } diff --git a/mlir/test/Dialect/Linalg/hoisting.mlir b/mlir/test/Dialect/Linalg/hoisting.mlir --- a/mlir/test/Dialect/Linalg/hoisting.mlir +++ b/mlir/test/Dialect/Linalg/hoisting.mlir @@ -75,11 +75,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["func.func"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.hoist_redundant_vector_transfers %0 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op } // ----- @@ -164,11 +164,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["func.func"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.hoist_redundant_vector_transfers %0 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op } // ----- @@ -209,11 +209,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["func.func"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.hoist_redundant_vector_transfers %0 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op } // ----- @@ -298,11 +298,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["func.func"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.hoist_redundant_tensor_subsets %0 - : (!pdl.operation) -> () + : (!transform.any_op) -> () } // ----- @@ -393,11 +393,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["func.func"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.hoist_redundant_tensor_subsets %0 - : (!pdl.operation) -> () + : (!transform.any_op) -> () } // ----- @@ -510,11 +510,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["func.func"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.hoist_redundant_tensor_subsets %0 - : (!pdl.operation) -> () + : (!transform.any_op) -> () } // ----- @@ -557,11 +557,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["func.func"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.hoist_redundant_tensor_subsets %0 - : (!pdl.operation) -> () + : (!transform.any_op) -> () } // ----- @@ -670,11 +670,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["func.func"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.hoist_redundant_tensor_subsets %0 - : (!pdl.operation) -> () + : (!transform.any_op) -> () } // ----- @@ -716,9 +716,9 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["func.func"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.hoist_redundant_vector_transfers %0 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op } diff --git a/mlir/test/Dialect/Linalg/multisize-tiling-full.mlir b/mlir/test/Dialect/Linalg/multisize-tiling-full.mlir --- a/mlir/test/Dialect/Linalg/multisize-tiling-full.mlir +++ b/mlir/test/Dialect/Linalg/multisize-tiling-full.mlir @@ -3,18 +3,18 @@ // This implements a 2D multisize tiling with target sizes [3, 10]. transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1:3 = transform.structured.multitile_sizes %0 { dimension = 0, target_size = 3} : (!pdl.operation) -> !pdl.operation - %t:3 = transform.structured.multitile_sizes %0 { dimension = 1, target_size = 10} : (!pdl.operation) -> !pdl.operation - %2:2 = transform.structured.split %0 after %1#2 { dimension = 0 } : !pdl.operation, !pdl.operation - %3:2 = transform.structured.tile %2#0 [%1#0] : (!pdl.operation, !pdl.operation) -> (!pdl.operation, !pdl.operation) - %4:2 = transform.structured.tile %2#1 [%1#1] : (!pdl.operation, !pdl.operation) -> (!pdl.operation, !pdl.operation) - %5 = merge_handles %3#0, %4#0 : !pdl.operation - %tt:3 = replicate num(%5) %t#0, %t#1, %t#2 : !pdl.operation, !pdl.operation, !pdl.operation, !pdl.operation - %6:2 = transform.structured.split %5 after %tt#2 { dimension = 1 } : !pdl.operation, !pdl.operation - transform.structured.tile %6#0 [0, %tt#0] : (!pdl.operation, !pdl.operation) -> (!pdl.operation, !pdl.operation) - transform.structured.tile %6#1 [0, %tt#1] : (!pdl.operation, !pdl.operation) -> (!pdl.operation, !pdl.operation) +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1:3 = transform.structured.multitile_sizes %0 { dimension = 0, target_size = 3} : (!transform.any_op) -> !transform.any_op + %t:3 = transform.structured.multitile_sizes %0 { dimension = 1, target_size = 10} : (!transform.any_op) -> !transform.any_op + %2:2 = transform.structured.split %0 after %1#2 { dimension = 0 } : !transform.any_op, !transform.any_op + %3:2 = transform.structured.tile %2#0 [%1#0] : (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op) + %4:2 = transform.structured.tile %2#1 [%1#1] : (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op) + %5 = merge_handles %3#0, %4#0 : !transform.any_op + %tt:3 = replicate num(%5) %t#0, %t#1, %t#2 : !transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op + %6:2 = transform.structured.split %5 after %tt#2 { dimension = 1 } : !transform.any_op, !transform.any_op + transform.structured.tile %6#0 [0, %tt#0] : (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op) + transform.structured.tile %6#1 [0, %tt#1] : (!transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op) } func.func private @elem(%arg0: f32, %arg1: index, %arg2: index) -> f32 @@ -103,18 +103,18 @@ // ----- transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1:3 = transform.structured.multitile_sizes %0 { dimension = 0, target_size = 3} : (!pdl.operation) -> !transform.param - %t:3 = transform.structured.multitile_sizes %0 { dimension = 1, target_size = 10} : (!pdl.operation) -> !transform.param - %2:2 = transform.structured.split %0 after %1#2 { dimension = 0 } : !pdl.operation, !transform.param - %3:2 = transform.structured.tile %2#0 [%1#0] : (!pdl.operation, !transform.param) -> (!pdl.operation, !pdl.operation) - %4:2 = transform.structured.tile %2#1 [%1#1] : (!pdl.operation, !transform.param) -> (!pdl.operation, !pdl.operation) - %5 = merge_handles %3#0, %4#0 : !pdl.operation - %tt:3 = replicate num(%5) %t#0, %t#1, %t#2 : !pdl.operation, !transform.param, !transform.param, !transform.param - %6:2 = transform.structured.split %5 after %tt#2 { dimension = 1 } : !pdl.operation, !transform.param - transform.structured.tile %6#0 [0, %tt#0] : (!pdl.operation, !transform.param) -> (!pdl.operation, !pdl.operation) - transform.structured.tile %6#1 [0, %tt#1] : (!pdl.operation, !transform.param) -> (!pdl.operation, !pdl.operation) +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1:3 = transform.structured.multitile_sizes %0 { dimension = 0, target_size = 3} : (!transform.any_op) -> !transform.param + %t:3 = transform.structured.multitile_sizes %0 { dimension = 1, target_size = 10} : (!transform.any_op) -> !transform.param + %2:2 = transform.structured.split %0 after %1#2 { dimension = 0 } : !transform.any_op, !transform.param + %3:2 = transform.structured.tile %2#0 [%1#0] : (!transform.any_op, !transform.param) -> (!transform.any_op, !transform.any_op) + %4:2 = transform.structured.tile %2#1 [%1#1] : (!transform.any_op, !transform.param) -> (!transform.any_op, !transform.any_op) + %5 = merge_handles %3#0, %4#0 : !transform.any_op + %tt:3 = replicate num(%5) %t#0, %t#1, %t#2 : !transform.any_op, !transform.param, !transform.param, !transform.param + %6:2 = transform.structured.split %5 after %tt#2 { dimension = 1 } : !transform.any_op, !transform.param + transform.structured.tile %6#0 [0, %tt#0] : (!transform.any_op, !transform.param) -> (!transform.any_op, !transform.any_op) + transform.structured.tile %6#1 [0, %tt#1] : (!transform.any_op, !transform.param) -> (!transform.any_op, !transform.any_op) } func.func private @elem(%arg0: f32, %arg1: index, %arg2: index) -> f32 diff --git a/mlir/test/Dialect/Linalg/tile-conv.mlir b/mlir/test/Dialect/Linalg/tile-conv.mlir --- a/mlir/test/Dialect/Linalg/tile-conv.mlir +++ b/mlir/test/Dialect/Linalg/tile-conv.mlir @@ -10,9 +10,9 @@ } transform.sequence failures(propagate) { - ^bb0(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.conv_2d"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1, %loop:2 = transform.structured.tile %0 [2, 3] : (!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, %loop:2 = transform.structured.tile %0 [2, 3] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op) } // CHECK: func @conv diff --git a/mlir/test/Dialect/Linalg/tile-indexed.mlir b/mlir/test/Dialect/Linalg/tile-indexed.mlir --- a/mlir/test/Dialect/Linalg/tile-indexed.mlir +++ b/mlir/test/Dialect/Linalg/tile-indexed.mlir @@ -12,9 +12,9 @@ } transform.sequence failures(propagate) { - ^bb0(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1, %loop = transform.structured.tile %0 [10] : (!pdl.operation) -> (!pdl.operation, !pdl.operation) + ^bb0(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1, %loop = transform.structured.tile %0 [10] : (!transform.any_op) -> (!transform.any_op, !transform.any_op) } // TILE-10n25-DAG: [[$MAP:#[a-zA-Z0-9_]*]] = affine_map<(d0, d1) -> (d0 + d1)> @@ -42,9 +42,9 @@ } transform.sequence failures(propagate) { - ^bb0(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1, %loop:2 = transform.structured.tile %0 [10, 25] : (!pdl.operation) -> (!pdl.operation, !pdl.operation, !pdl.operation) + ^bb0(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1, %loop:2 = transform.structured.tile %0 [10, 25] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op) } // TILE-10n25-DAG: [[$MAP:#[a-zA-Z0-9_]*]] = affine_map<(d0, d1) -> (d0 + d1)> diff --git a/mlir/test/Dialect/Linalg/tile-tensors.mlir b/mlir/test/Dialect/Linalg/tile-tensors.mlir --- a/mlir/test/Dialect/Linalg/tile-tensors.mlir +++ b/mlir/test/Dialect/Linalg/tile-tensors.mlir @@ -28,9 +28,9 @@ } 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 [2, 3, 4] : (!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 [2, 3, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op) } // ----- @@ -59,9 +59,9 @@ } transform.sequence failures(propagate) { - ^bb0(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1, %loops:3 = transform.structured.tile %0 [2, 3, 4] : (!pdl.operation) -> (!pdl.operation, !pdl.operation, !pdl.operation, !pdl.operation) + ^bb0(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1, %loops:3 = transform.structured.tile %0 [2, 3, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op) } // CHECK-LABEL: func @generic_op_tensors @@ -130,7 +130,7 @@ } transform.sequence failures(propagate) { - ^bb0(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1, %loops:3 = transform.structured.tile %0 [2, 3, 4] : (!pdl.operation) -> (!pdl.operation, !pdl.operation, !pdl.operation, !pdl.operation) + ^bb0(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1, %loops:3 = transform.structured.tile %0 [2, 3, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op) } diff --git a/mlir/test/Dialect/Linalg/transform-lower-pack.mlir b/mlir/test/Dialect/Linalg/transform-lower-pack.mlir --- a/mlir/test/Dialect/Linalg/transform-lower-pack.mlir +++ b/mlir/test/Dialect/Linalg/transform-lower-pack.mlir @@ -19,9 +19,9 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): +^bb1(%module_op: !transform.any_op): %pack = transform.structured.match ops{["tensor.pack"]} in %module_op - : (!pdl.operation) -> !transform.op<"tensor.pack"> + : (!transform.any_op) -> !transform.op<"tensor.pack"> transform.structured.lower_pack %pack : (!transform.op<"tensor.pack">) -> (!transform.op<"tensor.pad">, !transform.op<"tensor.expand_shape">, !transform.op<"linalg.transpose">) } @@ -48,9 +48,9 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): +^bb1(%module_op: !transform.any_op): %pack = transform.structured.match ops{["tensor.pack"]} in %module_op - : (!pdl.operation) -> !transform.op<"tensor.pack"> + : (!transform.any_op) -> !transform.op<"tensor.pack"> transform.structured.lower_pack %pack : (!transform.op<"tensor.pack">) -> (!transform.op<"tensor.pad">, !transform.op<"tensor.expand_shape">, !transform.op<"linalg.transpose">) } @@ -80,9 +80,9 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): +^bb1(%module_op: !transform.any_op): %pack = transform.structured.match ops{["tensor.pack"]} in %module_op - : (!pdl.operation) -> !transform.op<"tensor.pack"> + : (!transform.any_op) -> !transform.op<"tensor.pack"> transform.structured.lower_pack %pack : (!transform.op<"tensor.pack">) -> (!transform.op<"tensor.pad">, !transform.op<"tensor.expand_shape">, !transform.op<"linalg.transpose">) } @@ -112,9 +112,9 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): +^bb1(%module_op: !transform.any_op): %pack = transform.structured.match ops{["tensor.pack"]} in %module_op - : (!pdl.operation) -> !transform.op<"tensor.pack"> + : (!transform.any_op) -> !transform.op<"tensor.pack"> transform.structured.lower_pack %pack : (!transform.op<"tensor.pack">) -> (!transform.op<"tensor.pad">, !transform.op<"tensor.expand_shape">, !transform.op<"linalg.transpose">) } @@ -139,9 +139,9 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): +^bb1(%module_op: !transform.any_op): %unpack = transform.structured.match ops{["tensor.unpack"]} in %module_op - : (!pdl.operation) -> !transform.op<"tensor.unpack"> + : (!transform.any_op) -> !transform.op<"tensor.unpack"> transform.structured.lower_unpack %unpack : (!transform.op<"tensor.unpack">) -> (!transform.op<"tensor.empty">, !transform.op<"linalg.transpose">, @@ -170,9 +170,9 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): +^bb1(%module_op: !transform.any_op): %unpack = transform.structured.match ops{["tensor.unpack"]} in %module_op - : (!pdl.operation) -> !transform.op<"tensor.unpack"> + : (!transform.any_op) -> !transform.op<"tensor.unpack"> transform.structured.lower_unpack %unpack : (!transform.op<"tensor.unpack">) -> (!transform.op<"tensor.empty">, !transform.op<"linalg.transpose">, @@ -203,9 +203,9 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): +^bb1(%module_op: !transform.any_op): %pack = transform.structured.match ops{["tensor.pack"]} in %module_op - : (!pdl.operation) -> !transform.op<"tensor.pack"> + : (!transform.any_op) -> !transform.op<"tensor.pack"> transform.structured.lower_pack %pack : (!transform.op<"tensor.pack">) -> (!transform.op<"tensor.pad">, !transform.op<"tensor.expand_shape">, !transform.op<"linalg.transpose">) } @@ -235,9 +235,9 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): +^bb1(%module_op: !transform.any_op): %pack = transform.structured.match ops{["tensor.pack"]} in %module_op - : (!pdl.operation) -> !transform.op<"tensor.pack"> + : (!transform.any_op) -> !transform.op<"tensor.pack"> transform.structured.lower_pack %pack : (!transform.op<"tensor.pack">) -> (!transform.op<"tensor.pad">, !transform.op<"tensor.expand_shape">, !transform.op<"linalg.transpose">) } @@ -287,9 +287,9 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): +^bb1(%module_op: !transform.any_op): %pack = transform.structured.match ops{["tensor.pack"]} in %module_op - : (!pdl.operation) -> !transform.op<"tensor.pack"> + : (!transform.any_op) -> !transform.op<"tensor.pack"> transform.structured.lower_pack %pack : (!transform.op<"tensor.pack">) -> (!transform.op<"tensor.pad">, !transform.op<"tensor.expand_shape">, !transform.op<"linalg.transpose">) } @@ -323,9 +323,9 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): +^bb1(%module_op: !transform.any_op): %pack = transform.structured.match ops{["tensor.pack"]} in %module_op - : (!pdl.operation) -> !transform.op<"tensor.pack"> + : (!transform.any_op) -> !transform.op<"tensor.pack"> transform.structured.lower_pack %pack : (!transform.op<"tensor.pack">) -> (!transform.op<"tensor.pad">, !transform.op<"tensor.expand_shape">, !transform.op<"linalg.transpose">) } diff --git a/mlir/test/Dialect/Linalg/transform-op-bufferize-to-allocation.mlir b/mlir/test/Dialect/Linalg/transform-op-bufferize-to-allocation.mlir --- a/mlir/test/Dialect/Linalg/transform-op-bufferize-to-allocation.mlir +++ b/mlir/test/Dialect/Linalg/transform-op-bufferize-to-allocation.mlir @@ -30,9 +30,9 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1 = transform.get_result %0[0] : (!pdl.operation) -> !transform.any_value +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1 = transform.get_result %0[0] : (!transform.any_op) -> !transform.any_value %2 = transform.structured.bufferize_to_allocation %1 } @@ -56,12 +56,12 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1 = transform.get_result %0[0] : (!pdl.operation) -> !transform.any_value +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["tensor.pad"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1 = transform.get_result %0[0] : (!transform.any_op) -> !transform.any_value %2 = transform.structured.bufferize_to_allocation %1 // Make sure that One-Shot Bufferize can bufferize the rest. - %3 = transform.bufferization.one_shot_bufferize %arg1 : (!pdl.operation) -> !pdl.operation + %3 = transform.bufferization.one_shot_bufferize %arg1 : (!transform.any_op) -> !transform.any_op } // ----- @@ -82,9 +82,9 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["tensor.extract"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1 = test_produce_value_handle_to_argument_of_parent_block %0, 0 : (!pdl.operation) -> !transform.any_value +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["tensor.extract"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1 = test_produce_value_handle_to_argument_of_parent_block %0, 0 : (!transform.any_op) -> !transform.any_value %2 = transform.structured.bufferize_to_allocation %1 {memory_space = 4} } @@ -103,12 +103,12 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["tensor.extract"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1 = test_produce_value_handle_to_argument_of_parent_block %0, 0 : (!pdl.operation) -> !transform.any_value +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["tensor.extract"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1 = test_produce_value_handle_to_argument_of_parent_block %0, 0 : (!transform.any_op) -> !transform.any_value %2 = transform.structured.bufferize_to_allocation %1 {memory_space = 4} // Make sure that One-Shot Bufferize can bufferize the rest. - %3 = transform.bufferization.one_shot_bufferize %arg1 : (!pdl.operation) -> !pdl.operation + %3 = transform.bufferization.one_shot_bufferize %arg1 : (!transform.any_op) -> !transform.any_op } // ----- @@ -125,9 +125,9 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["dummy.some_op"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1 = transform.get_result %0[0] : (!pdl.operation) -> !transform.any_value +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["dummy.some_op"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1 = transform.get_result %0[0] : (!transform.any_op) -> !transform.any_value %2 = transform.structured.bufferize_to_allocation %1 {memory_space = 4} } diff --git a/mlir/test/Dialect/Linalg/transform-op-match.mlir b/mlir/test/Dialect/Linalg/transform-op-match.mlir --- a/mlir/test/Dialect/Linalg/transform-op-match.mlir +++ b/mlir/test/Dialect/Linalg/transform-op-match.mlir @@ -10,14 +10,14 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %match_name = transform.structured.match ops{["arith.constant"]} in %arg1 : (!pdl.operation) -> !pdl.operation - transform.test_print_remark_at_operand %match_name, "matched op name" : !pdl.operation - transform.test_consume_operand %match_name : !pdl.operation +^bb1(%arg1: !transform.any_op): + %match_name = transform.structured.match ops{["arith.constant"]} in %arg1 : (!transform.any_op) -> !transform.any_op + transform.test_print_remark_at_operand %match_name, "matched op name" : !transform.any_op + transform.test_consume_operand %match_name : !transform.any_op - %match_attr = transform.structured.match ops{["arith.constant"]} attributes{my_attr} in %arg1 : (!pdl.operation) -> !pdl.operation - transform.test_print_remark_at_operand %match_attr, "matched attr name" : !pdl.operation - transform.test_consume_operand %match_attr : !pdl.operation + %match_attr = transform.structured.match ops{["arith.constant"]} attributes{my_attr} in %arg1 : (!transform.any_op) -> !transform.any_op + transform.test_print_remark_at_operand %match_attr, "matched attr name" : !transform.any_op + transform.test_consume_operand %match_attr : !transform.any_op } // ----- @@ -30,11 +30,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %match_name = transform.structured.match - ops{["arith.constant"]} filter_result_type = f32 in %arg1 : (!pdl.operation) -> !pdl.operation - transform.test_print_remark_at_operand %match_name, "matched op name" : !pdl.operation - transform.test_consume_operand %match_name : !pdl.operation + ops{["arith.constant"]} filter_result_type = f32 in %arg1 : (!transform.any_op) -> !transform.any_op + transform.test_print_remark_at_operand %match_name, "matched op name" : !transform.any_op + transform.test_consume_operand %match_name : !transform.any_op } // ----- @@ -56,23 +56,23 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %match_attr = transform.structured.match ops{["linalg.generic"]} attributes{iterator_types = [ #linalg.iterator_type, #linalg.iterator_type, #linalg.iterator_type]} - in %arg1 : (!pdl.operation) -> !pdl.operation - transform.test_print_remark_at_operand %match_attr, "matched complex attr" : !pdl.operation - transform.test_consume_operand %match_attr : !pdl.operation + in %arg1 : (!transform.any_op) -> !transform.any_op + transform.test_print_remark_at_operand %match_attr, "matched complex attr" : !transform.any_op + transform.test_consume_operand %match_attr : !transform.any_op %no_match = transform.structured.match attributes{iterator_types = [ #linalg.iterator_type, #linalg.iterator_type, #linalg.iterator_type]} - in %arg1 : (!pdl.operation) -> !pdl.operation + in %arg1 : (!transform.any_op) -> !transform.any_op // expected-remark @below {{0}} - transform.test_print_number_of_associated_payload_ir_ops %no_match + transform.test_print_number_of_associated_payload_ir_ops %no_match : !transform.any_op } diff --git a/mlir/test/Dialect/Linalg/transform-op-multitile-sizes.mlir b/mlir/test/Dialect/Linalg/transform-op-multitile-sizes.mlir --- a/mlir/test/Dialect/Linalg/transform-op-multitile-sizes.mlir +++ b/mlir/test/Dialect/Linalg/transform-op-multitile-sizes.mlir @@ -3,9 +3,9 @@ // CHECK-DAG: #[[$MAP13:.+]] = affine_map<() -> (13)> transform.sequence failures(propagate) { - ^bb0(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!pdl.operation) -> !pdl.operation - transform.structured.multitile_sizes %0 { target_size = 3, dimension = 0 } : (!pdl.operation) -> !pdl.operation + ^bb0(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op + transform.structured.multitile_sizes %0 { target_size = 3, dimension = 0 } : (!transform.any_op) -> !transform.any_op } // CHECK-LABEL: @multitile_sizes_static @@ -27,11 +27,11 @@ // ----- transform.sequence failures(propagate) { - ^bb0(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!pdl.operation) -> !pdl.operation + ^bb0(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op %low_tile, %high_tile, %split_point = transform.structured.multitile_sizes %0 { target_size = 3, dimension = 0 } - : (!pdl.operation) -> !transform.param + : (!transform.any_op) -> !transform.param // expected-remark @below {{2 : i64}} transform.test_print_param %low_tile : !transform.param // expected-remark @below {{3 : i64}} @@ -54,9 +54,9 @@ // ----- transform.sequence failures(propagate) { - ^bb0(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!pdl.operation) -> !pdl.operation - transform.structured.multitile_sizes %0 { target_size = 3, divisor = 2, dimension = 0 } : (!pdl.operation) -> !pdl.operation + ^bb0(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op + transform.structured.multitile_sizes %0 { target_size = 3, divisor = 2, dimension = 0 } : (!transform.any_op) -> !transform.any_op } // CHECK: #[[$MAP_A:.+]] = affine_map<()[s0] -> ([[A_IMPL:s0 floordiv 2]])> @@ -95,11 +95,11 @@ // ----- transform.sequence failures(propagate) { - ^bb0(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!pdl.operation) -> !pdl.operation + ^bb0(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op // expected-error @below {{cannot compute parametric tile sizes for dynamically shaped payload op}} transform.structured.multitile_sizes %0 { target_size = 3, divisor = 2, dimension = 0 } - : (!pdl.operation) -> !transform.param + : (!transform.any_op) -> !transform.param } func.func @multitile_sizes_dynamic_gen( diff --git a/mlir/test/Dialect/Linalg/transform-op-rewrite-in-destination-passing-style.mlir b/mlir/test/Dialect/Linalg/transform-op-rewrite-in-destination-passing-style.mlir --- a/mlir/test/Dialect/Linalg/transform-op-rewrite-in-destination-passing-style.mlir +++ b/mlir/test/Dialect/Linalg/transform-op-rewrite-in-destination-passing-style.mlir @@ -11,11 +11,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["tensor.from_elements"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.rewrite_in_destination_passing_style %0 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op } // ----- @@ -34,11 +34,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["tensor.from_elements"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.rewrite_in_destination_passing_style %0 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op } // ----- @@ -63,11 +63,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["tensor.from_elements"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.rewrite_in_destination_passing_style %0 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op } // ----- @@ -95,11 +95,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["tensor.generate"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.rewrite_in_destination_passing_style %0 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op } // ----- @@ -136,11 +136,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["tensor.pad"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.rewrite_in_destination_passing_style %0 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op } // ----- @@ -170,11 +170,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["tensor.pad"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.rewrite_in_destination_passing_style %0 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op } // ----- @@ -202,11 +202,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["tensor.pad"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.rewrite_in_destination_passing_style %0 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op } // ----- @@ -230,9 +230,9 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): %0 = transform.structured.match ops{["tensor.pad"]} in %arg1 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op transform.structured.rewrite_in_destination_passing_style %0 - : (!pdl.operation) -> !pdl.operation + : (!transform.any_op) -> !transform.any_op } diff --git a/mlir/test/Dialect/Linalg/transform-op-split.mlir b/mlir/test/Dialect/Linalg/transform-op-split.mlir --- a/mlir/test/Dialect/Linalg/transform-op-split.mlir +++ b/mlir/test/Dialect/Linalg/transform-op-split.mlir @@ -1,9 +1,9 @@ // RUN: mlir-opt %s --test-transform-dialect-interpreter --split-input-file -verify-diagnostics | FileCheck %s transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1:2 = transform.structured.split %0 after 42 { dimension = 0 } : !pdl.operation +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1:2 = transform.structured.split %0 after 42 { dimension = 0 } : !transform.any_op } func.func private @elem(%arg0: f32, %arg1: index, %arg2: index) -> f32 @@ -49,9 +49,9 @@ // ----- transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1:2 = transform.structured.split %0 after 42 { dimension = 0 } : !pdl.operation +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1:2 = transform.structured.split %0 after 42 { dimension = 0 } : !transform.any_op } func.func private @elem(%arg0: f32, %arg1: index, %arg2: index) -> f32 @@ -82,10 +82,10 @@ // ----- transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1 = transform.structured.match ops{["func.call"]} in %arg1 : (!pdl.operation) -> !pdl.operation - transform.structured.split %0 after %1 { dimension = 0 } : !pdl.operation, !pdl.operation +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1 = transform.structured.match ops{["func.call"]} in %arg1 : (!transform.any_op) -> !transform.any_op + transform.structured.split %0 after %1 { dimension = 0 } : !transform.any_op, !transform.any_op } func.func private @get_size() -> index @@ -130,10 +130,10 @@ // ----- transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1:2 = transform.structured.split %0 after 4 { dimension = 0 } : !pdl.operation - %2:2 = transform.structured.split %1#1 after 16 { dimension = 1 } : !pdl.operation +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1:2 = transform.structured.split %0 after 4 { dimension = 0 } : !transform.any_op + %2:2 = transform.structured.split %1#1 after 16 { dimension = 1 } : !transform.any_op } func.func private @elem(%arg0: f32, %arg1: index, %arg2: index) -> f32 @@ -187,19 +187,19 @@ // ----- transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): +^bb1(%arg1: !transform.any_op): // expected-error @below {{expects either a dynamic or a static split point to be provided}} - %0:2 = "transform.structured.split"(%arg1) { dimension = 1, static_split_point = -9223372036854775808 } : (!pdl.operation) -> (!pdl.operation, !pdl.operation) + %0:2 = "transform.structured.split"(%arg1) { dimension = 1, static_split_point = -9223372036854775808 } : (!transform.any_op) -> (!transform.any_op, !transform.any_op) } // ----- transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1 = transform.structured.match ops{["func.call"]} in %arg1 : (!pdl.operation) -> !pdl.operation +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1 = transform.structured.match ops{["func.call"]} in %arg1 : (!transform.any_op) -> !transform.any_op // expected-error @below {{expected dynamic split point handle to point to a single-result index-typed op}} - transform.structured.split %0 after %1 { dimension = 0 } : !pdl.operation, !pdl.operation + transform.structured.split %0 after %1 { dimension = 0 } : !transform.any_op, !transform.any_op } func.func private @get_size() -> i64 @@ -221,11 +221,11 @@ // ----- transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1 = transform.structured.match ops{["func.call"]} in %arg1 : (!pdl.operation) -> !pdl.operation +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %1 = transform.structured.match ops{["func.call"]} in %arg1 : (!transform.any_op) -> !transform.any_op // expected-error @below {{expected the dynamic split point handle to point to as many operations (0) as the target handle (1)}} - transform.structured.split %0 after %1 { dimension = 0 } : !pdl.operation, !pdl.operation + transform.structured.split %0 after %1 { dimension = 0 } : !transform.any_op, !transform.any_op } func.func private @get_size() -> i64 @@ -245,10 +245,10 @@ // ----- transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["func.return"]} in %arg1 : (!pdl.operation) -> !pdl.operation +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["func.return"]} in %arg1 : (!transform.any_op) -> !transform.any_op // expected-error @below {{only applies to structured ops}} - transform.structured.split %0 after 16 { dimension = 1 } : !pdl.operation + transform.structured.split %0 after 16 { dimension = 1 } : !transform.any_op } func.func @noop(%arg0: tensor<100xf32>, %arg1: tensor<100xf32>) -> tensor<100xf32> { @@ -259,10 +259,10 @@ // ----- transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!pdl.operation) -> !pdl.operation +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op // expected-error @below {{dimension 1 does not exist in target op}} - transform.structured.split %0 after 16 { dimension = 1 } : !pdl.operation + transform.structured.split %0 after 16 { dimension = 1 } : !transform.any_op } func.func @one_d_static(%arg0: tensor<100xf32>, %arg1: tensor<100xf32>) -> tensor<100xf32> { @@ -281,11 +281,11 @@ // ----- transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!pdl.operation) -> !pdl.operation +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.generic"]} in %arg1 : (!transform.any_op) -> !transform.any_op // expected-error @below {{splitting does not produce the second part for a subset of targets}} // expected-note @below {{expected splitting to produce the second part of all or none of the targets}} - %1:2 = transform.structured.split %0 after 142 { dimension = 0 } : !pdl.operation + %1:2 = transform.structured.split %0 after 142 { dimension = 0 } : !transform.any_op } func.func private @elem(%arg0: f32, %arg1: index, %arg2: index) -> f32 diff --git a/mlir/test/Dialect/Linalg/transform-op-tile.mlir b/mlir/test/Dialect/Linalg/transform-op-tile.mlir --- a/mlir/test/Dialect/Linalg/transform-op-tile.mlir +++ b/mlir/test/Dialect/Linalg/transform-op-tile.mlir @@ -1,9 +1,9 @@ // RUN: mlir-opt --test-transform-dialect-interpreter --split-input-file --verify-diagnostics %s | FileCheck %s 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 [4, 4, 4] : (!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 [4, 4, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op) } // CHECK-LABEL: func @tile_linalg_matmul( @@ -37,10 +37,10 @@ // ----- transform.sequence failures(propagate) { -^bb0(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %1 = transform.structured.match ops{["func.call"]} in %arg1 : (!pdl.operation) -> !pdl.operation - %2, %loops:3 = transform.structured.tile %0 [%1, %1, 4] : (!pdl.operation, !pdl.operation, !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 = transform.structured.match ops{["func.call"]} in %arg1 : (!transform.any_op) -> !transform.any_op + %2, %loops:3 = transform.structured.tile %0 [%1, %1, 4] : (!transform.any_op, !transform.any_op, !transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op) } func.func private @get_dynamic_tile_size() -> index @@ -77,14 +77,14 @@ // ----- transform.sequence failures(propagate) { -^bb0(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!pdl.operation) -> !pdl.operation +^bb0(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op // expected-note @below {{for this parameter}} %1 = transform.test_produce_integer_param_with_type i64 : !transform.param // expected-error @below {{expected as many parameter values (0) as target ops (2)}} transform.structured.tile %0 [%1, %1, %1] - : (!pdl.operation, !transform.param, !transform.param, !transform.param) - -> (!pdl.operation, !pdl.operation, !pdl.operation, !pdl.operation) + : (!transform.any_op, !transform.param, !transform.param, !transform.param) + -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op) } func.func @tile_linalg_matmul( @@ -102,14 +102,14 @@ // ----- transform.sequence failures(propagate) { -^bb0(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!pdl.operation) -> !pdl.operation +^bb0(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op // expected-note @below {{for this handle}} - %1 = transform.structured.match ops{["arith.constant"]} in %arg1 : (!pdl.operation) -> !pdl.operation + %1 = transform.structured.match ops{["arith.constant"]} in %arg1 : (!transform.any_op) -> !transform.any_op // expected-error @below {{expected as many dynamic size-producing operations (0) as target ops (2)}} transform.structured.tile %0 [%1, %1, 1] - : (!pdl.operation, !pdl.operation, !pdl.operation) - -> (!pdl.operation, !pdl.operation, !pdl.operation, !pdl.operation) + : (!transform.any_op, !transform.any_op, !transform.any_op) + -> (!transform.any_op, !transform.any_op, !transform.any_op, !transform.any_op) } func.func @tile_linalg_matmul( diff --git a/mlir/test/Dialect/Linalg/transform-pack-greedily.mlir b/mlir/test/Dialect/Linalg/transform-pack-greedily.mlir --- a/mlir/test/Dialect/Linalg/transform-pack-greedily.mlir +++ b/mlir/test/Dialect/Linalg/transform-pack-greedily.mlir @@ -21,9 +21,9 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): +^bb1(%module_op: !transform.any_op): %matmul = transform.structured.match ops{["linalg.matmul"]} in %module_op - : (!pdl.operation) -> !transform.op<"linalg.matmul"> + : (!transform.any_op) -> !transform.op<"linalg.matmul"> transform.structured.pack_greedily %matmul matmul_packed_sizes = [8, 16, 32] matmul_inner_dims_order = [1, 2, 0] : (!transform.op<"linalg.matmul">) -> !transform.op<"linalg.generic"> @@ -67,8 +67,8 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): - %generic = transform.structured.match ops{["linalg.generic"]} in %module_op : (!pdl.operation) -> !transform.op<"linalg.generic"> +^bb1(%module_op: !transform.any_op): + %generic = transform.structured.match ops{["linalg.generic"]} in %module_op : (!transform.any_op) -> !transform.op<"linalg.generic"> transform.structured.pack_greedily %generic matmul_packed_sizes = [8, 16, 32] matmul_inner_dims_order = [1, 2, 0] : (!transform.op<"linalg.generic">) -> !transform.op<"linalg.generic"> @@ -112,8 +112,8 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): - %generic = transform.structured.match ops{["linalg.generic"]} in %module_op : (!pdl.operation) -> !transform.op<"linalg.generic"> +^bb1(%module_op: !transform.any_op): + %generic = transform.structured.match ops{["linalg.generic"]} in %module_op : (!transform.any_op) -> !transform.op<"linalg.generic"> transform.structured.pack_greedily %generic matmul_packed_sizes = [8, 16, 32] matmul_inner_dims_order = [1, 2, 0] : (!transform.op<"linalg.generic">) -> !transform.op<"linalg.generic"> @@ -157,8 +157,8 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): - %generic = transform.structured.match ops{["linalg.generic"]} in %module_op : (!pdl.operation) -> !transform.op<"linalg.generic"> +^bb1(%module_op: !transform.any_op): + %generic = transform.structured.match ops{["linalg.generic"]} in %module_op : (!transform.any_op) -> !transform.op<"linalg.generic"> transform.structured.pack_greedily %generic matmul_packed_sizes = [8, 16, 32] matmul_inner_dims_order = [1, 2, 0] : (!transform.op<"linalg.generic">) -> !transform.op<"linalg.generic"> @@ -191,9 +191,9 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): +^bb1(%module_op: !transform.any_op): %conv = transform.structured.match ops{["linalg.conv_2d_nchw_fchw"]} in %module_op - : (!pdl.operation) -> !transform.op<"linalg.conv_2d_nchw_fchw"> + : (!transform.any_op) -> !transform.op<"linalg.conv_2d_nchw_fchw"> transform.structured.pack_greedily %conv matmul_packed_sizes = [8, 16, 32] matmul_inner_dims_order = [1, 2, 0] : (!transform.op<"linalg.conv_2d_nchw_fchw">) -> !transform.op<"linalg.generic"> @@ -220,8 +220,8 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): - %generic = transform.structured.match ops{["linalg.generic"]} in %module_op : (!pdl.operation) -> !transform.op<"linalg.generic"> +^bb1(%module_op: !transform.any_op): + %generic = transform.structured.match ops{["linalg.generic"]} in %module_op : (!transform.any_op) -> !transform.op<"linalg.generic"> transform.structured.pack_greedily %generic matmul_packed_sizes = [8, 16, 32] matmul_inner_dims_order = [1, 2, 0] : (!transform.op<"linalg.generic">) -> !transform.op<"linalg.generic"> @@ -265,8 +265,8 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): - %generic = transform.structured.match ops{["linalg.generic"]} in %module_op : (!pdl.operation) -> !transform.op<"linalg.generic"> +^bb1(%module_op: !transform.any_op): + %generic = transform.structured.match ops{["linalg.generic"]} in %module_op : (!transform.any_op) -> !transform.op<"linalg.generic"> transform.structured.pack_greedily %generic // In this spec, the "k" dimension is not packed but rather padded to the // next multiple of 10 (i.e. 130). @@ -315,8 +315,8 @@ } transform.sequence failures(propagate) { -^bb1(%module_op: !pdl.operation): - %generic = transform.structured.match ops{["linalg.generic"]} in %module_op : (!pdl.operation) -> !transform.op<"linalg.generic"> +^bb1(%module_op: !transform.any_op): + %generic = transform.structured.match ops{["linalg.generic"]} in %module_op : (!transform.any_op) -> !transform.op<"linalg.generic"> transform.structured.pack_greedily %generic // In this spec, the "n" dimension is neither packed not unpacked. // We don't end up with an innermost matmul after packing but only with an diff --git a/mlir/test/Dialect/Linalg/transform-tile-and-fuse.mlir b/mlir/test/Dialect/Linalg/transform-tile-and-fuse.mlir --- a/mlir/test/Dialect/Linalg/transform-tile-and-fuse.mlir +++ b/mlir/test/Dialect/Linalg/transform-tile-and-fuse.mlir @@ -103,8 +103,8 @@ ^bb1(%arg1: !transform.any_op): // Find the root and all producers. %root = transform.structured.match attributes{"__root__"} in %arg1 : (!transform.any_op) -> !transform.any_op - %producers = transform.structured.match attributes{"__producer__"} in %arg1 : (!transform.any_op) -> !pdl.operation - %reversed_producers = transform.test_reverse_payload_ops %producers + %producers = transform.structured.match attributes{"__producer__"} in %arg1 : (!transform.any_op) -> !transform.any_op + %reversed_producers = transform.test_reverse_payload_ops %producers : (!transform.any_op) -> !transform.any_op // Tile the root. %forall_op, %tiled_op = transform.structured.tile_to_forall_op %root num_threads [10, 20] @@ -112,6 +112,6 @@ // Fuse all producers. transform.structured.fuse_into_containing_op %reversed_producers into %forall_op - : (!pdl.operation, !transform.any_op) -> !transform.any_op + : (!transform.any_op, !transform.any_op) -> !transform.any_op } } diff --git a/mlir/test/Dialect/Transform/test-interpreter.mlir b/mlir/test/Dialect/Transform/test-interpreter.mlir --- a/mlir/test/Dialect/Transform/test-interpreter.mlir +++ b/mlir/test/Dialect/Transform/test-interpreter.mlir @@ -637,7 +637,7 @@ func.func private @bar() transform.with_pdl_patterns { - ^bb0(%arg0: !pdl.operation): + ^bb0(%arg0: !transform.any_op): pdl.pattern @func : benefit(1) { %0 = pdl.operands %1 = pdl.types @@ -645,15 +645,15 @@ pdl.rewrite %2 with "transform.dialect" } - transform.sequence %arg0 : !pdl.operation failures(propagate) { - ^bb0(%arg1: !pdl.operation): - %0 = pdl_match @func in %arg1 : (!pdl.operation) -> !pdl.operation - %1 = replicate num(%0) %arg1 : !pdl.operation, !pdl.operation + transform.sequence %arg0 : !transform.any_op failures(propagate) { + ^bb0(%arg1: !transform.any_op): + %0 = pdl_match @func in %arg1 : (!transform.any_op) -> !transform.any_op + %1 = replicate num(%0) %arg1 : !transform.any_op, !transform.any_op // expected-remark @below {{2}} - test_print_number_of_associated_payload_ir_ops %1 - %2 = replicate num(%0) %1 : !pdl.operation, !pdl.operation + test_print_number_of_associated_payload_ir_ops %1 : !transform.any_op + %2 = replicate num(%0) %1 : !transform.any_op, !transform.any_op // expected-remark @below {{4}} - test_print_number_of_associated_payload_ir_ops %2 + test_print_number_of_associated_payload_ir_ops %2 : !transform.any_op } } } @@ -669,21 +669,21 @@ } transform.with_pdl_patterns { -^bb0(%arg0: !pdl.operation): +^bb0(%arg0: !transform.any_op): pdl.pattern @const : benefit(1) { %r = pdl.types %0 = pdl.operation "arith.constant" -> (%r : !pdl.range) pdl.rewrite %0 with "transform.dialect" } - transform.sequence %arg0 : !pdl.operation failures(propagate) { - ^bb1(%arg1: !pdl.operation): - %f = pdl_match @const in %arg1 : (!pdl.operation) -> !pdl.operation - transform.foreach %f : !pdl.operation { - ^bb2(%arg2: !pdl.operation): + transform.sequence %arg0 : !transform.any_op failures(propagate) { + ^bb1(%arg1: !transform.any_op): + %f = pdl_match @const in %arg1 : (!transform.any_op) -> !transform.any_op + transform.foreach %f : !transform.any_op { + ^bb2(%arg2: !transform.any_op): // expected-remark @below {{1}} - transform.test_print_number_of_associated_payload_ir_ops %arg2 - transform.test_print_remark_at_operand %arg2, "transform applied" : !pdl.operation + transform.test_print_number_of_associated_payload_ir_ops %arg2 : !transform.any_op + transform.test_print_remark_at_operand %arg2, "transform applied" : !transform.any_op } } } @@ -709,7 +709,7 @@ } transform.with_pdl_patterns { -^bb0(%arg0: !pdl.operation): +^bb0(%arg0: !transform.any_op): pdl.pattern @const : benefit(1) { %r = pdl.types %0 = pdl.operation "arith.constant" -> (%r : !pdl.range) @@ -722,18 +722,18 @@ pdl.rewrite %0 with "transform.dialect" } - transform.sequence %arg0 : !pdl.operation failures(propagate) { - ^bb1(%arg1: !pdl.operation): - %f = pdl_match @execute_region in %arg1 : (!pdl.operation) -> !pdl.operation - %results = transform.foreach %f : !pdl.operation -> !pdl.operation { - ^bb2(%arg2: !pdl.operation): - %g = transform.pdl_match @const in %arg2 : (!pdl.operation) -> !pdl.operation - transform.yield %g : !pdl.operation + transform.sequence %arg0 : !transform.any_op failures(propagate) { + ^bb1(%arg1: !transform.any_op): + %f = pdl_match @execute_region in %arg1 : (!transform.any_op) -> !transform.any_op + %results = transform.foreach %f : !transform.any_op -> !transform.any_op { + ^bb2(%arg2: !transform.any_op): + %g = transform.pdl_match @const in %arg2 : (!transform.any_op) -> !transform.any_op + transform.yield %g : !transform.any_op } // expected-remark @below {{3}} - transform.test_print_number_of_associated_payload_ir_ops %results - transform.test_print_remark_at_operand %results, "transform applied" : !pdl.operation + transform.test_print_number_of_associated_payload_ir_ops %results : !transform.any_op + transform.test_print_remark_at_operand %results, "transform applied" : !transform.any_op } } @@ -825,14 +825,14 @@ } transform.sequence failures(propagate) { -^bb1(%fun: !pdl.operation): - %muli = transform.structured.match ops{["arith.muli"]} in %fun : (!pdl.operation) -> !pdl.operation - %h:2 = split_handle %muli : (!pdl.operation) -> (!pdl.operation, !pdl.operation) +^bb1(%fun: !transform.any_op): + %muli = transform.structured.match ops{["arith.muli"]} in %fun : (!transform.any_op) -> !transform.any_op + %h:2 = split_handle %muli : (!transform.any_op) -> (!transform.any_op, !transform.any_op) // expected-remark @below {{1}} - transform.test_print_number_of_associated_payload_ir_ops %h#0 - %muli_2 = transform.structured.match ops{["arith.muli"]} in %fun : (!pdl.operation) -> !pdl.operation + transform.test_print_number_of_associated_payload_ir_ops %h#0 : !transform.any_op + %muli_2 = transform.structured.match ops{["arith.muli"]} in %fun : (!transform.any_op) -> !transform.any_op // expected-error @below {{expected to contain 3 payload ops but it contains 2 payload ops}} - %h_2:3 = split_handle %muli_2 : (!pdl.operation) -> (!pdl.operation, !pdl.operation, !pdl.operation) + %h_2:3 = split_handle %muli_2 : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op) } // ----- @@ -844,16 +844,16 @@ } transform.sequence failures(suppress) { -^bb1(%fun: !pdl.operation): - %muli = transform.structured.match ops{["arith.muli"]} in %fun : (!pdl.operation) -> !pdl.operation - %h:2 = split_handle %muli : (!pdl.operation) -> (!pdl.operation, !pdl.operation) +^bb1(%fun: !transform.any_op): + %muli = transform.structured.match ops{["arith.muli"]} in %fun : (!transform.any_op) -> !transform.any_op + %h:2 = split_handle %muli : (!transform.any_op) -> (!transform.any_op, !transform.any_op) // expected-remark @below {{1}} - transform.test_print_number_of_associated_payload_ir_ops %h#0 - %muli_2 = transform.structured.match ops{["arith.muli"]} in %fun : (!pdl.operation) -> !pdl.operation + transform.test_print_number_of_associated_payload_ir_ops %h#0 : !transform.any_op + %muli_2 = transform.structured.match ops{["arith.muli"]} in %fun : (!transform.any_op) -> !transform.any_op // Silenceable failure and all handles are now empty. - %h_2:3 = split_handle %muli_2 : (!pdl.operation) -> (!pdl.operation, !pdl.operation, !pdl.operation) + %h_2:3 = split_handle %muli_2 : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op) // expected-remark @below {{0}} - transform.test_print_number_of_associated_payload_ir_ops %h_2#0 + transform.test_print_number_of_associated_payload_ir_ops %h_2#0 : !transform.any_op } // ----- @@ -865,16 +865,16 @@ } transform.sequence failures(propagate) { -^bb1(%fun: !pdl.operation): - %muli_2 = transform.structured.match ops{["arith.muli"]} in %fun : (!pdl.operation) -> !pdl.operation +^bb1(%fun: !transform.any_op): + %muli_2 = transform.structured.match ops{["arith.muli"]} in %fun : (!transform.any_op) -> !transform.any_op // No error, last result handle is empty. - %h:3 = split_handle %muli_2 {fail_on_payload_too_small = false} : (!pdl.operation) -> (!pdl.operation, !pdl.operation, !pdl.operation) + %h:3 = split_handle %muli_2 {fail_on_payload_too_small = false} : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op) // expected-remark @below {{1}} - transform.test_print_number_of_associated_payload_ir_ops %h#0 + transform.test_print_number_of_associated_payload_ir_ops %h#0 : !transform.any_op // expected-remark @below {{1}} - transform.test_print_number_of_associated_payload_ir_ops %h#1 + transform.test_print_number_of_associated_payload_ir_ops %h#1 : !transform.any_op // expected-remark @below {{0}} - transform.test_print_number_of_associated_payload_ir_ops %h#2 + transform.test_print_number_of_associated_payload_ir_ops %h#2 : !transform.any_op } // ----- @@ -888,13 +888,13 @@ } transform.sequence failures(propagate) { -^bb1(%fun: !pdl.operation): - %muli_2 = transform.structured.match ops{["arith.muli"]} in %fun : (!pdl.operation) -> !pdl.operation - %h:2 = split_handle %muli_2 {overflow_result = 0} : (!pdl.operation) -> (!pdl.operation, !pdl.operation) +^bb1(%fun: !transform.any_op): + %muli_2 = transform.structured.match ops{["arith.muli"]} in %fun : (!transform.any_op) -> !transform.any_op + %h:2 = split_handle %muli_2 {overflow_result = 0} : (!transform.any_op) -> (!transform.any_op, !transform.any_op) // expected-remark @below {{3}} - transform.test_print_number_of_associated_payload_ir_ops %h#0 + transform.test_print_number_of_associated_payload_ir_ops %h#0 : !transform.any_op // expected-remark @below {{1}} - transform.test_print_number_of_associated_payload_ir_ops %h#1 + transform.test_print_number_of_associated_payload_ir_ops %h#1 : !transform.any_op } // ----- @@ -903,17 +903,17 @@ "other_dialect.other_op"() : () -> () transform.with_pdl_patterns { -^bb0(%arg0: !pdl.operation): +^bb0(%arg0: !transform.any_op): pdl.pattern @some : benefit(1) { %0 = pdl.operation "test.some_op" pdl.rewrite %0 with "transform.dialect" } - sequence %arg0 : !pdl.operation failures(propagate) { - ^bb1(%arg1: !pdl.operation): - %0 = pdl_match @some in %arg1 : (!pdl.operation) -> !pdl.operation - %2 = transform.cast %0 : !pdl.operation to !transform.test_dialect_op - transform.cast %2 : !transform.test_dialect_op to !pdl.operation + sequence %arg0 : !transform.any_op failures(propagate) { + ^bb1(%arg1: !transform.any_op): + %0 = pdl_match @some in %arg1 : (!transform.any_op) -> !transform.any_op + %2 = transform.cast %0 : !transform.any_op to !transform.test_dialect_op + transform.cast %2 : !transform.test_dialect_op to !transform.any_op } } @@ -1013,14 +1013,14 @@ return } -transform.sequence -> !pdl.operation failures(propagate) { -^bb1(%fun: !pdl.operation): - %muli = transform.structured.match ops{["arith.muli"]} in %fun : (!pdl.operation) -> !pdl.operation +transform.sequence -> !transform.any_op failures(propagate) { +^bb1(%fun: !transform.any_op): + %muli = transform.structured.match ops{["arith.muli"]} in %fun : (!transform.any_op) -> !transform.any_op // expected-error @below {{expected to contain 3 payload ops but it contains 2 payload ops}} - %h_2:3 = split_handle %muli : (!pdl.operation) -> (!pdl.operation, !pdl.operation, !pdl.operation) + %h_2:3 = split_handle %muli : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op) /// Test that yield does not crash in the presence of silenceable error in /// propagate mode. - yield %fun : !pdl.operation + yield %fun : !transform.any_op } // ----- @@ -1613,11 +1613,11 @@ } transform.sequence failures(propagate) { -^bb1(%arg1: !pdl.operation): - %0 = transform.structured.match ops{["test.replace_me"]} in %arg1 : (!pdl.operation) -> !pdl.operation +^bb1(%arg1: !transform.any_op): + %0 = transform.structured.match ops{["test.replace_me"]} in %arg1 : (!transform.any_op) -> !transform.any_op // expected-remark @below {{2 iterations}} - transform.test_tracked_rewrite %0 : (!pdl.operation) -> () + transform.test_tracked_rewrite %0 : (!transform.any_op) -> () // One replacement op (test.drop_mapping) is dropped from the mapping. // expected-remark @below {{2}} - test_print_number_of_associated_payload_ir_ops %0 + test_print_number_of_associated_payload_ir_ops %0 : !transform.any_op } diff --git a/mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td b/mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td --- a/mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td +++ b/mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td @@ -193,9 +193,9 @@ : Op]> { - let arguments = (ins PDL_Operation:$target); - let results = (outs PDL_Operation:$result); - let assemblyFormat = "$target attr-dict"; + let arguments = (ins TransformHandleTypeInterface:$target); + let results = (outs TransformHandleTypeInterface:$result); + let assemblyFormat = "$target attr-dict `:` functional-type(operands, results)"; let cppNamespace = "::mlir::test"; } @@ -315,8 +315,8 @@ : Op, DeclareOpInterfaceMethods]> { - let arguments = (ins PDL_Operation:$handle); - let assemblyFormat = "$handle attr-dict"; + let arguments = (ins TransformHandleTypeInterface:$handle); + let assemblyFormat = "$handle attr-dict `:` type($handle)"; let cppNamespace = "::mlir::test"; }