From 17b422ffc800218312a8760d5d45e32a76e9649c Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Thu, 11 Jun 2020 15:14:59 -0700 Subject: [PATCH] don't override display name even if it is empty, otherewise, it could use src->name as dst->display_name. PiperOrigin-RevId: 315987833 Change-Id: I1904f7f3698f2d7b0f9e8fbe4882c215208c9c95 --- tensorflow/core/profiler/utils/xplane_utils.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tensorflow/core/profiler/utils/xplane_utils.cc b/tensorflow/core/profiler/utils/xplane_utils.cc index ec9428cb4e4..6096d7188f3 100644 --- a/tensorflow/core/profiler/utils/xplane_utils.cc +++ b/tensorflow/core/profiler/utils/xplane_utils.cc @@ -239,9 +239,8 @@ void MergePlanes(const XPlane& src_plane, XPlane* dst_plane) { EnvTime::kNanosToPicos; } dst_line.SetNameIfEmpty(line.Name()); - if (!line.DisplayName().empty()) { - dst_line.SetDisplayNameIfEmpty(line.DisplayName()); - } + // Don't override dst_line's display name because if both lines have name, + // but no display name, line's name will became display name of dst_line. } line.ForEachEvent([&](const tensorflow::profiler::XEventVisitor& event) {