Skip to content

Commit

Permalink
Add raw time info in op_details
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 570448419
  • Loading branch information
lionelfeng authored and copybara-github committed Oct 3, 2023
1 parent c424c50 commit 3338633
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
<div class="title">Long Op Name:</div>
<code class="expression">{{provenance}}</code>
</div>
<div class="info" [hidden]="!rawTimeMs">
<div class="title">Raw Time:</div>
<code class="expression">{{rawTimeMs}}</code>
</div>
<div class="info" [hidden]="!fused">
<div class="unavailable">
Performance information for individual fused operations is not available.
Expand Down
8 changes: 8 additions & 0 deletions frontend/app/components/op_profile/op_details/op_details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class OpDetails {
.fill('');
expression: string = '';
provenance: string = '';
rawTimeMs = '';
fused: boolean = false;
hasCategory: boolean = false;
hasLayout: boolean = false;
Expand Down Expand Up @@ -164,6 +165,13 @@ export class OpDetails {
this.provenance = '';
}

if (this.node.metrics && this.node.metrics.rawTime) {
this.rawTimeMs = utils.humanReadableText(
this.node.metrics.rawTime / 1e9, {si: true, dp: 2, suffix: ' ms'});
} else {
this.rawTimeMs = '';
}

this.fused = !!this.node.xla && !this.node.metrics;
this.hasCategory = !!this.node.category;
this.hasLayout = !!this.node.xla && !!this.node.xla.layout &&
Expand Down

0 comments on commit 3338633

Please sign in to comment.