Skip to content

Commit 4a2b1b6

Browse files
Add profiler frontend code
1 parent b279127 commit 4a2b1b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+17985
-200
lines changed

frontend/.eslintrc.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ module.exports = {
2727
},
2828
plugins: ['license-header'],
2929
rules: {
30-
'sort-imports': 'warn',
31-
'no-console': 'warn'
30+
// 'sort-imports': 'warn',
31+
// 'no-console': 'warn'
3232
// 'license-header/header': ['error', './license-header.js']
3333
},
3434
overrides: [
@@ -39,7 +39,7 @@ module.exports = {
3939
rules: {
4040
'@typescript-eslint/explicit-function-return-type': 'off',
4141
'@typescript-eslint/explicit-module-boundary-types': 'off',
42-
'@typescript-eslint/no-explicit-any': 'error'
42+
'@typescript-eslint/no-explicit-any': 'off'
4343
}
4444
},
4545
{
@@ -66,7 +66,7 @@ module.exports = {
6666
rules: {
6767
'@typescript-eslint/explicit-function-return-type': 'off',
6868
'@typescript-eslint/explicit-module-boundary-types': 'off',
69-
'@typescript-eslint/no-explicit-any': 'error',
69+
'@typescript-eslint/no-explicit-any': 'off',
7070
'react/prop-types': 'off',
7171
'react/react-in-jsx-scope': 'off'
7272
}

frontend/packages/core/package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,19 @@
3939
"dist"
4040
],
4141
"dependencies": {
42+
"@material-ui/core": "^4.12.4",
43+
"@snowpack/plugin-sass": "^1.4.0",
4244
"@tippyjs/react": "4.2.5",
4345
"@visualdl/icons": "2.2.1",
4446
"@visualdl/netron": "2.2.1",
4547
"@visualdl/wasm": "2.2.1",
48+
"antd": "^4.21.0",
4649
"bignumber.js": "9.0.1",
4750
"classnames": "2.3.1",
4851
"d3": "7.0.1",
4952
"d3-format": "3.0.1",
50-
"echarts": "4.9.0",
51-
"echarts-gl": "1.1.2",
52-
"eslint-plugin-simple-import-sort": "^7.0.0",
53+
"echarts": "^5.3.3",
54+
"echarts-gl": "^2.0.9",
5355
"eventemitter3": "4.0.7",
5456
"file-saver": "2.0.5",
5557
"i18next": "20.6.0",
@@ -79,11 +81,13 @@
7981
"react-table-sticky": "1.1.3",
8082
"react-toastify": "8.0.2",
8183
"redux": "4.1.1",
84+
"snowpack-plugin-less": "^1.0.7",
8285
"styled-components": "5.3.1",
8386
"swr": "1.0.1",
8487
"three": "0.132.2",
8588
"tippy.js": "6.3.1",
86-
"umap-js": "1.3.3"
89+
"umap-js": "1.3.3",
90+
"use-deep-compare-effect": "^1.8.1"
8791
},
8892
"devDependencies": {
8993
"@baiducloud/sdk": "1.0.0-rc.31",
@@ -97,7 +101,6 @@
97101
"@types/chai": "4.2.21",
98102
"@types/d3": "7.0.0",
99103
"@types/d3-format": "3.0.1",
100-
"@types/echarts": "4.9.10",
101104
"@types/file-saver": "2.0.3",
102105
"@types/lodash": "4.14.172",
103106
"@types/mime-types": "2.1.1",
Lines changed: 1 addition & 0 deletions
Loading

frontend/packages/core/public/locales/en/common.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"graphDynamic": "dynamic",
1414
"graphStatic": "static",
1515
"high-dimensional": "High Dimensional",
16+
"profiler":"performance analysis",
1617
"histogram": "Histogram",
1718
"hyper-parameter": "Hyper Parameters",
1819
"image": "Image",
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
{
2+
"Overview-view": "Overview",
3+
"time-consuming": "Execution Summary",
4+
"Expand-view": "Details",
5+
"stage-view": "Details",
6+
"training-step-time": "Execution Time Breakdown",
7+
"performance-consumption": "Event Summary",
8+
"consumption-distribution": "Event Time Breakdown",
9+
"custom-events": "UserDefined Summary",
10+
"Configuration-details": "Configuration",
11+
"number-processes": "Number of Worker(s)",
12+
"Equipment-type": "Device Type",
13+
"Device-Details": "Device Summary",
14+
"Process-utilization": "Process Utilization",
15+
"system-utilization": "System Utilization",
16+
"computing-power": "Compute Capability",
17+
"Utilization": "Utilization",
18+
"Traffic-Processor-Efficiency": "Est. SM Efficiency",
19+
"Traffic-processor-occupancy": "Est. Achieved Occupancy",
20+
"usage-time": "Kernel Time using Tensor Cores",
21+
"step": "step",
22+
"timeConsuming": "time consuming",
23+
"Number-calls": "Calls",
24+
"duration": "duration",
25+
"Overall-proportion": "Overall proportion",
26+
"stage": "Event Name",
27+
"number-calls": "Calls",
28+
"total-time": "Total Time",
29+
"average-time": "Average Time",
30+
"longest-time": "Max Time",
31+
"shortest-time":"Min Time",
32+
"percentage":"Percentage",
33+
"Operator-view":"Operator View",
34+
"Time-profile":"Operator Pie",
35+
"Kernel-profile":"Kernel Pie",
36+
"Time-details":"Operator Table",
37+
"show-all-operators":"All operators",
38+
"show-Top-operators":"Top operators to show",
39+
"By-operator-name":"Operator Name",
40+
"operator-shape":"Operator Name + Input Shape",
41+
"input-shape":"input shape",
42+
"call-volume":"Calls",
43+
"operator":"Operator Name",
44+
"CPU-time":"CPU",
45+
"GPU-time":"GPU",
46+
"nuclear-view":"Kernel View",
47+
"show-all-kernels":"show all kernels",
48+
"show-Top-kernels":"Show Top Kernels",
49+
"group-by-core":"Kernel Name",
50+
"Group-operator":"Kernel Name + Attributes",
51+
"nuclear-name":"Kernel Name",
52+
"sm-average":"Mean Blocks Per SM",
53+
"average-occupancy":"Mean Achieved Occupancy",
54+
"use-tensor-core":"Kernel Used Tensor Cores",
55+
"Distribution-view":"Distributed View",
56+
"Device-Information":"Device Information",
57+
"comparisons":"Computation/Communication Overview",
58+
"training-steps":"Step",
59+
"memory-view":"Memory View",
60+
"equipment":"Device",
61+
"timestamp":"timestamp",
62+
"memory-size":"memory size",
63+
"event-name":"Event Name",
64+
"memory-usage":"memory usage",
65+
"storage-type":"Memory Type",
66+
"MemorAddr":"Memory address",
67+
"EventName":"Event Name",
68+
"AllocationCount":"Allcation Counts",
69+
"FreeCount":"Release Counts",
70+
"AllocationSize":"Allocation Size",
71+
"FreeSize":"Release Size",
72+
"IncreasedSize":"Increased Size",
73+
"AllocatedEvent":"Allocation Event",
74+
"AllocatedTimestamp":"Allocation Time",
75+
"FreeEvent":"Release Event",
76+
"FreeTimestamp":"Release Time",
77+
"Duration":"Duratrion",
78+
"Size":"Size",
79+
"search-event-name":"search event name",
80+
"Search-Kernal":"Search kernel name",
81+
"Search-operator":"Search operator name",
82+
"data-flow":"Runs",
83+
"view":"Views",
84+
"process":"Workers",
85+
"process-span":"Spans",
86+
"time-unit":"Timeunit",
87+
"Allocated":"Allocated",
88+
"Reserved":"Reserved",
89+
"PeakAllocated":"Peak Allocated",
90+
"PeakReserved":"Peak Reserved",
91+
"NoGPUdata":"No GPU data yet",
92+
"Cor-operator":"Operator",
93+
"thread-grid":"Grid",
94+
"thread-block":"Block",
95+
"Thread-registers":"Register Per Thread",
96+
"Shared-memory":"Shared Memory",
97+
"Yes":"Yes",
98+
"No":"No",
99+
"performance-analysis":"Profiler",
100+
"Tensorcore-usage":"Tensor Cores Utilization",
101+
"Kernel-details":"Kernel Table",
102+
"proportion":"proportion"
103+
104+
105+
106+
107+
108+
}

frontend/packages/core/public/locales/zh/common.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"graphDynamic": "动态",
1414
"graphStatic": "静态",
1515
"high-dimensional": "数据降维",
16+
"profiler": "性能分析",
1617
"histogram": "直方图",
1718
"hyper-parameter": "超参可视化",
1819
"image": "图像",
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
{
2+
"Overview-view": "总览视图",
3+
"time-consuming": "运行耗时",
4+
"Expand-view": "展开查看耗时详情",
5+
"stage-view": "各阶段耗时详情",
6+
"training-step-time": "训练步数耗时",
7+
"performance-consumption": "性能消耗",
8+
"consumption-distribution": "模型各阶段消耗分布",
9+
"custom-events": "自定义事件耗时",
10+
"Configuration-details": "配置详情",
11+
"number-processes": "进程数",
12+
"Equipment-type": "设备类型",
13+
"Device-Details": "设备详情",
14+
"Process-utilization": "进程利用率",
15+
"system-utilization": "系统利用率",
16+
"computing-power": "算力",
17+
"Utilization": "利用率",
18+
"Traffic-Processor-Efficiency": "流处理器效率",
19+
"Traffic-processor-occupancy": "流处理器占用率",
20+
"usage-time": "Tensor Cores使用时间占比",
21+
"step": "",
22+
"timeConsuming": "耗时",
23+
"Number-calls": "调用量(次)",
24+
"duration": "持续时间",
25+
"Overall-proportion": "整体占比",
26+
"stage": "事件名称",
27+
"number-calls": "调用次数",
28+
"total-time": "总耗时",
29+
"average-time": "平均耗时",
30+
"longest-time": "最长耗时",
31+
"shortest-time":"最短耗时",
32+
"percentage":"百分比",
33+
"Operator-view":"算子视图",
34+
"Time-profile":"耗时概况",
35+
"Kernel-profile":"耗时概况",
36+
"Time-details":"算子详情",
37+
"Kernel-details":"核详情",
38+
"show-all-operators":"显示全部算子",
39+
"show-Top-operators":"显示Top算子",
40+
"By-operator-name":"按算子名称",
41+
"operator-shape":"按算子名称+输入形状",
42+
"input-shape":"输入形状",
43+
"call-volume":"调用量",
44+
"operator":"算子名称",
45+
"CPU-time":"CPU耗时",
46+
"GPU-time":"GPU耗时",
47+
"nuclear-view":"核视图",
48+
"show-all-kernels":"显示全部内核",
49+
"show-Top-kernels":"显示Top内核",
50+
"group-by-core":"按核名称分组",
51+
"Group-operator":"按核名称+核属性分组",
52+
"nuclear-name":"核名称",
53+
"sm-average":"sm平均线程块数量",
54+
"average-occupancy":"平均占用率",
55+
"use-tensor-core":"是否使用Tensor Cores",
56+
"Distribution-view":"分布式视图",
57+
"Device-Information":"设备信息",
58+
"comparisons":"Computation和communication的耗时对比",
59+
"training-steps":"训练步数",
60+
"memory-view":"显存视图",
61+
"equipment":"设备",
62+
"timestamp":"时间戳",
63+
"memory-size":"内存大小",
64+
"event-name":"事件名称",
65+
"memory-usage":"内存使用量",
66+
"storage-type":"存储类型",
67+
"MemorAddr":"存储地址",
68+
"EventName":"事件名",
69+
"AllocationCount":"分配次数",
70+
"FreeCount":"释放次数",
71+
"AllocationSize":"分配大小",
72+
"FreeSize":"释放大小",
73+
"IncreasedSize":"净增量",
74+
"AllocatedEvent":"分配事件",
75+
"AllocatedTimestamp":"分配时间",
76+
"FreeEvent":"释放事件",
77+
"FreeTimestamp":"释放时间",
78+
"Duration":"持续时间",
79+
"Size":"大小",
80+
"search-event-name":"搜素事件名",
81+
"Search-operator":"搜索算子名称",
82+
"Search-Kernal":"搜索核名称",
83+
"performance-analysis":"性能分析",
84+
"data-flow":"数据流",
85+
"view":"视图",
86+
"process":"进程",
87+
"process-span":"数据索引",
88+
"time-unit":"时间单位",
89+
"Allocated":"已分配",
90+
"Reserved":"已预留",
91+
"PeakAllocated":"最大已分配",
92+
"PeakReserved":"最大已预留",
93+
"NoGPUdata":"暂无GPU数据",
94+
"Cor-operator":"对应算子",
95+
"thread-grid":"线程网格",
96+
"thread-block":"线程块",
97+
"Thread-registers":"线程平均寄存器数量",
98+
"Shared-memory":"共享显存量",
99+
"Yes":"",
100+
"No":"",
101+
"Tensorcore-usage":"Tensor core利用率",
102+
"proportion":"占比"
103+
104+
105+
106+
107+
108+
}

frontend/packages/core/public/static/index.html

Lines changed: 2 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export async function render() {
2+
document.location.href = 'index.html';
3+
}

0 commit comments

Comments
 (0)