1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
|
// RUN: mlir-opt %s --split-input-file --verify-diagnostics
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
// expected-error @below {{expected one body argument}}
transform.match.structured %arg0 : !transform.any_op {
^bb1:
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
// expected-error @below {{expected body argument to implement TransformHandleTypeInterface}}
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: i32):
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
// expected-error @below {{expects nested operations to implement MatchOpInterface}}
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-note @below {{offending operation}}
transform.test_consume_operand %arg1 : !transform.any_op
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
// expected-error @below {{expects parent op to be 'transform.match.structured'}}
transform.match.structured.body %arg0 { passthrough } : !transform.any_op
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-error @below {{expected predicate to apply to the surrounding structured op}}
transform.match.structured.body %arg0 { passthrough } : !transform.any_op
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-error @below {{only one of {"reduction_position", "passthrough", "contraction"} is allowed}}
transform.match.structured.body %arg1 { passthrough, reduction_position = 0 } : !transform.any_op
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-error @below {{cannot request both 'all' and 'inverted' values in the list}}
"transform.match.structured.dim"(%arg1) { is_all, is_inverted, raw_dim_list = array<i64> } : (!transform.any_op) -> ()
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-error @below {{cannot both request 'all' and specific values in the list}}
"transform.match.structured.dim"(%arg1) { is_all, raw_dim_list = array<i64: 0, 1> } : (!transform.any_op) -> ()
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-error @below {{must request specific values in the list if 'all' is not specified}}
"transform.match.structured.dim"(%arg1) { raw_dim_list = array<i64> } : (!transform.any_op) -> ()
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-error @below {{op expected the listed values to be unique}}
"transform.match.structured.dim"(%arg1) { raw_dim_list = array<i64: 0, 0> } : (!transform.any_op) -> ()
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-error @below {{cannot request the same dimension to be both parallel and reduction}}
"transform.match.structured.dim"(%arg1) { is_all, parallel, reduction, raw_dim_list = array<i64> } : (!transform.any_op) -> ()
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-error @below {{"permutation" and "projected_permutation" are mutually exclusive}}
transform.match.structured.input %arg1[all] { permutation, projected_permutation } : !transform.any_op
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-error @below {{cannot bind multiple inputs/inits to the same value}}
transform.match.structured.input %arg1[0, 1] : (!transform.any_op) -> !transform.any_op
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-error @below {{"permutation" and "projected_permutation" are mutually exclusive}}
transform.match.structured.init %arg1[all] { permutation, projected_permutation } : !transform.any_op
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-error @below {{cannot bind multiple inputs/inits to the same value}}
transform.match.structured.init %arg1[0, 1] : (!transform.any_op) -> !transform.any_op
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-error @below {{expects either the any/single keyword or the type value handle result type}}
transform.match.structured.result %arg1[0] : (!transform.any_op) -> !transform.any_op
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-error @below {{expects either the any/single keyword or the type value handle result type}}
transform.match.structured.result %arg1[0] {any} : (!transform.any_op) -> !transform.any_value
transform.match.structured.yield
}
transform.yield
}
// -----
transform.sequence failures(suppress) {
^bb0(%arg0: !transform.any_op):
transform.match.structured %arg0 : !transform.any_op {
^bb1(%arg1: !transform.any_op):
// expected-error @below {{'any' and 'single' are mutually exclusive}}
transform.match.structured.result %arg1[0] {any, single} : (!transform.any_op) -> !transform.any_op
transform.match.structured.yield
}
transform.yield
}
|