brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.2 KiB · 9ff430a Raw
226 lines · plain
1// RUN: mlir-opt %s --split-input-file --verify-diagnostics2 3transform.sequence failures(suppress) {4^bb0(%arg0: !transform.any_op):5  // expected-error @below {{expected one body argument}}6  transform.match.structured %arg0 : !transform.any_op {7  ^bb1:8    transform.match.structured.yield9  }10  transform.yield11}12 13// -----14 15transform.sequence failures(suppress) {16^bb0(%arg0: !transform.any_op):17  // expected-error @below {{expected body argument to implement TransformHandleTypeInterface}}18  transform.match.structured %arg0 : !transform.any_op {19  ^bb1(%arg1: i32):20    transform.match.structured.yield21  }22  transform.yield23}24 25// -----26 27transform.sequence failures(suppress) {28^bb0(%arg0: !transform.any_op):29  // expected-error @below {{expects nested operations to implement MatchOpInterface}}30  transform.match.structured %arg0 : !transform.any_op {31  ^bb1(%arg1: !transform.any_op):32    // expected-note @below {{offending operation}}33    transform.test_consume_operand %arg1 : !transform.any_op34    transform.match.structured.yield35  }36  transform.yield37}38// -----39 40transform.sequence failures(suppress) {41^bb0(%arg0: !transform.any_op):42  // expected-error @below {{expects parent op to be 'transform.match.structured'}}43  transform.match.structured.body %arg0 { passthrough } : !transform.any_op44  transform.yield45}46 47 48// -----49 50transform.sequence failures(suppress) {51^bb0(%arg0: !transform.any_op):52  transform.match.structured %arg0 : !transform.any_op {53  ^bb1(%arg1: !transform.any_op):54    // expected-error @below {{expected predicate to apply to the surrounding structured op}}55    transform.match.structured.body %arg0 { passthrough } : !transform.any_op56    transform.match.structured.yield57  }58  transform.yield59}60 61// -----62 63transform.sequence failures(suppress) {64^bb0(%arg0: !transform.any_op):65  transform.match.structured %arg0 : !transform.any_op {66  ^bb1(%arg1: !transform.any_op):67    // expected-error @below {{only one of {"reduction_position", "passthrough", "elementwise", "contraction"} is allowed}}68    transform.match.structured.body %arg1 { passthrough, reduction_position = 0 } : !transform.any_op69    transform.match.structured.yield70  }71  transform.yield72}73 74// -----75 76transform.sequence failures(suppress) {77^bb0(%arg0: !transform.any_op):78  transform.match.structured %arg0 : !transform.any_op {79  ^bb1(%arg1: !transform.any_op):80    // expected-error @below {{cannot request both 'all' and 'inverted' values in the list}}81    "transform.match.structured.dim"(%arg1) { is_all, is_inverted, raw_dim_list = array<i64> } : (!transform.any_op) -> ()82    transform.match.structured.yield83  }84  transform.yield85}86 87// -----88 89transform.sequence failures(suppress) {90^bb0(%arg0: !transform.any_op):91  transform.match.structured %arg0 : !transform.any_op {92  ^bb1(%arg1: !transform.any_op):93    // expected-error @below {{cannot both request 'all' and specific values in the list}}94    "transform.match.structured.dim"(%arg1) { is_all, raw_dim_list = array<i64: 0, 1> } : (!transform.any_op) -> ()95    transform.match.structured.yield96  }97  transform.yield98}99// -----100 101transform.sequence failures(suppress) {102^bb0(%arg0: !transform.any_op):103  transform.match.structured %arg0 : !transform.any_op {104  ^bb1(%arg1: !transform.any_op):105    // expected-error @below {{must request specific values in the list if 'all' is not specified}}106    "transform.match.structured.dim"(%arg1) { raw_dim_list = array<i64> } : (!transform.any_op) -> ()107    transform.match.structured.yield108  }109  transform.yield110}111 112// -----113 114transform.sequence failures(suppress) {115^bb0(%arg0: !transform.any_op):116  transform.match.structured %arg0 : !transform.any_op {117  ^bb1(%arg1: !transform.any_op):118    // expected-error @below {{op expected the listed values to be unique}}119    "transform.match.structured.dim"(%arg1) { raw_dim_list = array<i64: 0, 0> } : (!transform.any_op) -> ()120    transform.match.structured.yield121  }122  transform.yield123}124 125// -----126 127transform.sequence failures(suppress) {128^bb0(%arg0: !transform.any_op):129  transform.match.structured %arg0 : !transform.any_op {130  ^bb1(%arg1: !transform.any_op):   131    // expected-error @below {{cannot request the same dimension to be both parallel and reduction}}132    "transform.match.structured.dim"(%arg1) { is_all, parallel, reduction, raw_dim_list = array<i64> } : (!transform.any_op) -> ()133    transform.match.structured.yield134  }135  transform.yield136}137 138// -----139 140transform.sequence failures(suppress) {141^bb0(%arg0: !transform.any_op):142  transform.match.structured %arg0 : !transform.any_op {143  ^bb1(%arg1: !transform.any_op):   144    // expected-error @below {{"permutation" and "projected_permutation" are mutually exclusive}}145    transform.match.structured.input %arg1[all] { permutation, projected_permutation } : !transform.any_op146    transform.match.structured.yield147  }148  transform.yield149}150// -----151 152transform.sequence failures(suppress) {153^bb0(%arg0: !transform.any_op):154  transform.match.structured %arg0 : !transform.any_op {155  ^bb1(%arg1: !transform.any_op):   156    // expected-error @below {{cannot bind multiple inputs/inits to the same value}}157    transform.match.structured.input %arg1[0, 1] : (!transform.any_op) -> !transform.any_op158    transform.match.structured.yield159  }160  transform.yield161}162 163// -----164 165transform.sequence failures(suppress) {166^bb0(%arg0: !transform.any_op):167  transform.match.structured %arg0 : !transform.any_op {168  ^bb1(%arg1: !transform.any_op):   169    // expected-error @below {{"permutation" and "projected_permutation" are mutually exclusive}}170    transform.match.structured.init %arg1[all] { permutation, projected_permutation } : !transform.any_op171    transform.match.structured.yield172  }173  transform.yield174}175// -----176 177transform.sequence failures(suppress) {178^bb0(%arg0: !transform.any_op):179  transform.match.structured %arg0 : !transform.any_op {180  ^bb1(%arg1: !transform.any_op):   181    // expected-error @below {{cannot bind multiple inputs/inits to the same value}}182    transform.match.structured.init %arg1[0, 1] : (!transform.any_op) -> !transform.any_op183    transform.match.structured.yield184  }185  transform.yield186}187 188// -----189 190transform.sequence failures(suppress) {191^bb0(%arg0: !transform.any_op):192  transform.match.structured %arg0 : !transform.any_op {193  ^bb1(%arg1: !transform.any_op):194    // expected-error @below {{expects either the any/single keyword or the type value handle result type}}195    transform.match.structured.result %arg1[0] : (!transform.any_op) -> !transform.any_op196    transform.match.structured.yield197  }198  transform.yield199}200 201// -----202 203transform.sequence failures(suppress) {204^bb0(%arg0: !transform.any_op):205  transform.match.structured %arg0 : !transform.any_op {206  ^bb1(%arg1: !transform.any_op):207    // expected-error @below {{expects either the any/single keyword or the type value handle result type}}208    transform.match.structured.result %arg1[0] {any} : (!transform.any_op) -> !transform.any_value209    transform.match.structured.yield210  }211  transform.yield212}213 214// -----215 216transform.sequence failures(suppress) {217^bb0(%arg0: !transform.any_op):218  transform.match.structured %arg0 : !transform.any_op {219  ^bb1(%arg1: !transform.any_op):220    // expected-error @below {{'any' and 'single' are mutually exclusive}}221    transform.match.structured.result %arg1[0] {any, single} : (!transform.any_op) -> !transform.any_op222    transform.match.structured.yield223  }224  transform.yield225}226