Browse Source

Adaptive GPU timestamp unit

tags/v1.1.0
zhangyihui 5 years ago
parent
commit
a9abf99150
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      mindinsight/profiler/analyser/minddata_analyser.py

+ 3
- 0
mindinsight/profiler/analyser/minddata_analyser.py View File

@@ -68,6 +68,9 @@ class MinddataAnalyser(BaseAnalyser):
empty_step_count += 1 empty_step_count += 1
if len(node_info) > 2 and info_type in ["all", "time"]: if len(node_info) > 2 and info_type in ["all", "time"]:
one_step_cost_time = (float(node_info[2]) - float(node_info[1]))/1e3 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) time_list.append(one_step_cost_time)
total_cost += one_step_cost_time total_cost += one_step_cost_time
if info_type in ["all", "queue"]: if info_type in ["all", "queue"]:


Loading…
Cancel
Save