tf_dialect_to_executor.cc
imports tensorflow/core/platform/error_payloads.himports tensorflow/core/platform/status.h
SHA-256eafe4c2cc0cfec47cb8fb1a4e21d4d5fad219c0a608ce39dc74ccda90fae4ae4
MaleculeH(Db)Md(In₄)
Evidence
1/* Copyright 2023 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 …
11:42… IND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15
16#include "tensorflow/compiler/mlir/tf2xla/api/v2/tf_dialect_to_executor.h"
17
18#include <memory>
19#include <string>
20
21#include "absl/log/log.h"
22#include "absl/status/status.h"
23#include "llvm/ADT/StringRef.h"
24#include "mlir/Dialect/Func/IR/FuncOps.h" // from @llvm-project
25#include "mlir/IR/BuiltinOps.h" // from @llvm-project
26#include "mlir/Pass/PassManager.h" // from @llvm-project
27#include "mlir/Pass/PassRegistry.h" // from @llvm-project
28#include "mlir/Support/LogicalResult.h" // from @llvm-project
29#include "mlir/Transforms/Passes.h" // from @llvm-project
30#include "tensorflow/compiler/jit/flags.h"
31#include "tensorflow/compiler/mlir/tensorflow/transforms/passes.h"
32#include "tensorflow/compiler/mlir/tensorflow/utils/data_dumper_logger_config.h"
33#include "tensorflow/compiler/mlir/tensorflow/utils/dump_mlir_util.h"
34#include "tensorflow/compiler/mlir/tf2xla/internal/logging_hooks.h"
35#include "xla/tsl/lib/monitoring/counter.h"
36#include "xla/tsl/platform/status.h"
37#include "tensorflow/core/platform/error_payloads.h"
38#include "tensorflow/core/platform/status.h"
39#include "tensorflow/core/util/debug_data_dumper.h"
40#include "tsl/platform/error_logging.h"
41
42namespace tensorflow {
⋯6 lines
54:53… alect to Executor Dialect "
55 "is",
56 "status");
57
58constexpr char kExportSuccess[] = "success";
59constexpr char kExportFailed[] = "failed";
60
61namespace {
62
63void AddTfDialectToExecutorPasses(OpPassManager &pm) {
64 pm.addPass(mlir::TF::CreateTFRegionControlF …