• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright 2021 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 #include "tensorflow/compiler/mlir/tfrt/jit/opdefs/tf_cpurt_ops.h"
17 
18 #include "mlir/IR/Builders.h"
19 #include "mlir/IR/BuiltinOps.h"
20 #include "mlir/IR/OpDefinition.h"
21 #include "mlir/IR/OpImplementation.h"
22 #include "mlir/IR/OperationSupport.h"
23 #include "mlir/IR/TypeUtilities.h"
24 #include "tfrt/basic_kernels/opdefs/types.h"  // from @tf_runtime
25 
26 namespace mlir {
27 namespace tf_cpurt {
28 
29 //===----------------------------------------------------------------------===//
30 // CpuRuntimeDialect Dialect
31 //===----------------------------------------------------------------------===//
32 
CpuRuntimeDialect(mlir::MLIRContext * context)33 CpuRuntimeDialect::CpuRuntimeDialect(mlir::MLIRContext *context)
34     : Dialect(/*name*/ "tf_cpurt", context,
35               mlir::TypeID::get<CpuRuntimeDialect>()) {
36   addOperations<
37 #define GET_OP_LIST
38 #include "tensorflow/compiler/mlir/tfrt/tf_cpurt_ops.cc.inc"
39       >();
40 }
41 
42 }  // namespace tf_cpurt
43 }  // end namespace mlir
44 
45 #define GET_OP_CLASSES
46 #include "tensorflow/compiler/mlir/tfrt/tf_cpurt_ops.cc.inc"
47