Migrate from std::string to tensorflow::tstring.

Note that during the transition period tstring is typedef'ed to std::string.

This is a part of a larger migration effort for tensorflow::tstring.
See: https://github.com/tensorflow/community/pull/91
PiperOrigin-RevId: 284138845
Change-Id: Ia478fde1a34804b54aca402e336e60cd75744852
This commit is contained in:
Dero Gharibian 2019-12-06 01:08:33 -08:00 committed by TensorFlower Gardener
parent 60b8dcfee1
commit f62a214c22

View File

@ -346,10 +346,10 @@ StatusOr<std::vector<HloSnapshot>> ParseRecordIoFile(absl::string_view filename,
std::vector<HloSnapshot> snapshots;
uint64 offset = 0;
string record;
tensorflow::tstring record;
while (reader.ReadRecord(&offset, &record).ok()) {
HloSnapshot snapshot;
if (snapshot.mutable_hlo()->ParseFromString(record)) {
if (snapshot.mutable_hlo()->ParseFromStringPiece(record)) {
snapshots.push_back(std::move(snapshot));
} else {
LOG(ERROR) << "Encountered bad proto";