From 4c254c42cb786d62a27b66a8420e153321558536 Mon Sep 17 00:00:00 2001 From: Xiao Yu Date: Wed, 3 Apr 2019 16:42:13 -0700 Subject: [PATCH] Fix the issue that profiler raises UTF8 issue when serializing profile result. PiperOrigin-RevId: 241831776 --- tensorflow/core/platform/default/device_tracer.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tensorflow/core/platform/default/device_tracer.cc b/tensorflow/core/platform/default/device_tracer.cc index 340d2d93720..f36590547ed 100644 --- a/tensorflow/core/platform/default/device_tracer.cc +++ b/tensorflow/core/platform/default/device_tracer.cc @@ -600,10 +600,8 @@ class CudaEventCollector { auto elapsed_us = GetElasedTimeUs(record.start_event, record.stop_event); auto stats = absl::make_unique(); - std::string node_name = record.kernel_name; - if (record.annotation) { - node_name = absl::StrCat(*record.annotation, "::", node_name); - } + std::string node_name = + record.annotation ? *record.annotation : record.kernel_name; stats->set_node_name(node_name); // TODO(csigg): Report grid size? std::string node_label;