From 9fd2e39518f637bbcee603ea2d3ccb0e9336d485 Mon Sep 17 00:00:00 2001 From: Gunhan Gulsoy Date: Tue, 14 Jul 2020 11:24:45 -0700 Subject: [PATCH] Internal protobuf refactoring PiperOrigin-RevId: 321197814 Change-Id: If6023874e67199f9d66b6380a73838da16837005 --- tensorflow/compiler/xla/tools/hlo_module_loader.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tensorflow/compiler/xla/tools/hlo_module_loader.cc b/tensorflow/compiler/xla/tools/hlo_module_loader.cc index b3aaba7fa25..8b70b0d35a7 100644 --- a/tensorflow/compiler/xla/tools/hlo_module_loader.cc +++ b/tensorflow/compiler/xla/tools/hlo_module_loader.cc @@ -21,7 +21,6 @@ limitations under the License. #include #include -#include "google/protobuf/text_format.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" #include "absl/strings/str_split.h" @@ -32,6 +31,7 @@ limitations under the License. #include "tensorflow/core/lib/io/path.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/logging.h" +#include "tensorflow/core/platform/protobuf.h" #include "tensorflow/core/platform/regexp.h" namespace xla { @@ -87,9 +87,10 @@ StatusOr> LoadModuleFromData( return InvalidArgument("Failed to parse input as HLO protobuf binary"); } } else if (format == "pbtxt") { - if (!google::protobuf::TextFormat::ParseFromString(data, &proto) && - !google::protobuf::TextFormat::ParseFromString(data, proto.mutable_hlo()) && - !google::protobuf::TextFormat::ParseFromString( + if (!tensorflow::protobuf::TextFormat::ParseFromString(data, &proto) && + !tensorflow::protobuf::TextFormat::ParseFromString( + data, proto.mutable_hlo()) && + !tensorflow::protobuf::TextFormat::ParseFromString( data, proto.mutable_hlo()->mutable_hlo_module())) { return InvalidArgument("Failed to parse input as HLO protobuf text"); }