Files
clang-p2996/mlir/test/Dialect/Linalg/transform-ops-invalid.mlir
Alex Zinenko a60ed95419 [mlir][transform] failure propagation mode in sequence
Introduce two different failure propagation mode in the Transform
dialect's Sequence operation. These modes specify whether silenceable
errors produced by nested ops are immediately propagated, thus stopping
the sequence, or suppressed. The latter is useful in end-to-end
transform application scenarios where the user cannot correct the
transformation, but it is robust enough to silenceable failures. It
can be combined with the "alternatives" operation. There is
intentionally no default value to avoid favoring one mode over the
other.

Downstreams can update their tests using:

  S='s/sequence \(%.*\) {/sequence \1 failures(propagate) {/'
  T='s/sequence {/sequence failures(propagate) {/'
  git grep -l transform.sequence | xargs sed -i -e "$S"
  git grep -l transform.sequence | xargs sed -i -e "$T"

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D131774
2022-08-12 15:31:22 +00:00

40 lines
1.2 KiB
MLIR

// RUN: mlir-opt %s --split-input-file --verify-diagnostics
transform.sequence failures(propagate) {
^bb0(%arg0: !pdl.operation):
// expected-error@below {{expects iterator_interchange to be a permutation, found [1, 1]}}
transform.structured.interchange %arg0 {iterator_interchange = [1, 1]}
}
// -----
transform.sequence failures(propagate) {
^bb0(%arg0: !pdl.operation):
// expected-error@below {{expects padding_dimensions to contain positive integers, found [1, -7]}}
transform.structured.pad %arg0 {padding_dimensions=[1, -7]}
}
// -----
transform.sequence failures(propagate) {
^bb0(%arg0: !pdl.operation):
// expected-error@below {{expects pack_paddings to contain booleans (0/1), found [1, 7]}}
transform.structured.pad %arg0 {pack_paddings=[1, 7]}
}
// -----
transform.sequence failures(propagate) {
^bb0(%arg0: !pdl.operation):
// expected-error@below {{expects hoist_paddings to contain positive integers, found [1, -7]}}
transform.structured.pad %arg0 {hoist_paddings=[1, -7]}
}
// -----
transform.sequence failures(propagate) {
^bb0(%arg0: !pdl.operation):
// expected-error@below {{expects transpose_paddings to be a permutation, found [1, 1]}}
transform.structured.pad %arg0 {transpose_paddings=[[1, 1]]}
}