message: [tpu:profiler] Do not generate output files from other cloud tools if no trace is collected.
diff: @@ -149,8 +149,10 @@ Status WriteTensorboardTPUProfile(const string& logdir, const string& run,
  // Dumps profile data to <logdir>/plugins/profile/<run>/.
  string profile_run_dir = JoinPath(logdir, kProfilePluginDirectory, run);
  TF_RETURN_IF_ERROR(Env::Default()->RecursivelyCreateDir(profile_run_dir));
  +
  // Ignore computation_graph for now.
  - if (response.encoded_trace().empty()) {
  + const bool empty_trace = response.encoded_trace().empty();
  + if (empty_trace) {
  *os << "No trace event is collected." << std::endl;
  } else {
  LOG(INFO) << "Converting trace events to TraceViewer JSON.";
  @@ -163,7 +165,7 @@ Status WriteTensorboardTPUProfile(const string& logdir, const string& run,
  TF_RETURN_IF_ERROR(DumpOpProfileToLogDirectory(profile_run_dir,
  response.op_profile(), os));
  }
  - if (!response.tool_data().empty()) {
  + if (!empty_trace && !response.tool_data().empty()) {
  for (const auto& tool_data : response.tool_data()) {
  TF_RETURN_IF_ERROR(
  DumpToolDataToLogDirectory(profile_run_dir, tool_data, os));
  