-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Roofline Model tool in Tensorboard Plugin Profiler
PiperOrigin-RevId: 700161829
- Loading branch information
1 parent
4d0a1d4
commit 6e19c4b
Showing
17 changed files
with
1,881 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary") | ||
load("//defs:defs.bzl", "xprof_ng_module") | ||
|
||
package(default_visibility = ["//frontend:internal"]) | ||
|
||
xprof_ng_module( | ||
name = "roofline_model", | ||
srcs = [ | ||
"roofline_model.ts", | ||
"roofline_model_module.ts", | ||
], | ||
assets = [ | ||
":roofline_model_css", | ||
"roofline_model.ng.html", | ||
], | ||
deps = [ | ||
"@npm//@angular/core", | ||
"@npm//@angular/router", | ||
"@npm//@ngrx/store", | ||
"@npm//@types/google.visualization", | ||
"@npm//rxjs", | ||
"@org_xprof//frontend/app/common/constants:roofline_model_constants", | ||
"@org_xprof//frontend/app/common/interfaces", | ||
"@org_xprof//frontend/app/common/utils", | ||
"@org_xprof//frontend/app/components/chart/table", | ||
"@org_xprof//frontend/app/components/controls/category_filter", | ||
"@org_xprof//frontend/app/components/controls/string_filter", | ||
"@org_xprof//frontend/app/components/roofline_model/operation_level_analysis", | ||
"@org_xprof//frontend/app/components/roofline_model/program_level_analysis", | ||
"@org_xprof//frontend/app/services/data_service", | ||
"@org_xprof//frontend/app/store", | ||
], | ||
) | ||
|
||
sass_binary( | ||
name = "roofline_model_css", | ||
src = "roofline_model.scss", | ||
# stack = True, | ||
sourcemap = False, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
frontend/app/components/roofline_model/roofline_model.ng.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<div class="section-container"> | ||
<div class="block-content"> | ||
<div class="row"> | ||
<h2>Device Information</h2> | ||
<div class="flex-space"></div> | ||
</div> | ||
</div> | ||
<div class="block-content"> | ||
<div *ngFor="let info of deviceInfoArray" style="font-size:16px"> | ||
<div *ngIf="info.display"><b>{{info.label}}:</b> <span> {{info.value}} {{info.unit}} {{info.context}}</span></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="section-container"> | ||
<div class="block-content"> | ||
<h2>Section1: Program-Level Analysis</h2> | ||
</div> | ||
<div class="block-content"> | ||
<div class="description"> | ||
Note:<br> | ||
(1) This section provides program-level analysis.<br> | ||
(2) A tooltip with extra information will show up if you mouse over a point in the roofline chart.<br> | ||
(3) You can choose whether to include infeed and outfeed ops for the analysis.<br> | ||
(4) "Total" aggregates all operations throughout the entire profiling session. It includes incomplete steps.<br> | ||
(5) "Total (HW)" is based on the hardware performance counters while the others are based on the XLA's cost analysis. | ||
It is always calculated including infeed and outfeed ops regardless of the option. | ||
The gap between "Total" and "Total (HW)" is due to hardware limitation (e.g., padding).<br> | ||
(6) "Average" shows the average step information by aggregating the operations in the complete steps only. | ||
</div> | ||
</div> | ||
<div class="block-content"> | ||
<program-level-analysis [rooflineModelData]="dataTableProgram" [viewColumns]="columnsIdxProgram" [rooflineSeriesData]="scatterDataProgram" [scatterChartOptions]="scatterChartOptionsProgram" (filterUpdated)="updateDataTableProgram($event)"></program-level-analysis> | ||
</div> | ||
</div> | ||
|
||
<div class="section-container"> | ||
<div class="block-content"> | ||
<h2>Section2: Operation-Level Analysis</h2> | ||
</div> | ||
<div class="block-content"> | ||
<div class="description"> | ||
Note:<br> | ||
(1) This section provides operation-level analysis.<br> | ||
(2) A tooltip with extra information will show up if you mouse over a point in the roofline chart.<br> | ||
(3) To avoid sluggishness, only the 1000 most time-consuming operations are shown.<br> | ||
(4) You can choose whether to include infeed and outfeed ops for the analysis.<br> | ||
(5) You can filter data by HLO category, bottleneck resource or HLO name.<br> | ||
(6) "IDLE" represents the portion of the total execution time on device that is idle.<br> | ||
(7) Ops with zero FLOP (e.g., data formatting ops like reshape, IDLE, etc.) do not show up in the roofline chart.<br> | ||
</div> | ||
</div> | ||
<div class="block-content"> | ||
<operation-level-analysis [selectedOp]="selectedOpName" [rooflineModelData]="dataTableOp" [viewColumns]="columnsIdxOp" [rooflineSeriesData]="scatterDataOp" [scatterChartOptions]="scatterChartOptionsOp" (filterUpdated)="updateDataTableOp($event)"></operation-level-analysis> | ||
</div> | ||
</div> |
39 changes: 39 additions & 0 deletions
39
frontend/app/components/roofline_model/roofline_model.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.section-container { | ||
margin: 20px 20px 0px; | ||
} | ||
|
||
.block-content { | ||
padding: 5px; | ||
} | ||
|
||
.row { | ||
display: flex; | ||
} | ||
|
||
.flex-space { | ||
flex: 1; | ||
} | ||
|
||
.description { | ||
font-size: 14px; | ||
} | ||
|
||
.tableHeaderCell { | ||
word-wrap: break-word; | ||
background-color: azure; //!to hide the scrolled-up text. | ||
} | ||
|
||
.tableTableCell { | ||
word-break: break-all; | ||
} | ||
|
||
.opColumnClass { | ||
max-height: 200px; | ||
overflow-y: auto; | ||
} | ||
|
||
.errorMessage { | ||
border: 2px solid; | ||
background-color: #ffcccb; | ||
color: red; | ||
} |
Oops, something went wrong.