Trace scheduling activities when using CPU-ONLY profiler

PiperOrigin-RevId: 248008551
This commit is contained in:
Xiao Yu 2019-05-13 14:18:24 -07:00 committed by TensorFlower Gardener
parent 663e8479ce
commit 5f5340ca3e

View File

@ -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(