Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 609306758
  • Loading branch information
tensorflower-gardener committed Feb 22, 2024
1 parent c9ca63d commit 44b338f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tensorflow/core/common_runtime/eval_const_tensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ std::optional<int64_t> GetSliceIndex(const Node& node, const int node_output) {
// `tf.unstack(tf.shape(tensor))[ix]`,
// and the result can be inferred from shape metadata, returns the result.
// Otherwise, returns null.
StatusOr<std::optional<Tensor>> TryInferFromShapes(
absl::StatusOr<std::optional<Tensor>> TryInferFromShapes(
const Node& node, const int node_output, const ShapeRefiner& refiner) {
std::optional<Tensor> result;
if (node.num_inputs() == 0 || node_output >= node.num_outputs()) {
Expand Down Expand Up @@ -252,7 +252,7 @@ std::string OutputName(const NodeOutput& output) {
// Assuming that the subgraph ending at `target_node` is constant-foldable,
// returns it along with all constant inputs necessary for evaluation.
// Otherwise, returns null.
StatusOr<std::unique_ptr<Subgraph>> ExtractConstantSubgraph(
absl::StatusOr<std::unique_ptr<Subgraph>> ExtractConstantSubgraph(
const Node& target_node, const ShapeRefiner& refiner,
const absl::FunctionRef<std::optional<Tensor>(const Node&, int)> lookup,
const OpRegistryInterface* op_registry, const int32_t graph_def_version) {
Expand Down Expand Up @@ -356,7 +356,7 @@ StatusOr<std::unique_ptr<Subgraph>> ExtractConstantSubgraph(

} // namespace

StatusOr<std::optional<Tensor>> EvaluateConstantTensor(
absl::StatusOr<std::optional<Tensor>> EvaluateConstantTensor(
const Node& node, const int node_output, const ShapeRefiner& refiner,
const absl::FunctionRef<std::optional<Tensor>(const Node&, int)> lookup,
const std::optional<EvaluateConstantTensorRunner> runner) {
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/common_runtime/eval_const_tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct EvaluateConstantTensorRunner {
//
// When the evaluation is successful, the function returns a tensor, otherwise
// it returns std::nullopt.
StatusOr<std::optional<Tensor>> EvaluateConstantTensor(
absl::StatusOr<std::optional<Tensor>> EvaluateConstantTensor(
// The tensor to be evaluated.
const Node& node, int node_output,
// Used to fetch inference contexts for nodes in the graph.
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/common_runtime/eval_const_tensor_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class EvaluateConstantTensorTest : public ::testing::Test {
return *this;
}

StatusOr<std::optional<Tensor>> Run(const Output& output) {
absl::StatusOr<std::optional<Tensor>> Run(const Output& output) {
TF_RETURN_IF_ERROR(scope_.status());
const auto& graph = *scope_.graph();
ShapeRefiner refiner(graph.versions(), graph.op_registry());
Expand Down

0 comments on commit 44b338f

Please sign in to comment.