From 674f7a5cbbf52ef6ca0aa13a3c50c6d795f54e8c Mon Sep 17 00:00:00 2001 From: gzhcv Date: Thu, 25 Mar 2021 20:17:40 +0800 Subject: [PATCH] Return empty step trace data to UI in heterogeneous training scene --- mindinsight/backend/profiler/profile_api.py | 6 ++++++ mindinsight/ui/src/locales/en-us.json | 2 +- mindinsight/ui/src/locales/zh-cn.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mindinsight/backend/profiler/profile_api.py b/mindinsight/backend/profiler/profile_api.py index bcd2f106..e0ffdbd5 100644 --- a/mindinsight/backend/profiler/profile_api.py +++ b/mindinsight/backend/profiler/profile_api.py @@ -156,6 +156,12 @@ def get_training_trace_graph(): }}) graph_info['summary'] = analyser.summary graph_info['point_info'] = analyser.point_info + + # In heterogeneous training scene, do not display step trace data. + cpu_op_type_file_name = f"cpu_op_type_info_{device_id}.csv" + if cpu_op_type_file_name in os.listdir(profiler_dir_abs): + graph_info = {} + return jsonify(graph_info) diff --git a/mindinsight/ui/src/locales/en-us.json b/mindinsight/ui/src/locales/en-us.json index 20a8d183..12476a72 100644 --- a/mindinsight/ui/src/locales/en-us.json +++ b/mindinsight/ui/src/locales/en-us.json @@ -388,7 +388,7 @@ "opNum": "Number of operators:", "opTimes": "Total operator execution times:", "features": "Functions:", - "iterationInfo": "The step trace displays the duration of each step from the start of the previous iteration to the end of the step. The main time is divided into three parts: step interval, forward and backward propagation, and step tail.", + "iterationInfo": "The step trace displays the duration of each step from the start of the previous iteration to the end of the step. The main time is divided into three parts: step interval, forward and backward propagation, and step tail.(Note that this feature do not support heterogeneous training scene)", "iterationGapInfo": "Reads data from data queues. If this part takes a long time, you are advised to check the data processing for further analysis.", "fpbpTitle": "Forward and Backward Propagation", "fpbpInfo": "Executes the forward and backward operators on the network, which carry the main calculation work of a step. If this part takes a long time, you are advised to check the operator statistics or timeline for further analysis.", diff --git a/mindinsight/ui/src/locales/zh-cn.json b/mindinsight/ui/src/locales/zh-cn.json index 7f817e7e..4cee219d 100644 --- a/mindinsight/ui/src/locales/zh-cn.json +++ b/mindinsight/ui/src/locales/zh-cn.json @@ -387,7 +387,7 @@ "opNum": "算子数目:", "opTimes": "算子执行总次数:", "features": "功能介绍:", - "iterationInfo": "迭代轨迹展示的是每个step从上个迭代开始至该step结束的耗时信息,主体时间分为3部分:迭代间隙、前向反向、迭代拖尾。", + "iterationInfo": "迭代轨迹展示的是每个step从上个迭代开始至该step结束的耗时信息,主体时间分为3部分:迭代间隙、前向反向、迭代拖尾。(该特性暂不支持异构训练场景)", "iterationGapInfo": "主要负责从数据队列中读取数据,如果该部分耗时较长,建议前往数据处理部分进一步分析;", "fpbpTitle": "前向反向", "fpbpInfo": "执行网络中的前向算子以及反向算子,承载了一个step主要的计算工作,如果该部分耗时较长,建议前往算子统计或时间线中进一步分析;",