diff options
Diffstat (limited to 'tensorflow/core/common_runtime/executor.cc')
-rw-r--r-- | tensorflow/core/common_runtime/executor.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tensorflow/core/common_runtime/executor.cc b/tensorflow/core/common_runtime/executor.cc index 40ec1502da..eb69d1991c 100644 --- a/tensorflow/core/common_runtime/executor.cc +++ b/tensorflow/core/common_runtime/executor.cc @@ -1771,14 +1771,18 @@ void ExecutorState::Process(TaggedNode tagged_node, int64 scheduled_nsec) { // The OpKernel may create child activities (such as GPU kernel // launches), so use a `ScopedAnnotation` to relate these activities // in the trace. - tracing::ScopedAnnotation activity(op_name, - op_kernel->type_string()); + tracing::ScopedAnnotation activity( + op_name, strings::StrCat(op_kernel->type_string(), + "#id=", step_id_, "#")); device->Compute(op_kernel, &ctx); } else { // Use the cheaper `ScopedActivity` to trace just the OpKernel // execution. - tracing::ScopedActivity activity(op_name, op_kernel->type_string(), - item.kernel_is_expensive); + tracing::ScopedActivity activity( + op_name, + strings::StrCat(op_kernel->type_string(), "#id=", step_id_, + "#"), + item.kernel_is_expensive); device->Compute(op_kernel, &ctx); } } else { |