diff --git a/mindinsight/ui/src/common/common-property.js b/mindinsight/ui/src/common/common-property.js index bc6da133..26974f71 100644 --- a/mindinsight/ui/src/common/common-property.js +++ b/mindinsight/ui/src/common/common-property.js @@ -145,4 +145,10 @@ export default { '.Batch > polygon { stroke: #de504e; fill: #ffbcba; }' + '.edge path { stroke: rgb(167, 167, 167); }' + '.edge polygon { fill: rgb(167, 167, 167); stroke: rgb(167, 167, 167); }', + clusterHeatmapDashboardColorArr: [ + '#fff2d0', '#fbeeb2', '#f8eb94', '#c1e891', '#8ae58f', '#64d4ab', '#3fc3c8', '#36afc2', '#2d9cbc', '#1e74a0', + ], + clusterHeatmapColorArr: [ + '#fff2d0', '#f8eb94', '#8ae58f', '#3fc3c8', '#2d9cbc', '#104d85', + ], }; diff --git a/mindinsight/ui/src/components/empty.vue b/mindinsight/ui/src/components/empty.vue new file mode 100644 index 00000000..3b64c729 --- /dev/null +++ b/mindinsight/ui/src/components/empty.vue @@ -0,0 +1,62 @@ + + + + + + diff --git a/mindinsight/ui/src/locales/en-us.json b/mindinsight/ui/src/locales/en-us.json index 21d451c3..12b8a118 100644 --- a/mindinsight/ui/src/locales/en-us.json +++ b/mindinsight/ui/src/locales/en-us.json @@ -539,9 +539,14 @@ }, "profilingCluster": { "titleText": "Profiling - Cluster Overview", + "commTitle": "Communication - Cluster Overview", "clusterView": "Cluster Overview", "rankID": "Rank ID", - "timeTitle": "time(ms)" + "timeTitle": "time(ms)", + "performanceChartTitle": "Performance Analysis", + "memoryHeatMapTitle": "Memory Heat Map Analysis", + "deviceId": "Device", + "granuLarity": "GranuLarity" }, "components": { "summaryTitle": "Training Selection", diff --git a/mindinsight/ui/src/locales/zh-cn.json b/mindinsight/ui/src/locales/zh-cn.json index e6485d3b..9ced49b0 100644 --- a/mindinsight/ui/src/locales/zh-cn.json +++ b/mindinsight/ui/src/locales/zh-cn.json @@ -538,9 +538,14 @@ }, "profilingCluster": { "titleText": "性能分析 - 集群概览", + "commTitle": "通信信息 - 集群概览", "clusterView": "集群概览", "rankID": "逻辑卡号", - "timeTitle": "时间(ms)" + "timeTitle": "时间(ms)", + "performanceChartTitle": "性能分析", + "memoryHeatMapTitle": "内存热力图分析", + "deviceId": "设备", + "granuLarity": "粒度" }, "components": { "summaryTitle": "训练选择", diff --git a/mindinsight/ui/src/router.js b/mindinsight/ui/src/router.js index 5ad692a2..5961c7da 100644 --- a/mindinsight/ui/src/router.js +++ b/mindinsight/ui/src/router.js @@ -146,12 +146,16 @@ export default new Router({ ], }, { - path: '/profiling-cluster', - component: () => import('./views/profiling/profiling-cluster.vue'), + path: '/cluster-dashboard', + component: () => import('./views/profiling/cluster-dashboard.vue'), }, { - path: '/profiling-gpu-cluster', - component: () => import('./views/profiling/profiling-cluster.vue'), + path: '/profiling-performance', + component: () => import('./views/profiling/profiling-performance.vue'), + }, + { + path: '/memory-heatmap', + component: () => import('./views/profiling/memory-heatmap.vue'), }, { path: '/debugger', diff --git a/mindinsight/ui/src/services/request-service.js b/mindinsight/ui/src/services/request-service.js index 7a4353c3..616817c0 100644 --- a/mindinsight/ui/src/services/request-service.js +++ b/mindinsight/ui/src/services/request-service.js @@ -525,4 +525,11 @@ export default { url: 'v1/mindinsight/profile/cluster-step-trace-summary', }); }, + getClusterPeakMemory(params) { + return axios({ + method: 'get', + params: params, + url: 'v1/mindinsight/profile/cluster-peak-memory', + }); + }, }; diff --git a/mindinsight/ui/src/views/profiling/cluster-dashboard.vue b/mindinsight/ui/src/views/profiling/cluster-dashboard.vue new file mode 100644 index 00000000..0dfce9e3 --- /dev/null +++ b/mindinsight/ui/src/views/profiling/cluster-dashboard.vue @@ -0,0 +1,136 @@ + + + + diff --git a/mindinsight/ui/src/views/profiling/memory-heatmap.vue b/mindinsight/ui/src/views/profiling/memory-heatmap.vue new file mode 100644 index 00000000..9213f907 --- /dev/null +++ b/mindinsight/ui/src/views/profiling/memory-heatmap.vue @@ -0,0 +1,474 @@ + + + + diff --git a/mindinsight/ui/src/views/profiling/performance-dashboard.vue b/mindinsight/ui/src/views/profiling/performance-dashboard.vue new file mode 100644 index 00000000..37dac086 --- /dev/null +++ b/mindinsight/ui/src/views/profiling/performance-dashboard.vue @@ -0,0 +1,264 @@ + + + + + + diff --git a/mindinsight/ui/src/views/profiling/profiling-cluster.vue b/mindinsight/ui/src/views/profiling/profiling-performance.vue similarity index 93% rename from mindinsight/ui/src/views/profiling/profiling-cluster.vue rename to mindinsight/ui/src/views/profiling/profiling-performance.vue index 9220c708..2a160611 100644 --- a/mindinsight/ui/src/views/profiling/profiling-cluster.vue +++ b/mindinsight/ui/src/views/profiling/profiling-performance.vue @@ -22,7 +22,7 @@ limitations under the License.
{{$t('symbols.leftbracket')}} {{$t('trainingDashboard.summaryDirPath')}} - {{summaryPath}} + {{trainInfo.path}} {{$t('symbols.rightbracket')}}
@@ -94,6 +94,10 @@ limitations under the License. + +
@@ -111,8 +115,12 @@ import RequestService from '../../services/request-service'; export default { data() { return { - summaryPath: '', - trainingJobId: this.$route.query.id, // ID of the current training job + trainInfo: { + id: this.$route.query.id, + path: this.$route.query.path, + dir: this.$route.query.dir, + }, + activeName: this.$route.query.activeName, chartObj: null, // chart obj chartData: [], // chart data chartOption: { // chart option @@ -211,14 +219,14 @@ export default { }; }, mounted() { - if (!this.trainingJobId) { + if (!this.trainInfo.id) { this.$message.error(this.$t('trainingDashboard.invalidId')); document.title = `${this.$t('profilingCluster.clusterView')}-MindInsight`; this.initOver = true; return; } - this.summaryPath = decodeURIComponent(this.trainingJobId); - document.title = `${this.summaryPath}-${this.$t( + // const summaryPath = decodeURIComponent(this.trainInfo.path); + document.title = `${this.trainInfo.path}-${this.$t( 'profilingCluster.clusterView', )}-MindInsight`; @@ -237,6 +245,14 @@ export default { } }, methods: { + backToDashboard() { + this.$router.push({ + path: 'cluster-dashboard', + query: Object.assign({ + activeName: this.activeName, + }, this.trainInfo), + }); + }, /** * initialize * @param {Boolean} isInit whether get all data @@ -246,7 +262,7 @@ export default { queryStepTraceInfo(isInit, isSort) { const params = {}; params.params = { - train_id: this.trainingJobId, + train_id: this.trainInfo.id, }; params.body = { sort_condition: this.sort_condition, @@ -366,9 +382,9 @@ export default { const routeUrl = this.$router.resolve({ path: path, query: { - id: this.trainingJobId + '/cluster_profiler/' + row.host_ip, + id: this.trainInfo.id + '/cluster_profiler/' + row.host_ip, dir: row.profiler_dir, - path: this.trainingJobId + '/cluster_profiler/' + row.host_ip, + path: this.trainInfo.path + '/cluster_profiler/' + row.host_ip, deviceid: row.device_id.toString(), }, }); @@ -437,6 +453,13 @@ export default { flex-direction: column; padding: 0 32px 24px 32px; } +.cl-cluster .cl-cluster-close { + object-fit: none; + position: absolute; + cursor: pointer; + top: 36px; + right: 24px; +} .cl-cluster .no-data-img { background: #fff; text-align: center; diff --git a/mindinsight/ui/src/views/profiling/resource-dashboard-cluster.vue b/mindinsight/ui/src/views/profiling/resource-dashboard-cluster.vue new file mode 100644 index 00000000..6a4c8402 --- /dev/null +++ b/mindinsight/ui/src/views/profiling/resource-dashboard-cluster.vue @@ -0,0 +1,354 @@ + + + + diff --git a/mindinsight/ui/src/views/train-manage/summary-manage.vue b/mindinsight/ui/src/views/train-manage/summary-manage.vue index cb3e9f74..b8615288 100644 --- a/mindinsight/ui/src/views/train-manage/summary-manage.vue +++ b/mindinsight/ui/src/views/train-manage/summary-manage.vue @@ -70,7 +70,7 @@ limitations under the License. :label="$t('summaryManage.updateTime')" show-overflow-tooltip> - +
- +