saved_model_util.cc
imports tensorflow/core/platform/status.himports tensorflow/core/platform/tstring.h
SHA-256d4ad302b386d897d52862c9c3564184809e3d63233746379baf517889047106c
MaleculeMd(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/core/tfrt/saved_model/saved_model_util.h"
17
18#include <algorithm>
19#include <cstdint>
20#include <iterator>
21#include <optional>
22#include <string>
23#include <unordered_set>
24#include <utility>
25#include <vector>
26
27#include "absl/container/flat_hash_map.h"
28#include "absl/log/check.h"
29#include "absl/log/log.h"
30#include "absl/status/status.h"
31#include "absl/strings/string_view.h"
32#include "absl/time/clock.h"
33#include "absl/time/time.h"
34#include "absl/types/span.h"
35#include "llvm/ADT/ArrayRef.h"
36#include "llvm/ADT/STLExtras.h"
37#include "llvm/ADT/StringRef.h"
38#include "llvm/Support/Casting.h"
39#include "mlir/IR/BuiltinOps.h" // from @llvm-project
40#include "mlir/IR/MLIRContext.h" // from @llvm-project
41#include "mlir/IR/OwningOpRef.h" // from @llvm-project
42#include "tensorflow/cc/saved_model/reader.h"
43#include "tensorflow/compiler/mlir/tensorflow/ir/tf_saved_model.h"
44#include "tensorflow/compiler/mlir/tensorflow/translate/import_model.h"
45#include "tensorflow/compiler/mlir/tensorflow/utils/deserialize_mlir_module_utils.h"
46#include "tensorflow/compiler/mlir/tfrt/ir/tfrt_fallback.h"
47#include "tensorflow/compiler/mlir/tfrt/ir/tfrt_fallback_async.h"
48#include "tensorflow/compiler/mlir/tfrt/saved_model/saved_model.h"
49#include "tensorflow/compiler/mlir/tfrt/transforms/gpu_passes.h"
50#include "tensorflow/compiler/mlir/tfrt/translate/import_model.h"
51#include "tensorflow/compiler/mlir/tfrt/translate/tfrt_compile_options.h"
52#include "tensorflow/core/framework/tensor.h"
53#include "tensorflow/core/framework/types.h"
54#include "tensorflow/core/lib/monitoring/gauge.h"
55#include "tensorflow/core/platform/status.h"
56#include "tensorflow/core/platform/tstring.h"
57#include "tensorflow/core/protobuf/meta_graph.pb.h"
58#include "tensorflow/core/protobuf/rewriter_config.pb.h"
135:50… y. We pass their filenames to
136 // functions so that they can be used.
137 if (auto asset = llvm::dyn_cast<mlir::tf_saved_model::AssetOp>(bound_input) …