From 5f5340ca3e373ea9306923025aeb0a99f1ca7b92 Mon Sep 17 00:00:00 2001 From: Xiao Yu Date: Mon, 13 May 2019 14:18:24 -0700 Subject: [PATCH] Trace scheduling activities when using CPU-ONLY profiler PiperOrigin-RevId: 248008551 --- tensorflow/core/common_runtime/executor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow/core/common_runtime/executor.cc b/tensorflow/core/common_runtime/executor.cc index d2e599b04c1..e3a1796dd7a 100644 --- a/tensorflow/core/common_runtime/executor.cc +++ b/tensorflow/core/common_runtime/executor.cc @@ -1603,8 +1603,8 @@ bool MightTrace(const NodeItem& item, } auto* trace_collector = tracing::GetTraceCollector(); if (trace_collector) { - if (using_annotations) { - return trace_collector->IsEnabledForAnnotations(); + if (using_annotations && trace_collector->IsEnabledForAnnotations()) { + return true; } } return profiler::TraceMeRecorder::Active(