Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 610317656
  • Loading branch information
tensorflower-gardener committed Feb 26, 2024
1 parent 91887cf commit a2b92da
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions tensorflow/core/tfrt/utils/graph_partition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ Status PrepareSubgraphForFunctionConversion(

// Converts the subgraph to a function, and builds a PartitionedCallOp
// to invoke the function.
StatusOr<Node*> BuildPartitionedCallOp(
absl::StatusOr<Node*> BuildPartitionedCallOp(
const std::string& func_name, const Device* host_device,
const std::string& device,
const absl::flat_hash_map<std::string, NodeInfo>& input_nodes,
Expand Down Expand Up @@ -293,7 +293,7 @@ StatusOr<Node*> BuildPartitionedCallOp(

// Builds a StatefulPartitionedCallOp, and connects all PartitionedCallOps to
// it. This StatefulPartitionedCallOp behaves as a stateful IdentityN.
StatusOr<Node*> BuildStatefulPartitionedCallOp(
absl::StatusOr<Node*> BuildStatefulPartitionedCallOp(
absl::flat_hash_map<std::string, CallNodeInputInfo>& call_node_input_info,
const absl::flat_hash_map<std::string, Node*>& all_partitioned_call_ops,
const std::string& stateful_call_func_name, const Device* host_device,
Expand Down Expand Up @@ -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<std::unique_ptr<Graph>> InsertTransferOps(
absl::StatusOr<std::unique_ptr<Graph>> InsertTransferOps(
const std::string& graph_func_name, const DeviceSet& device_set,
const Device* host_device, const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs,
Expand Down
12 changes: 6 additions & 6 deletions tensorflow/core/tfrt/utils/tfrt_graph_execution_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ absl::flat_hash_set<std::string> FindFunctionsToOptimize(

// Preprocesses `graph_def`, returns the functions to optimize if
// `run_placer_grappler_on_functions` is true.
StatusOr<absl::flat_hash_set<std::string>> PreprocessGraph(
absl::StatusOr<absl::flat_hash_set<std::string>> PreprocessGraph(
tensorflow::GraphDef& graph_def, bool run_placer_grappler_on_functions) {
if (VLOG_IS_ON(1)) {
DumpGraphDefToFile("before_generate_resource_shared_name_graph_def",
Expand All @@ -119,7 +119,7 @@ StatusOr<absl::flat_hash_set<std::string>> PreprocessGraph(

} // namespace

StatusOr<std::unique_ptr<TfrtGraphExecutionState>>
absl::StatusOr<std::unique_ptr<TfrtGraphExecutionState>>
TfrtGraphExecutionState::Create(const TfrtGraphExecutionState::Options& options,
tensorflow::GraphDef graph_def,
const FallbackState& fallback_state) {
Expand Down Expand Up @@ -172,7 +172,7 @@ tensorflow::GraphDef CreateGraphDefFromGraphAndFlibDef(
}

// Creates a pruned graph from `graph_def` according to `callable_options`.
StatusOr<std::unique_ptr<tensorflow::Graph>> CreatePrunedGraph(
absl::StatusOr<std::unique_ptr<tensorflow::Graph>> CreatePrunedGraph(
tensorflow::GraphDef graph_def, const CallableOptions& callable_options) {
// clang-tidy off
VLOG(1) << "Creating pruned graph: " << callable_options.DebugString();
Expand Down Expand Up @@ -228,7 +228,7 @@ NodeDef CreateNewIdentityNode(const NodeDef& node,

} // namespace

StatusOr<TfrtGraphExecutionState::OptimizationResult>
absl::StatusOr<TfrtGraphExecutionState::OptimizationResult>
TfrtGraphExecutionState::CreateOptimizedGraph(
tensorflow::GraphImportConfig& graph_import_config) {
OptimizationResult result;
Expand Down Expand Up @@ -314,7 +314,7 @@ Status TfrtGraphExecutionState::Extend(const GraphDef& graph) {
namespace {

// Given an "Exit" node, finds its corresponding "LoopCond" node.
StatusOr<const NodeDef*> FindLoopCondFromExitNode(
absl::StatusOr<const NodeDef*> FindLoopCondFromExitNode(
const NodeDef& exit_node,
const absl::flat_hash_map<std::string, NodeDef*>& name_to_node) {
const NodeDef* switch_node = nullptr;
Expand Down Expand Up @@ -648,7 +648,7 @@ Status OptimizeFunctions(

} // namespace

StatusOr<std::unique_ptr<tensorflow::Graph>>
absl::StatusOr<std::unique_ptr<tensorflow::Graph>>
TfrtGraphExecutionState::OptimizeGraph(
const tensorflow::Graph& graph,
const tensorflow::BuildGraphOptions& build_graph_options) {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/tfrt/utils/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void CreateDummyTfDevices(
}
}

StatusOr<RCReference<tfrt::BEFFile>> CreateBefFileFromBefBuffer(
absl::StatusOr<RCReference<tfrt::BEFFile>> CreateBefFileFromBefBuffer(
const tensorflow::tfrt_stub::Runtime& runtime, const tfrt::BefBuffer& bef) {
auto* core_runtime = runtime.core_runtime();
DCHECK(core_runtime);
Expand Down
6 changes: 3 additions & 3 deletions tensorflow/core/tfrt/utils/utils_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ TEST(UtilsTest, AssignOrReturnInImport) {
auto status = []() {
ASSIGN_OR_RETURN_IN_IMPORT(
[[maybe_unused]] auto unused_value,
tensorflow::StatusOr<int>(
absl::StatusOr<int>(
tensorflow::errors::CancelledWithPayloads("msg", {{"a", "b"}})));
return tensorflow::OkStatus();
}();
Expand All @@ -113,7 +113,7 @@ TEST(UtilsTest, AssignOrReturnInCompile) {
auto status = []() {
ASSIGN_OR_RETURN_IN_COMPILE(
[[maybe_unused]] auto unused_value,
tensorflow::StatusOr<int>(
absl::StatusOr<int>(
tensorflow::errors::CancelledWithPayloads("msg", {{"a", "b"}})));
return tensorflow::OkStatus();
}();
Expand All @@ -128,7 +128,7 @@ TEST(UtilsTest, AssignOrReturnInInit) {
auto status = []() {
ASSIGN_OR_RETURN_IN_INIT(
[[maybe_unused]] auto unused_value,
tensorflow::StatusOr<int>(
absl::StatusOr<int>(
tensorflow::errors::CancelledWithPayloads("msg", {{"a", "b"}})));
return tensorflow::OkStatus();
}();
Expand Down

0 comments on commit a2b92da

Please sign in to comment.