From e5c80e5f49afa259a409fc9ed58ec51035b4b7f2 Mon Sep 17 00:00:00 2001 From: harshvardhangupta Date: Mon, 28 Mar 2022 11:59:02 -0400 Subject: [PATCH] Display NA when workers=0 --- mindspore/ccsrc/minddata/dataset/engine/perf/auto_tune.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mindspore/ccsrc/minddata/dataset/engine/perf/auto_tune.cc b/mindspore/ccsrc/minddata/dataset/engine/perf/auto_tune.cc index 073269036dc..57ea58aa6b8 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/perf/auto_tune.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/perf/auto_tune.cc @@ -153,8 +153,8 @@ Status AutoTune::SummarizeTreeConfiguration(std::vector *out) { if (!op->inlined() && op->Name() != "DeviceQueueOp") { std::stringstream s; s << std::left << std::setw(op_name_width) << op->NameWithID() << "(num_parallel_workers:" << std::right - << std::setw(val_width) << op->NumWorkers() << ", prefetch_size:" << std::setw(val_width) - << op->ConnectorCapacity() << ")"; + << std::setw(val_width) << (op->NumWorkers() == 0 ? "NA" : std::to_string(op->NumWorkers())) + << ", prefetch_size:" << std::setw(val_width) << op->ConnectorCapacity() << ")"; (void)out->emplace_back(s.str()); } }