llvm-project/mlir/test/Dialect/Linalg/transform-ops.mlir
Alex Zinenko 88c5027b93 [mlir] make multi-size tiling use transform parameters
Use the recently introduced transform dialect parameter mechanism to
perform controllable multi-size tiling with sizes computed at the
transformation time rather than at runtime.

This requires to generalize tile and split structured transform
operations to work with any transform dialect handle types, which is
desirable in itself to avoid unchecked overuse of PDL OperationType.

Reviewed By: shabalin

Differential Revision: https://reviews.llvm.org/D140980
2023-01-19 10:19:37 +00:00

38 lines
1.4 KiB
MLIR

// RUN: mlir-opt %s | mlir-opt | FileCheck %s
transform.sequence failures(propagate) {
^bb1(%arg0: !pdl.operation):
// CHECK %{{.*}}, %{{.*}}:2 = transform.structured.tile
%0, %1:2 = transform.structured.tile %arg0 [2, 0, 3] : (!pdl.operation) -> (!pdl.operation, !pdl.operation, !pdl.operation)
}
transform.sequence failures(propagate) {
^bb1(%arg0: !transform.any_op):
%0:2 = transform.structured.split %arg0 after 42 { dimension = 0 } : !transform.any_op
transform.structured.split %0#0 after %0#1 { dimension = 1 } : !transform.any_op, !transform.any_op
}
//===----------------------------------------------------------------------===//
// Check that operations are registered correctly through the extension
// mechanism. Their syntax is generated and requires no additional testing since
// we test the generator.
//===----------------------------------------------------------------------===//
transform.sequence failures(propagate) {
^bb1(%arg0: !pdl.operation):
// CHECK: transform.structured.pad
%0 = transform.structured.pad %arg0
}
transform.sequence failures(propagate) {
^bb1(%arg0: !pdl.operation):
// CHECK: transform.structured.interchange
%0 = transform.structured.interchange %arg0
}
transform.sequence failures(propagate) {
^bb1(%arg0: !pdl.operation):
// CHECK: transform.structured.scalarize
%0 = transform.structured.scalarize %arg0
}