-
By category
-
+
-
-
- Show top
-
- #
-
-
- ops
+
+ Order by wasted time
+
+ info
+
+
-
Sort by wasted time
+
Top 90%
- info
+ class="tooltip-icon"
+ matTooltip="Ops will be capped by the limit."
+ matTooltipPosition="above">
+ info
-
+
-
Top 90%
-
+
Exclude Idle
+
+
+
+
+ Ops Limit
+
+
diff --git a/frontend/app/components/op_profile/op_profile_base.ts b/frontend/app/components/op_profile/op_profile_base.ts
index b7b645f29..4c5426139 100644
--- a/frontend/app/components/op_profile/op_profile_base.ts
+++ b/frontend/app/components/op_profile/op_profile_base.ts
@@ -8,18 +8,13 @@ export class OpProfileBase {
profile: ProfileOrNull = null;
rootNode?: Node;
data = new OpProfileData();
- hasTwoProfiles: boolean = false;
- isByCategory: boolean = false;
- excludeIdle: boolean = true;
- byWasted: boolean = false;
- showP90: boolean = false;
- childrenCount: number = 10;
- deviceType: string = 'TPU';
-
- private hasMultipleProfiles(): boolean {
- return !!this.profile && !!this.profile.byCategory &&
- !!this.profile.byProgram;
- }
+ hasMultiModules = false;
+ isByCategory = false;
+ excludeIdle = true;
+ byWasted = false;
+ showP90 = false;
+ childrenCount = 10;
+ deviceType = 'TPU';
private updateRoot() {
if (!this.profile) {
@@ -28,7 +23,7 @@ export class OpProfileBase {
}
if (this.excludeIdle) {
- if (!this.hasTwoProfiles) {
+ if (!this.hasMultiModules) {
this.rootNode = this.profile.byCategoryExcludeIdle ||
this.profile.byProgramExcludeIdle;
} else {
@@ -36,7 +31,7 @@ export class OpProfileBase {
this.profile.byProgramExcludeIdle;
}
} else {
- if (!this.hasTwoProfiles) {
+ if (!this.hasMultiModules) {
this.rootNode = this.profile.byCategory || this.profile.byProgram;
} else {
this.rootNode = this.isByCategory ? this.profile.byCategory :
@@ -49,7 +44,8 @@ export class OpProfileBase {
parseData(data: ProfileOrNull) {
this.profile = data;
- this.hasTwoProfiles = this.hasMultipleProfiles();
+ this.hasMultiModules =
+ !!this.profile && !!this.profile.byCategory && !!this.profile.byProgram;
this.isByCategory = false;
this.childrenCount = 10;
this.updateRoot();
diff --git a/frontend/app/components/op_profile/op_profile_common.scss b/frontend/app/components/op_profile/op_profile_common.scss
index a7c04bb5a..d18997dbc 100644
--- a/frontend/app/components/op_profile/op_profile_common.scss
+++ b/frontend/app/components/op_profile/op_profile_common.scss
@@ -20,7 +20,7 @@
}
.control {
- margin-right: 80px;
+ margin-right: 40px;
}
.ops-control {
@@ -52,3 +52,81 @@
vertical-align: bottom;
cursor: pointer;
}
+
+.time-header,
+.wasted-header,
+.hbmFraction-header,
+.name-header,
+.provenance-header,
+.utilization-hader,
+.hbmUtilization-header,
+.utilization-header,
+.hbmUtilization-header,
+.time,
+.wasted,
+.hbmFraction,
+.name,
+.provenance,
+.utilization,
+.hbmUtilization,
+.utilization,
+.hbmUtilization {
+ line-height: 20px;
+ width: 6%;
+ min-width: 60px;
+ text-align: center;
+}
+
+.time,
+.wasted,
+.hbmFraction,
+.name,
+.provenance,
+.utilization,
+.hbmUtilization {
+ font-size: smaller;
+}
+
+.name-header,
+.name {
+ display: inline-block;
+ width: 30%;
+ padding-left: 2em;
+ // Set word-break rule to make the arrow stick with text on narrow screen
+ word-break: break-all;
+}
+
+.name {
+ text-align: left;
+}
+
+.provenance-header,
+.provenance {
+ width: 20%;
+}
+
+.utilization-header,
+.utilization,
+.hbmUtilization-header,
+.hbmUtilization {
+ width: 60px;
+}
+
+.utilization-header,
+.hbmUtilization-header {
+ width: 76px; // 60px + circle 16px
+}
+
+.flame-color-circle,
+.hbm-flame-color-circle {
+ margin: 10px 20px 10px 10px;
+ width: 16px;
+ height: 16px;
+ border-radius: 8px;
+ text-align: left;
+}
+
+.disclosure {
+ display: inline-block;
+ width: 1em;
+}
diff --git a/frontend/app/components/op_profile/op_table/BUILD b/frontend/app/components/op_profile/op_table/BUILD
index 5dc74e7c4..f4bde958f 100644
--- a/frontend/app/components/op_profile/op_table/BUILD
+++ b/frontend/app/components/op_profile/op_table/BUILD
@@ -17,6 +17,7 @@ xprof_ng_module(
"@npm//@angular/common",
"@npm//@angular/core",
"@npm//@ngrx/store",
+ "@org_xprof//frontend/app/common/angular:angular_material_tooltip",
"@org_xprof//frontend/app/common/interfaces:op_profile_proto_defs",
"@org_xprof//frontend/app/components/op_profile/op_table_entry",
"@org_xprof//frontend/app/store",
@@ -27,4 +28,7 @@ sass_binary(
name = "op_table_css",
src = "op_table.scss",
sourcemap = False,
+ deps = [
+ "@org_xprof//frontend/app/components/op_profile:op_profile_common",
+ ],
)
diff --git a/frontend/app/components/op_profile/op_table/op_table.ng.html b/frontend/app/components/op_profile/op_table/op_table.ng.html
index d77e8e033..0aeef2a62 100644
--- a/frontend/app/components/op_profile/op_table/op_table.ng.html
+++ b/frontend/app/components/op_profile/op_table/op_table.ng.html
@@ -1,13 +1,13 @@
();
+ @Output() readonly hover = new EventEmitter();
/** The event when the selection is changed. */
- @Output() selected = new EventEmitter();
+ @Output() readonly selected = new EventEmitter();
+ // TODO: renaming the variable to be more self-explanatory or add docstring
children: Node[] = [];
- expanded: boolean = false;
- barWidth: string = '';
- flameColor: string = '';
- hideFlopsUtilization: boolean = false;
- name: string = '';
- offset: string = '';
- percent: string = '';
- provenance: string = '';
- timeWasted: string = '';
+ expanded = false;
+ barWidth = '';
+ flameColor = '';
+ hideFlopsUtilization = false;
+ name = '';
+ offset = '';
+ percent = '';
+ provenance = '-';
+ timeWasted = '';
hbmFraction = '';
- flopsUtilization: string = '';
- hbmUtilization: string = '';
- hbmFlameColor: string = '';
- numLeftOut: number = 0;
+ flopsUtilization = '';
+ hbmUtilization = '';
+ hbmFlameColor = '';
+ numLeftOut = 0;
constructor(private readonly store: Store<{}>) {}
@@ -82,7 +83,7 @@ export class OpTableEntry implements OnChanges {
this.offset = this.level.toString() + 'em';
this.provenance = (this.node && this.node.xla && this.node.xla.provenance) ?
this.node.xla.provenance.replace(/^.*(:|\/)/, '') :
- '';
+ '-';
this.timeWasted = utils.percent(utils.timeWasted(this.node, this.rootNode));
this.flopsUtilization =
utils.percent(utils.flopsUtilization(this.node, this.rootNode));