| 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
| 2 | |* *| |
| 3 | |* AttrDef Declarations *| |
| 4 | |* *| |
| 5 | |* Automatically generated file, do not edit! *| |
| 6 | |* *| |
| 7 | \*===----------------------------------------------------------------------===*/ |
| 8 | |
| 9 | #ifdef GET_ATTRDEF_CLASSES |
| 10 | #undef GET_ATTRDEF_CLASSES |
| 11 | |
| 12 | #include "mlir/IR/Attributes.h" |
| 13 | |
| 14 | |
| 15 | namespace mlir { |
| 16 | class AsmParser; |
| 17 | class AsmPrinter; |
| 18 | } // namespace mlir |
| 19 | namespace mlir::shard { |
| 20 | |
| 21 | /// Reduction of an iterator/grid dimension. |
| 22 | class ReductionKindAttr; |
| 23 | class GridAxesArrayAttr; |
| 24 | namespace detail { |
| 25 | |
| 26 | struct ReductionKindAttrStorage; |
| 27 | |
| 28 | } // namespace detail |
| 29 | class ReductionKindAttr : public ::mlir::Attribute::AttrBase<ReductionKindAttr, ::mlir::Attribute, detail::ReductionKindAttrStorage> { |
| 30 | public: |
| 31 | using Base::Base; |
| 32 | static constexpr ::llvm::StringLiteral name = "shard.partial" ; |
| 33 | static constexpr ::llvm::StringLiteral dialectName = "shard" ; |
| 34 | static ReductionKindAttr get(::mlir::MLIRContext *context, ::mlir::shard::ReductionKind value); |
| 35 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 36 | return {"partial" }; |
| 37 | } |
| 38 | |
| 39 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 40 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 41 | ::mlir::shard::ReductionKind getValue() const; |
| 42 | }; |
| 43 | namespace detail { |
| 44 | |
| 45 | struct GridAxesArrayAttrStorage; |
| 46 | |
| 47 | } // namespace detail |
| 48 | class GridAxesArrayAttr : public ::mlir::Attribute::AttrBase<GridAxesArrayAttr, ::mlir::Attribute, detail::GridAxesArrayAttrStorage> { |
| 49 | public: |
| 50 | using Base::Base; |
| 51 | size_t size() const { return getAxes().size(); } |
| 52 | auto begin() const { return getAxes().begin(); } |
| 53 | auto end() const { return getAxes().end(); } |
| 54 | static constexpr ::llvm::StringLiteral name = "shard.axisarray" ; |
| 55 | static constexpr ::llvm::StringLiteral dialectName = "shard" ; |
| 56 | static GridAxesArrayAttr get(::mlir::MLIRContext *context, ::llvm::ArrayRef<GridAxesAttr> axes); |
| 57 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 58 | return {"axisarray" }; |
| 59 | } |
| 60 | |
| 61 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 62 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 63 | ::llvm::ArrayRef<GridAxesAttr> getAxes() const; |
| 64 | }; |
| 65 | |
| 66 | } // namespace mlir::shard |
| 67 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::shard::ReductionKindAttr) |
| 68 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::shard::GridAxesArrayAttr) |
| 69 | |
| 70 | #endif // GET_ATTRDEF_CLASSES |
| 71 | |
| 72 | |