From a2b92da779da3123e1c6f121b0022e9e1ab968a6 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Mon, 26 Feb 2024 00:36:01 -0800 Subject: [PATCH] Automated Code Change PiperOrigin-RevId: 610317656 --- tensorflow/core/tfrt/utils/graph_partition.cc | 6 +++--- .../core/tfrt/utils/tfrt_graph_execution_state.cc | 12 ++++++------ tensorflow/core/tfrt/utils/utils.cc | 2 +- tensorflow/core/tfrt/utils/utils_test.cc | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tensorflow/core/tfrt/utils/graph_partition.cc b/tensorflow/core/tfrt/utils/graph_partition.cc index e336ce96399b58..ca34d6fc7a852b 100644 --- a/tensorflow/core/tfrt/utils/graph_partition.cc +++ b/tensorflow/core/tfrt/utils/graph_partition.cc @@ -213,7 +213,7 @@ Status PrepareSubgraphForFunctionConversion( // Converts the subgraph to a function, and builds a PartitionedCallOp // to invoke the function. -StatusOr BuildPartitionedCallOp( +absl::StatusOr BuildPartitionedCallOp( const std::string& func_name, const Device* host_device, const std::string& device, const absl::flat_hash_map& input_nodes, @@ -293,7 +293,7 @@ StatusOr BuildPartitionedCallOp( // Builds a StatefulPartitionedCallOp, and connects all PartitionedCallOps to // it. This StatefulPartitionedCallOp behaves as a stateful IdentityN. -StatusOr BuildStatefulPartitionedCallOp( +absl::StatusOr BuildStatefulPartitionedCallOp( absl::flat_hash_map& call_node_input_info, const absl::flat_hash_map& all_partitioned_call_ops, const std::string& stateful_call_func_name, const Device* host_device, @@ -419,7 +419,7 @@ std::string GetNameFromDevice(const std::string& device) { // passes. // 4. Create output nodes and control output nodes to match the original graph's // nodes. -StatusOr> InsertTransferOps( +absl::StatusOr> InsertTransferOps( const std::string& graph_func_name, const DeviceSet& device_set, const Device* host_device, const std::vector& inputs, const std::vector& outputs, diff --git a/tensorflow/core/tfrt/utils/tfrt_graph_execution_state.cc b/tensorflow/core/tfrt/utils/tfrt_graph_execution_state.cc index 0c1b9624a1677a..ba9473c25b93fa 100644 --- a/tensorflow/core/tfrt/utils/tfrt_graph_execution_state.cc +++ b/tensorflow/core/tfrt/utils/tfrt_graph_execution_state.cc @@ -96,7 +96,7 @@ absl::flat_hash_set FindFunctionsToOptimize( // Preprocesses `graph_def`, returns the functions to optimize if // `run_placer_grappler_on_functions` is true. -StatusOr> PreprocessGraph( +absl::StatusOr> PreprocessGraph( tensorflow::GraphDef& graph_def, bool run_placer_grappler_on_functions) { if (VLOG_IS_ON(1)) { DumpGraphDefToFile("before_generate_resource_shared_name_graph_def", @@ -119,7 +119,7 @@ StatusOr> PreprocessGraph( } // namespace -StatusOr> +absl::StatusOr> TfrtGraphExecutionState::Create(const TfrtGraphExecutionState::Options& options, tensorflow::GraphDef graph_def, const FallbackState& fallback_state) { @@ -172,7 +172,7 @@ tensorflow::GraphDef CreateGraphDefFromGraphAndFlibDef( } // Creates a pruned graph from `graph_def` according to `callable_options`. -StatusOr> CreatePrunedGraph( +absl::StatusOr> CreatePrunedGraph( tensorflow::GraphDef graph_def, const CallableOptions& callable_options) { // clang-tidy off VLOG(1) << "Creating pruned graph: " << callable_options.DebugString(); @@ -228,7 +228,7 @@ NodeDef CreateNewIdentityNode(const NodeDef& node, } // namespace -StatusOr +absl::StatusOr TfrtGraphExecutionState::CreateOptimizedGraph( tensorflow::GraphImportConfig& graph_import_config) { OptimizationResult result; @@ -314,7 +314,7 @@ Status TfrtGraphExecutionState::Extend(const GraphDef& graph) { namespace { // Given an "Exit" node, finds its corresponding "LoopCond" node. -StatusOr FindLoopCondFromExitNode( +absl::StatusOr FindLoopCondFromExitNode( const NodeDef& exit_node, const absl::flat_hash_map& name_to_node) { const NodeDef* switch_node = nullptr; @@ -648,7 +648,7 @@ Status OptimizeFunctions( } // namespace -StatusOr> +absl::StatusOr> TfrtGraphExecutionState::OptimizeGraph( const tensorflow::Graph& graph, const tensorflow::BuildGraphOptions& build_graph_options) { diff --git a/tensorflow/core/tfrt/utils/utils.cc b/tensorflow/core/tfrt/utils/utils.cc index c2cca0bb4317f5..7af270d7faf1a2 100644 --- a/tensorflow/core/tfrt/utils/utils.cc +++ b/tensorflow/core/tfrt/utils/utils.cc @@ -100,7 +100,7 @@ void CreateDummyTfDevices( } } -StatusOr> CreateBefFileFromBefBuffer( +absl::StatusOr> CreateBefFileFromBefBuffer( const tensorflow::tfrt_stub::Runtime& runtime, const tfrt::BefBuffer& bef) { auto* core_runtime = runtime.core_runtime(); DCHECK(core_runtime); diff --git a/tensorflow/core/tfrt/utils/utils_test.cc b/tensorflow/core/tfrt/utils/utils_test.cc index bf609269d98097..b2199bdb2f68bc 100644 --- a/tensorflow/core/tfrt/utils/utils_test.cc +++ b/tensorflow/core/tfrt/utils/utils_test.cc @@ -99,7 +99,7 @@ TEST(UtilsTest, AssignOrReturnInImport) { auto status = []() { ASSIGN_OR_RETURN_IN_IMPORT( [[maybe_unused]] auto unused_value, - tensorflow::StatusOr( + absl::StatusOr( tensorflow::errors::CancelledWithPayloads("msg", {{"a", "b"}}))); return tensorflow::OkStatus(); }(); @@ -113,7 +113,7 @@ TEST(UtilsTest, AssignOrReturnInCompile) { auto status = []() { ASSIGN_OR_RETURN_IN_COMPILE( [[maybe_unused]] auto unused_value, - tensorflow::StatusOr( + absl::StatusOr( tensorflow::errors::CancelledWithPayloads("msg", {{"a", "b"}}))); return tensorflow::OkStatus(); }(); @@ -128,7 +128,7 @@ TEST(UtilsTest, AssignOrReturnInInit) { auto status = []() { ASSIGN_OR_RETURN_IN_INIT( [[maybe_unused]] auto unused_value, - tensorflow::StatusOr( + absl::StatusOr( tensorflow::errors::CancelledWithPayloads("msg", {{"a", "b"}}))); return tensorflow::OkStatus(); }();