1/* Copyright 2021 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15
16#ifndef TENSORFLOW_CORE_IR_DIALECT_H_
17#define TENSORFLOW_CORE_IR_DIALECT_H_
18
19#include "mlir/IR/BuiltinTypes.h" // from @llvm-project
20#include "mlir/IR/Diagnostics.h" // from @llvm-project
21#include "mlir/IR/Dialect.h" // from @llvm-project
22#include "mlir/IR/OpImplementation.h" // from @llvm-project
23#include "mlir/IR/TypeUtilities.h" // from @llvm-project
24#include "tensorflow/core/ir/types/dialect.h"
25
26namespace mlir {
27namespace tfg {
28// Include the relevant TensorFlow attrs/types directly in the TFG namespace.
29using mlir::tf_type::Bfloat16RefType; // NOLINT
30using mlir::tf_type::BoolRefType; // NOLINT
31using mlir::tf_type::Complex128RefType; // NOLINT
32using mlir::tf_type::Complex64RefType; // NOLINT
33using mlir::tf_type::ControlType; // NOLINT
34using mlir::tf_type::DoubleRefType; // NOLINT
35using mlir::tf_type::FloatRefType; // NOLINT
36using mlir::tf_type::FuncAttr; // NOLINT
37using mlir::tf_type::HalfRefType; // NOLINT
38using mlir::tf_type::Int16RefType; // NOLINT
39using mlir::tf_type::Int32RefType; // NOLINT
40using mlir::tf_type::Int64RefType; // NOLINT
41using mlir::tf_type::Int8RefType; // NOLINT
42using mlir::tf_type::OpaqueTensorType; // NOLINT
43using mlir::tf_type::PlaceholderAttr; // NOLINT
44using mlir::tf_type::Qint16RefType; // NOLINT
45using mlir::tf_type::Qint16Type; // NOLINT
46using mlir::tf_type::Qint32RefType; // NOLINT
47using mlir::tf_type::Qint32Type; // NOLINT
48using mlir::tf_type::Qint8RefType; // NOLINT
49using mlir::tf_type::Qint8Type; // NOLINT
50using mlir::tf_type::Quint16RefType; // NOLINT
51using mlir::tf_type::Quint16Type; // NOLINT
52using mlir::tf_type::Quint8RefType; // NOLINT
53using mlir::tf_type::Quint8Type; // NOLINT
54using mlir::tf_type::ResourceRefType; // NOLINT
55using mlir::tf_type::ResourceType; // NOLINT
56using mlir::tf_type::ShapeAttr; // NOLINT
57using mlir::tf_type::StringRefType; // NOLINT
58using mlir::tf_type::StringType; // NOLINT
59using mlir::tf_type::Uint16RefType; // NOLINT
60using mlir::tf_type::Uint32RefType; // NOLINT
61using mlir::tf_type::Uint64RefType; // NOLINT
62using mlir::tf_type::Uint8RefType; // NOLINT
63using mlir::tf_type::VariantRefType; // NOLINT
64using mlir::tf_type::VariantType; // NOLINT
65using mlir::tf_type::VersionAttr; // NOLINT
66
67class TFGraphOpAsmInterface;
68class TFOp;
69} // namespace tfg
70} // namespace mlir
71
72// Dialect main class is defined in ODS, we include it here.
73#include "tensorflow/core/ir/dialect.h.inc"
74// ODS-generated attribute classes.
75#define GET_ATTRDEF_CLASSES
76#include "tensorflow/core/ir/attributes.h.inc"
77
78#endif // TENSORFLOW_CORE_IR_DIALECT_H_
79