diff --git a/mindinsight/ui/src/locales/en-us.json b/mindinsight/ui/src/locales/en-us.json index 428516552f79350dc888cde86e615f4559ce1991..b42c3ecbb2b714ba27990dafdcf8ca73384b3504 100644 --- a/mindinsight/ui/src/locales/en-us.json +++ b/mindinsight/ui/src/locales/en-us.json @@ -232,10 +232,10 @@ "card": " ", "searchByType": "Enter operator type", "searchByName": "Enter operator name", - "operatorInfo":"Operator", - "kernelInfo":"Kernel", - "searchByCoreName":"Enter kernel name", - "searchByCoreFullName":"Enter operator full name" + "operatorInfo": "Operator", + "kernelInfo": "Kernel", + "searchByCoreName": "Enter kernel name", + "searchByCoreFullName": "Enter operator full name" }, "profiling": { "profilingDashboard": "Profiling Dashboard", @@ -392,8 +392,10 @@ "content31": "You can analyze whether the flow tiling policy is proper and whether the step interval and tail time are too long based on the timeline information.", "content32": "You can also locate an operator and view and analyze its execution time." }, + "countUnit": "times", "unit": "ms/time", - "gpuunit": "us/time" + "gpuunit": "us/time", + "chartTitle": "Average Time Consumption Ranking" }, "hardwareVisual": { "processor": "Ascend AI Processor", @@ -449,7 +451,7 @@ "gridAccuracy": "Decimal places are reserved.", "inCorrectInput": "Invalid input.", "gridTableNoData": "No data in the table.", - "cache":"CACHING" + "cache": "CACHING" }, "error": { "50540000": "System error.", diff --git a/mindinsight/ui/src/locales/zh-cn.json b/mindinsight/ui/src/locales/zh-cn.json index 781389b059dfc8efbbd54690f7190c6a1e0236f9..20f054d6e662e0f94cdfd777f653507c47944e4d 100644 --- a/mindinsight/ui/src/locales/zh-cn.json +++ b/mindinsight/ui/src/locales/zh-cn.json @@ -391,8 +391,10 @@ "content31": "您可以通过时间线信息分析流切分方法是否合理、迭代间隙和拖尾时间是否过长等;", "content32": "也可以具体定位到某个算子,查看分析它的执行时间。" }, + "countUnit": "次", "unit": "ms/次", - "gpuunit": "us/次" + "gpuunit": "us/次", + "chartTitle": "平均耗时排行" }, "hardwareVisual": { "processor": "昇腾AI处理器", @@ -428,14 +430,14 @@ "availableFree": "芯片空闲", "availableBusy": "芯片已被占用或不可用", "failQueryChip": "芯片信息查询有误", - "name":"名称", - "npu":"编号", - "available":"是否空闲", - "health":"健康状态", - "ipAddress":"IP 地址", - "hbmUsage":"已用HBM内存(MB)", - "power":"功率(W)", - "temp":"温度(℃)" + "name": "名称", + "npu": "编号", + "available": "是否空闲", + "health": "健康状态", + "ipAddress": "IP 地址", + "hbmUsage": "已用HBM内存(MB)", + "power": "功率(W)", + "temp": "温度(℃)" }, "components": { "summaryTitle": "训练选择", @@ -448,7 +450,7 @@ "gridAccuracy": "保留小数位", "inCorrectInput": "无效输入", "gridTableNoData": "表格无数据", - "cache":"正在加载" + "cache": "正在加载" }, "error": { "50540000": "系统错误", diff --git a/mindinsight/ui/src/views/profiling-gpu/operator.vue b/mindinsight/ui/src/views/profiling-gpu/operator.vue index 36cd2953e64d11ec12b804b831af95cb1057473f..46153af0148c6b2672d29b839b3341ba690c8757 100644 --- a/mindinsight/ui/src/views/profiling-gpu/operator.vue +++ b/mindinsight/ui/src/views/profiling-gpu/operator.vue @@ -25,6 +25,7 @@ limitations under the License. :class="{fullScreen:fullScreen}" v-if="operatorCharts.data.length">
+
{{$t('profiling.chartTitle')}}
+ :min-width="(ele === 'op_type') ? 100 : (ele === 'op_name') ? + 120 : (ele === 'op_full_name') ? 150 : '' " + :show-overflow-tooltip="(ele === 'op_full_name'||ele === 'op_name' + ||ele==='op_type') ? false : true"> @@ -126,8 +128,8 @@ limitations under the License. sortable> @@ -144,13 +146,14 @@ limitations under the License. :property="item" :key="$index" :sortable="item === 'op_info' ? false : 'custom'" - show-overflow-tooltip> + :min-width="(item === 'op_type') ? 100 : (item === 'op_name') + ? 120 : (item === 'op_full_name') ? 150 : '' " + :show-overflow-tooltip="(item === 'op_full_name' || item === 'op_name' + || item === 'op_type') ? false : true"> @@ -180,6 +183,7 @@ limitations under the License. :class="{fullScreen:fullScreenKernel}" v-if="coreCharts.data.length">
+
{{$t('profiling.chartTitle')}}
+ :min-width="(item === 'type') ? 100 : (item === 'name' || item === 'op_full_name') + ? 150 : '' " + :show-overflow-tooltip="(item === 'op_full_name' || item === 'name' + ||item === 'type') ? false : true"> @@ -363,6 +368,29 @@ export default { this.$bus.$off('collapse'); }, methods: { + getHeaderField(key) { + const maps = { + total_time: 'total_time (us)', + avg_time: `avg_time (${this.$t('profiling.gpuunit')})`, + op_total_time: 'op_total_time (us)', + op_avg_time: `op_avg_time (${this.$t('profiling.gpuunit')})`, + max_duration: 'max_duration (us)', + min_duration: 'min_duration (us)', + avg_duration: 'avg_duration (us)', + total_duration: 'total_duration (us)', + proportion: 'total_time_proportion (%)', + cuda_activity_cost_time: 'cuda_activity_cost_time (us)', + cuda_activity_call_count: `cuda_activity_call_count (${this.$t( + 'profiling.countUnit', + )})`, + type_occurrences: `type_occurrences (${this.$t( + 'profiling.countUnit', + )})`, + op_occurrences: `op_occurrences (${this.$t('profiling.countUnit')})`, + occurrences: `occurrences (${this.$t('profiling.countUnit')})`, + }; + return maps[key] ? maps[key] : key; + }, resizeEchart() { if (this.operatorCharts.chartDom) { setTimeout(() => { @@ -400,7 +428,16 @@ export default { this.getCoreList(true); } }, - opTypeSortChange() { + /** + * Operators type sort + * @param {Object} sort Sort data + */ + opTypeSortChange(sort) { + this.op_sort_condition = { + name: sort.prop, + type: sort.order, + }; + this.$nextTick(() => { const item = this.$refs['expandChild']; if (item && this.curActiveRow.rowItem) { @@ -856,6 +893,8 @@ export default { setOption(chart) { const option = {}; const maxLabelLength = 20; + const maxTooltipLen = 50; + if (!chart.type) { option.legend = { data: [], @@ -871,17 +910,25 @@ export default { : chart.data[i].name; legendStr = `{a|${i + 1}}{b|${name} ${chart.data[ i - ].value.toFixed(3)}}\n{c|${ - chart.data[i].percent - ? chart.data[i].percent.toFixed(2) + '%' - : '' - }}`; + ].value.toFixed(3)}}\n{c|}`; } } return legendStr; }, tooltip: { show: true, + formatter: (params) => { + let name = params.name; + name = name.replace(/' + temp : temp; + } + return str; + }, }, itemWidth: 18, itemHeight: 18, @@ -912,7 +959,16 @@ export default { option.tooltip = { trigger: 'item', formatter: (params) => { - return `${params.marker} ${params.data.name} ${params.percent}%`; + const name = params.data.name.replace(/' + temp : temp; + } + return str; }, confine: true, }; @@ -1049,225 +1105,228 @@ export default {