From 1e9c904dc944a09e6480323635d83f6415bb0c90 Mon Sep 17 00:00:00 2001 From: zhangyihui Date: Mon, 14 Sep 2020 21:51:03 +0800 Subject: [PATCH] fix the problem: sometimes profile for 1 card can not generate by run 8p train with profiler --- mindspore/profiler/profiling.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mindspore/profiler/profiling.py b/mindspore/profiler/profiling.py index 44351a73909..273a61a4d57 100644 --- a/mindspore/profiler/profiling.py +++ b/mindspore/profiler/profiling.py @@ -308,16 +308,17 @@ class Profiler: if not item_dict: logger.error("Profiling: job path %s, fail to get job start info.", path) continue - if self._start_time > int(item_dict["start_time"]): - logger.info("Profiling: job path %s, start_time %s, training start_time %d.", - path, item_dict["start_time"], self._start_time) - break if self._dev_id != item_dict["device_id"]: logger.info("Profiling: job path %s, dev id %s, training device id %s.", path, item_dict["device_id"], self._dev_id) continue + if self._start_time > int(item_dict["start_time"]): + logger.info("Profiling: job path %s, start_time %s, training start_time %d.", + path, item_dict["start_time"], self._start_time) + break + job_id = item.strip() break