From a9abf9915006b439c8dcad5a7000a8b886e3d222 Mon Sep 17 00:00:00 2001 From: zhangyihui Date: Sat, 24 Oct 2020 16:08:30 +0800 Subject: [PATCH] Adaptive GPU timestamp unit --- mindinsight/profiler/analyser/minddata_analyser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mindinsight/profiler/analyser/minddata_analyser.py b/mindinsight/profiler/analyser/minddata_analyser.py index 70a9d20a..5ba85448 100644 --- a/mindinsight/profiler/analyser/minddata_analyser.py +++ b/mindinsight/profiler/analyser/minddata_analyser.py @@ -68,6 +68,9 @@ class MinddataAnalyser(BaseAnalyser): empty_step_count += 1 if len(node_info) > 2 and info_type in ["all", "time"]: one_step_cost_time = (float(node_info[2]) - float(node_info[1]))/1e3 + # The time stamp in Ascend is μs but in GPU is ns. + if 'minddata_getnext_profiling' in file_name: + one_step_cost_time = one_step_cost_time/1e3 time_list.append(one_step_cost_time) total_cost += one_step_cost_time if info_type in ["all", "queue"]: