message: Tabularized the VLOGs printing per-op execution times to make it easier to see what ops take much time.
diff: @@ -30,6 +30,7 @@ limitations under the License.
  #include "tensorflow/core/lib/core/errors.h"
  #include "tensorflow/core/lib/strings/numbers.h"
  #include "tensorflow/core/lib/strings/str_util.h"
  +#include "tensorflow/core/lib/strings/stringprintf.h"
  #include "tensorflow/core/platform/logging.h"
  #include "tensorflow/core/util/device_name_utils.h"
  @@ -858,8 +859,9 @@ Costs VirtualScheduler::Summary() const {
  const auto& memory_cost = op_cost_pair.second.memory_time.count();
  const bool is_op_cost_accurate = !op_cost_pair.second.inaccurate;
  if (cost) { // Skip printing out zero-cost ops.
  - VLOG(1) << " + " << op << " : " << (is_op_cost_accurate ? "" : "~")
  - << cost << " / " << compute_cost << " / " << memory_cost;
  + VLOG(1) << strings::Printf(" + %30s : %c %10ld / %10ld / %10ld",
  + op.c_str(), (is_op_cost_accurate ? ' ' : '~'),
  + cost, compute_cost, memory_cost);
  }
  }
  @@ -934,9 +936,11 @@ Costs VirtualScheduler::Summary() const {
  : 0.0;
  if (cost || mem_usage_percent > 1.0) {
  // Print out only non-zero cost ops or ops with > 1% memory usage.
  - VLOG(1) << " + " << op << " : " << (is_op_cost_accurate ? "" : "~")
  - << cost << " / " << compute_cost << " / " << memory_cost << " ("
  - << strings::HumanReadableNumBytes(op_mem_usage) << " ["
  + VLOG(1) << strings::Printf(" + %30s : %c %10ld / %10ld / %10ld",
  + op.c_str(),
  + (is_op_cost_accurate ? ' ' : '~'), cost,
  + compute_cost, memory_cost)
  + << " (" << strings::HumanReadableNumBytes(op_mem_usage) << " ["
  << mem_usage_percent << "%] "
  << (persisent_ops.count(op) > 0 ? ": persistent op)" : ")");
  }
  