@@ -79,7 +79,9 @@ module attributes {transform.with_named_sequence} {
79
79
%1 = transform.structured.match ops {[" func.func" ]} in %arg1 : (!transform.any_op ) -> !transform.any_op
80
80
// expected-error @below {{failed to add pass or pass pipeline to pipeline: canonicalize}}
81
81
// expected-error @below {{<Pass-Options-Parser>: no such option invalid-option}}
82
- transform.apply_registered_pass " canonicalize" with options = " invalid-option=1" to %1 : (!transform.any_op ) -> !transform.any_op
82
+ transform.apply_registered_pass " canonicalize"
83
+ with options = " invalid-option=1" to %1
84
+ : (!transform.any_op ) -> !transform.any_op
83
85
transform.yield
84
86
}
85
87
}
@@ -94,7 +96,9 @@ func.func @valid_pass_option() {
94
96
module attributes {transform.with_named_sequence } {
95
97
transform.named_sequence @__transform_main (%arg1: !transform.any_op ) {
96
98
%1 = transform.structured.match ops {[" func.func" ]} in %arg1 : (!transform.any_op ) -> !transform.any_op
97
- transform.apply_registered_pass " canonicalize" with options = " top-down=false" to %1 : (!transform.any_op ) -> !transform.any_op
99
+ transform.apply_registered_pass " canonicalize"
100
+ with options = " top-down=false" to %1
101
+ : (!transform.any_op ) -> !transform.any_op
98
102
transform.yield
99
103
}
100
104
}
@@ -110,7 +114,9 @@ module attributes {transform.with_named_sequence} {
110
114
transform.named_sequence @__transform_main (%arg1: !transform.any_op ) {
111
115
%1 = transform.structured.match ops {[" func.func" ]} in %arg1 : (!transform.any_op ) -> !transform.any_op
112
116
//transform.apply_registered_pass "canonicalize" with options = "top-down=false,max-iterations=10" to %1 : (!transform.any_op) -> !transform.any_op
113
- transform.apply_registered_pass " canonicalize" with options = " top-down=false test-convergence=true" to %1 : (!transform.any_op ) -> !transform.any_op
117
+ transform.apply_registered_pass " canonicalize"
118
+ with options = " top-down=false test-convergence=true" to %1
119
+ : (!transform.any_op ) -> !transform.any_op
114
120
transform.yield
115
121
}
116
122
}
@@ -125,7 +131,9 @@ func.func @valid_pass_options_as_list() {
125
131
module attributes {transform.with_named_sequence } {
126
132
transform.named_sequence @__transform_main (%arg1: !transform.any_op ) {
127
133
%1 = transform.structured.match ops {[" func.func" ]} in %arg1 : (!transform.any_op ) -> !transform.any_op
128
- transform.apply_registered_pass " canonicalize" with options = " top-down=false" " max-iterations=0" to %1 : (!transform.any_op ) -> !transform.any_op
134
+ transform.apply_registered_pass " canonicalize"
135
+ with options = " top-down=false" " max-iterations=0" to %1
136
+ : (!transform.any_op ) -> !transform.any_op
129
137
transform.yield
130
138
}
131
139
}
@@ -142,7 +150,9 @@ module attributes {transform.with_named_sequence} {
142
150
%1 = transform.structured.match ops {[" func.func" ]} in %arg1 : (!transform.any_op ) -> !transform.any_op
143
151
%max_iter = transform.param.constant " max-iterations=10" -> !transform.any_param
144
152
%max_rewrites = transform.param.constant " max-num-rewrites=1" -> !transform.any_param
145
- %2 = transform.apply_registered_pass " canonicalize" with options = " top-down=false" %max_iter " test-convergence=true" %max_rewrites to %1 : (!transform.any_param , !transform.any_param , !transform.any_op ) -> !transform.any_op
153
+ %2 = transform.apply_registered_pass " canonicalize"
154
+ with options = " top-down=false" %max_iter " test-convergence=true" %max_rewrites to %1
155
+ : (!transform.any_param , !transform.any_param , !transform.any_op ) -> !transform.any_op
146
156
transform.yield
147
157
}
148
158
}
@@ -157,8 +167,10 @@ module attributes {transform.with_named_sequence} {
157
167
transform.named_sequence @__transform_main (%arg1: !transform.any_op ) {
158
168
%1 = transform.structured.match ops {[" func.func" ]} in %arg1 : (!transform.any_op ) -> !transform.any_op
159
169
%max_iter = transform.param.constant " max-iterations=10" -> !transform.any_param
160
- // expected-error @below {{expected at least one option (either a string or a param)}}
161
- %2 = transform.apply_registered_pass " canonicalize" with options = [" top-down=false" %max_iter ] to %1 : (!transform.any_param , !transform.any_param , !transform.any_op ) -> !transform.any_op
170
+ // expected-error @+2 {{expected at least one option (either a string or a param)}}
171
+ %2 = transform.apply_registered_pass " canonicalize"
172
+ with options = [" top-down=false" %max_iter ] to %1
173
+ : (!transform.any_param , !transform.any_param , !transform.any_op ) -> !transform.any_op
162
174
transform.yield
163
175
}
164
176
}
@@ -172,9 +184,10 @@ func.func @invalid_options_as_pairs() {
172
184
module attributes {transform.with_named_sequence } {
173
185
transform.named_sequence @__transform_main (%arg1: !transform.any_op ) {
174
186
%1 = transform.structured.match ops {[" func.func" ]} in %arg1 : (!transform.any_op ) -> !transform.any_op
175
- %max_iter = transform.param.constant " max-iterations=10" -> !transform.any_param
176
- // expected-error @below {{expected 'to'}}
177
- %2 = transform.apply_registered_pass " canonicalize" with options = " top-down=" false to %1 : (!transform.any_param , !transform.any_param , !transform.any_op ) -> !transform.any_op
187
+ // expected-error @+2 {{expected 'to'}}
188
+ %2 = transform.apply_registered_pass " canonicalize"
189
+ with options = " top-down=" false to %1
190
+ : (!transform.any_param , !transform.any_param , !transform.any_op ) -> !transform.any_op
178
191
transform.yield
179
192
}
180
193
}
@@ -190,7 +203,9 @@ module attributes {transform.with_named_sequence} {
190
203
%1 = transform.structured.match ops {[" func.func" ]} in %arg1 : (!transform.any_op ) -> !transform.any_op
191
204
%pass_options = transform.param.constant 42 -> !transform.any_param
192
205
// expected-error @below {{options passed as a param must be a string, got 42}}
193
- transform.apply_registered_pass " canonicalize" with options = %pass_options to %1 : (!transform.any_param , !transform.any_op ) -> !transform.any_op
206
+ transform.apply_registered_pass " canonicalize"
207
+ with options = %pass_options to %1
208
+ : (!transform.any_param , !transform.any_op ) -> !transform.any_op
194
209
transform.yield
195
210
}
196
211
}
@@ -208,7 +223,9 @@ module attributes {transform.with_named_sequence} {
208
223
%y = transform.param.constant " y" -> !transform.any_param
209
224
%pass_options = transform.merge_handles %x , %y : !transform.any_param
210
225
// expected-error @below {{options passed as a param must have a single value associated, param 0 associates 2}}
211
- transform.apply_registered_pass " canonicalize" with options = %pass_options to %1 : (!transform.any_param , !transform.any_op ) -> !transform.any_op
226
+ transform.apply_registered_pass " canonicalize"
227
+ with options = %pass_options to %1
228
+ : (!transform.any_param , !transform.any_op ) -> !transform.any_op
212
229
transform.yield
213
230
}
214
231
}
0 commit comments