@@ -190,91 +190,6 @@ struct StaticRange {
190
190
191
191
} // namespace mlir::iree_compiler::IREE::HAL
192
192
193
- // It's unfortunate this is required.
194
- namespace mlir {
195
-
196
- template <>
197
- struct FieldParser <
198
- std::optional<mlir::iree_compiler::IREE::HAL::CollectiveReductionOp>> {
199
- static FailureOr<mlir::iree_compiler::IREE::HAL::CollectiveReductionOp>
200
- parse (AsmParser &parser) {
201
- std::string value;
202
- if (parser.parseKeywordOrString (&value))
203
- return failure ();
204
- auto result = mlir::iree_compiler::IREE::HAL::symbolizeEnum<
205
- mlir::iree_compiler::IREE::HAL::CollectiveReductionOp>(value);
206
- if (!result.has_value ())
207
- return failure ();
208
- return result.value ();
209
- }
210
- };
211
- static inline AsmPrinter &
212
- operator <<(AsmPrinter &printer,
213
- std::optional<mlir::iree_compiler::IREE::HAL::CollectiveReductionOp>
214
- param) {
215
- printer << (param.has_value ()
216
- ? mlir::iree_compiler::IREE::HAL::stringifyEnum (param.value ())
217
- : StringRef{" " });
218
- return printer;
219
- }
220
-
221
- template <>
222
- struct FieldParser <
223
- std::optional<mlir::iree_compiler::IREE::HAL::PipelineLayoutFlags>> {
224
- static FailureOr<mlir::iree_compiler::IREE::HAL::PipelineLayoutFlags>
225
- parse (AsmParser &parser) {
226
- std::string value;
227
- if (parser.parseKeywordOrString (&value))
228
- return failure ();
229
- auto result = mlir::iree_compiler::IREE::HAL::symbolizeEnum<
230
- mlir::iree_compiler::IREE::HAL::PipelineLayoutFlags>(value);
231
- if (!result.has_value ())
232
- return failure ();
233
- return result.value ();
234
- }
235
- };
236
- static inline AsmPrinter &operator <<(
237
- AsmPrinter &printer,
238
- std::optional<mlir::iree_compiler::IREE::HAL::PipelineLayoutFlags> param) {
239
- printer << (param.has_value ()
240
- ? mlir::iree_compiler::IREE::HAL::stringifyEnum (param.value ())
241
- : StringRef{" " });
242
- return printer;
243
- }
244
-
245
- template <>
246
- struct FieldParser <
247
- std::optional<mlir::iree_compiler::IREE::HAL::DescriptorFlags>> {
248
- static FailureOr<mlir::iree_compiler::IREE::HAL::DescriptorFlags>
249
- parse (AsmParser &parser) {
250
- std::string value;
251
- if (parser.parseKeywordOrString (&value))
252
- return failure ();
253
- auto result = mlir::iree_compiler::IREE::HAL::symbolizeEnum<
254
- mlir::iree_compiler::IREE::HAL::DescriptorFlags>(value);
255
- if (!result.has_value ())
256
- return failure ();
257
- return result.value ();
258
- }
259
- };
260
- static inline AsmPrinter &operator <<(
261
- AsmPrinter &printer,
262
- std::optional<mlir::iree_compiler::IREE::HAL::DescriptorFlags> param) {
263
- printer << (param.has_value ()
264
- ? mlir::iree_compiler::IREE::HAL::stringifyEnum (param.value ())
265
- : StringRef{" " });
266
- return printer;
267
- }
268
-
269
- static inline AsmPrinter &
270
- operator <<(AsmPrinter &printer,
271
- mlir::iree_compiler::IREE::HAL::DescriptorType param) {
272
- printer << mlir::iree_compiler::IREE::HAL::stringifyEnum (param);
273
- return printer;
274
- }
275
-
276
- } // namespace mlir
277
-
278
193
// clang-format off: must be included after all LLVM/MLIR headers.
279
194
#define GET_ATTRDEF_CLASSES
280
195
#include " iree/compiler/Dialect/HAL/IR/HALAttrs.h.inc" // IWYU pragma: keep
0 commit comments