Files
clang-p2996/mlir/test/Dialect/Linalg/transform-ops.mlir
Alex Zinenko 5cde5a5739 [mlir] add interchange, pad and scalarize to structured transform dialect
Add ops to the structured transform extension of the transform dialect that
perform interchange, padding and scalarization on structured ops. Along with
tiling that is already defined, this provides a minimal set of transformations
necessary to build vectorizable code for a single structured op.

Define two helper traits: one that implements TransformOpInterface by applying
a function to each payload op independently and another that provides a simple
"functional-style" producer/consumer list of memory effects for the transform
ops.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D126374
2022-05-30 11:42:40 +02:00

32 lines
978 B
MLIR

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