| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | #ifndef TF_DIALECT_H |
| | #define TF_DIALECT_H |
| |
|
| | #include <mlir/Dialect/Traits.h> |
| | #include <mlir/IR/BuiltinOps.h> |
| | #include <mlir/IR/Dialect.h> |
| | #include <mlir/IR/OpImplementation.h> |
| | #include <mlir/Interfaces/ControlFlowInterfaces.h> |
| | #include <mlir/Interfaces/DerivedAttributeOpInterface.h> |
| | #include <mlir/Interfaces/InferTypeOpInterface.h> |
| | #include <mlir/Interfaces/LoopLikeInterface.h> |
| | #include <mlir/Interfaces/SideEffectInterfaces.h> |
| |
|
| | #include "tf_traits.h" |
| |
|
| | namespace mlir { |
| |
|
| | namespace TF { |
| |
|
| | class TensorFlowDialect : public mlir::Dialect |
| | { |
| | public: |
| | TensorFlowDialect(mlir::MLIRContext* context); |
| |
|
| | static StringRef getDialectNamespace() |
| | { |
| | return "tf"; |
| | } |
| |
|
| | Attribute parseAttribute(DialectAsmParser& parser, Type type) const override; |
| |
|
| | |
| | Type parseType(DialectAsmParser& parser) const override; |
| |
|
| | |
| | Type ParseResourceType(DialectAsmParser& parser) const; |
| |
|
| | |
| | |
| | Type ParseVariantType(DialectAsmParser& parser) const; |
| |
|
| | |
| | |
| | Operation* materializeConstant(OpBuilder& builder, Attribute value, Type type, Location loc) override; |
| | }; |
| |
|
| | } |
| |
|
| | } |
| |
|
| | #define GET_OP_CLASSES |
| | #include "tf_all_ops.h.inc" |
| |
|
| | #endif |
| |
|