change the producer side to populate tf_op instead of level0 stats.

PiperOrigin-RevId: 339490720
Change-Id: Ie4c40746c1accbdd6fbe45746294ec314a814dec
diff --git a/tensorflow/core/profiler/internal/gpu/cupti_collector.cc b/tensorflow/core/profiler/internal/gpu/cupti_collector.cc
index e331ae5..bfdf5da 100644
--- a/tensorflow/core/profiler/internal/gpu/cupti_collector.cc
+++ b/tensorflow/core/profiler/internal/gpu/cupti_collector.cc
@@ -49,7 +49,7 @@
   if (event.stream_id != CuptiTracerEvent::kInvalidStreamId) {
     *line_id = event.stream_id;
     return false;
-  } else if (event.thread_id != CuptiTracerEvent::kInvalidStreamId &&
+  } else if (event.thread_id != CuptiTracerEvent::kInvalidThreadId &&
              event.thread_id != 0) {
     *line_id = event.thread_id;
     return true;
@@ -146,11 +146,9 @@
       }
     }
   }
-  // TODO(profiler): we should get rid of kLevel0, it is based on the assumption
-  // that those op-related ScopedAnnotation are at the very TOP level.
   if (!annotation_stack.empty()) {
     xevent.AddStatValue(
-        *plane->GetOrCreateStatMetadata(GetStatTypeStr(StatType::kLevel0)),
+        *plane->GetOrCreateStatMetadata(GetStatTypeStr(StatType::kTfOp)),
         *plane->GetOrCreateStatMetadata(annotation_stack.begin()->name));
   }
 }