• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7     http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 
16 // This file defines the operations used in the TFFramework dialect.
17 //
18 #ifndef TENSORFLOW_COMPILER_MLIR_TOOLS_KERNEL_GEN_IR_TF_FRAMEWORK_OPS_H_
19 #define TENSORFLOW_COMPILER_MLIR_TOOLS_KERNEL_GEN_IR_TF_FRAMEWORK_OPS_H_
20 
21 #include "mlir/IR/Attributes.h"  // from @llvm-project
22 #include "mlir/IR/BuiltinTypes.h"  // from @llvm-project
23 #include "mlir/IR/Dialect.h"  // from @llvm-project
24 #include "mlir/IR/MLIRContext.h"  // from @llvm-project
25 #include "mlir/IR/OpDefinition.h"  // from @llvm-project
26 #include "mlir/IR/OpImplementation.h"  // from @llvm-project
27 #include "mlir/Interfaces/SideEffectInterfaces.h"  // from @llvm-project
28 #include "tensorflow/compiler/mlir/tools/kernel_gen/ir/tf_status.h.inc"
29 #include "tensorflow/core/protobuf/error_codes.pb.h"
30 
31 namespace mlir {
32 namespace kernel_gen {
33 namespace tf_framework {
34 
35 /// OpKernelContextType corresponds to C++ class OpKernelContext defined in
36 /// tensorflow/core/framework/op_kernel.h
37 class OpKernelContextType
38     : public Type::TypeBase<OpKernelContextType, Type, TypeStorage> {
39  public:
40   using Base::Base;
41 };
42 
43 ::tensorflow::error::Code ConvertAttrToEnumValue(ErrorCode error_code);
44 
45 }  // namespace tf_framework
46 }  // namespace kernel_gen
47 }  // namespace mlir
48 
49 #define GET_OP_CLASSES
50 #include "tensorflow/compiler/mlir/tools/kernel_gen/ir/tf_framework_dialect.h.inc"
51 #include "tensorflow/compiler/mlir/tools/kernel_gen/ir/tf_framework_ops.h.inc"
52 
53 #endif  // TENSORFLOW_COMPILER_MLIR_TOOLS_KERNEL_GEN_IR_TF_FRAMEWORK_OPS_H_
54