Skip to content

Commit

Permalink
Switch to using bytes field for CoreDetails instead of string.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 712977029
  • Loading branch information
bmass02 authored and tensorflower-gardener committed Jan 7, 2025
1 parent 4de05bd commit ba2ddb9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tensorflow/core/profiler/convert/xplane_to_op_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,12 @@ OpStats ConvertXSpaceToOpStats(const XSpace& space,
auto stat = visitor.GetStat(StatType::kCoreDetails);
if (stat.has_value()) {
CoreDetails core_details;
// TODO: Switch to StrOrRefValue once protobuf version is updated.
core_details.ParseFromString(stat->ToString());
core_details.set_hostname(hostname);
core_id_to_details[device_plane->id()] = core_details;
absl::string_view core_details_bytes = stat->BytesValue();
if (core_details.ParseFromArray(core_details_bytes.data(),
core_details_bytes.size())) {
core_details.set_hostname(hostname);
core_id_to_details[device_plane->id()] = core_details;
}
}
}
}
Expand Down

0 comments on commit ba2ddb9

Please sign in to comment.