|
1 | 1 | <!-- |
2 | 2 | @license |
3 | | -Copyright 2016 The TensorFlow Authors. All Rights Reserved. |
| 3 | +Copyright 2019 The TensorFlow Authors. All Rights Reserved. |
4 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | you may not use this file except in compliance with the License. |
6 | 6 | You may obtain a copy of the License at |
7 | 7 | http://www.apache.org/licenses/LICENSE-2.0 |
8 | | - Unless required by applicable law or agreed to in writing, software |
9 | | - distributed under the License is distributed on an "AS IS" BASIS, |
10 | | - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
11 | | - See the License for the specific language governing permissions and |
12 | | - limitations under the License. |
| 8 | +Unless required by applicable law or agreed to in writing, software |
| 9 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +See the License for the specific language governing permissions and |
| 12 | +limitations under the License. |
| 13 | +============================================================================== |
13 | 14 | --> |
14 | 15 |
|
15 | 16 | <!-- |
|
33 | 34 | display: flex; |
34 | 35 | flex-flow: row nowrap; |
35 | 36 | justify-content: space-between; |
36 | | - overflow:auto; |
37 | | - text-transform:uppercase; |
| 37 | + overflow: auto; |
| 38 | + text-transform: uppercase; |
38 | 39 | padding: 0.5em; |
39 | 40 | vertical-align: bottom; |
40 | 41 | text-align: bottom; |
41 | 42 | } |
42 | | -.controlRowLeft { |
| 43 | +.control-row-left { |
43 | 44 | display: flex; |
44 | 45 | margin-left: 16px; |
45 | 46 | flex-flow: row nowrap; |
|
52 | 53 | --paper-slider-input: {width: 100px} |
53 | 54 | --paper-slider-height: 3px; |
54 | 55 | } |
55 | | -.stepNumText { |
| 56 | +.step-num-text { |
56 | 57 | padding-left: 1em; |
57 | 58 | font-size: 20px; |
58 | 59 | font-weight: bold; |
59 | 60 | } |
60 | | -.stackTitle { |
| 61 | +.stack-title { |
61 | 62 | font-size: 24px; |
62 | 63 | line-height: 32px; |
63 | 64 | } |
| 65 | +.bar-chart { |
| 66 | + overflow: auto; |
| 67 | +} |
64 | 68 | #title { |
65 | 69 | margin-left: 16px; |
66 | 70 | } |
| 71 | +.error-message { |
| 72 | + color: red; |
| 73 | + font-size: 32 px; |
| 74 | + font-weight: bold; |
| 75 | + margin-left: 16px; |
| 76 | + margin-top: 32px; |
| 77 | +} |
| 78 | + |
67 | 79 | </style> |
68 | | - <div id="control"> |
| 80 | + <div class="error-message" hidden=[[!_error_message]]> |
| 81 | + <span>[[_error_message]]</span> |
| 82 | + </div> |
| 83 | + <div id="control" hidden=[[_error_message]]> |
69 | 84 | <!-- |
70 | 85 | paper-slider sets which step to show. |
71 | 86 | --> |
72 | | - <span class="controlRowLeft">Please select a step |
73 | | - <paper-slider min=0 max="[[maxStepId]]" snaps step="1" |
| 87 | + <span class="control-row-left">Please select a step |
| 88 | + <paper-slider min=0 max="[[_maxStepId]]" snaps step="1" |
74 | 89 | value="{{curStepId}}"> |
75 | | - </paper-slider> <span class="stepNumText">Step [[stepNum]]</span> |
| 90 | + </paper-slider> <span class="step-num-text"> |
| 91 | + Step [[_getStepNum(_podStats)]]</span> |
76 | 92 | </span> |
77 | 93 | </div> |
78 | | - <div class="pod-viewer-dashboard"> |
| 94 | + <div class="pod-viewer-dashboard" hidden=[[_error_message]]> |
79 | 95 | <div id="topo-graph"> |
80 | | - <topology-graph |
81 | | - run-environment_={{runEnvironment}} |
82 | | - data_={{podStats}} |
83 | | - metrics=[[stepBreakdownEle]] |
84 | | - active-bar-chart-ele=[[activeBarChartEle]] |
85 | | - selected-chip-id={{selectedChipId}} |
86 | | - selected-channel={{selectedChannel}}> |
87 | | - </topology-graph> |
| 96 | + <topology-graph run-environment=[[_runEnvironment]] |
| 97 | + data=[[_podStats]] metrics=[[_stepBreakdownLayers]] |
| 98 | + active-bar=[[activeBar]] selected-channel={{selectedChannel}}> |
| 99 | + </topology-graph> |
88 | 100 | </div> |
89 | | - <div id="channel-bars" style="overflow:auto" hidden="[[!channelDb]]"> |
| 101 | + <div id="channel-bars" class="bar-chart" hidden="[[!_channelDb]]"> |
90 | 102 | <div id="title"> |
91 | | - <div class="stackTitle">Latency of Send and Recv channels</div> |
| 103 | + <div class="stack-title">Latency of Send and Recv channels</div> |
92 | 104 | <p>(x-axis: channel id, y-axis: time(us))</p> |
93 | 105 | </div> |
94 | | - <stack-bar-chart id="channel-chart" data=[[channelDb]] |
95 | | - stack-ele=[[channelEle]] |
96 | | - x-domain-func=[[channelFunc]] |
97 | | - active={{activeBarChartEle}}></stack-bar-chart> |
| 106 | + <stack-bar-chart id="channel-chart" data=[[_channelDb]] |
| 107 | + stack-layers=[[_channelLayers]] |
| 108 | + x-domain-func=[[_channelFunc]] |
| 109 | + active-bar={{activeBar}}></stack-bar-chart> |
98 | 110 | </div> |
99 | | - <div id="all-reduce-bars" style="overflow:auto" hidden="[[!allReduceDb]]"> |
| 111 | + <div id="all-reduce-bars" class="bar-chart" hidden="[[!_allReduceDb]]"> |
100 | 112 | <div id="title"> |
101 | | - <div class="stackTitle"> |
| 113 | + <div class="stack-title"> |
102 | 114 | Duration of all-reduce op or custom fusion for all-reduce</div> |
103 | 115 | <p>(x-axis: short names for all-reduces ops (a#) |
104 | 116 | or fusion (f#), y-axis: time(us))</p> |
105 | 117 | </div> |
106 | | - <stack-bar-chart id="all-reduce-chart" data=[[allReduceDb]] |
107 | | - stack-ele=[[allReduceEle]] |
108 | | - x-domain-func=[[allReduceFunc]] |
109 | | - active={{activeBarChartEle}}></stack-bar-chart> |
| 118 | + <stack-bar-chart id="all-reduce-chart" data=[[_allReduceDb]] |
| 119 | + stack-layers=[[_allReduceLayers]] |
| 120 | + x-domain-func=[[_allReduceFunc]] |
| 121 | + active-bar={{activeBar}}></stack-bar-chart> |
110 | 122 | </div> |
111 | | - <div id="stack-bars" style="overflow:auto" hidden="[[!stepStats]]"> |
| 123 | + <div id="stack-bars" class="bar-chart" hidden="[[!_stepStats]]"> |
112 | 124 | <div id="title"> |
113 | | - <div class="stackTitle">Step breakdown</div> |
114 | | - <p>(x-axis: global chip id, core id, y-axis: time(us)</p> |
| 125 | + <div class="stack-title">Step breakdown</div> |
| 126 | + <p>(x-axis: global chip id, core id, y-axis: time(us))</p> |
115 | 127 | </div> |
116 | | - <stack-bar-chart id="stack-bar-chart" data=[[stepStats]] |
117 | | - stack-ele=[[stepBreakdownEle]] |
118 | | - x-domain-func=[[stepBreakdownFunc]] |
119 | | - active={{activeBarChartEle}}></stack-bar-chart> |
| 128 | + <stack-bar-chart id="stack-bar-chart" data=[[_stepStats]] |
| 129 | + stack-layers=[[_stepBreakdownLayers]] |
| 130 | + x-domain-func=[[_stepBreakdownFunc]] |
| 131 | + active-bar={{activeBar}}></stack-bar-chart> |
120 | 132 | </div> |
121 | 133 | </div> |
122 | 134 | </template> |
|
0 commit comments