Skip to content

Commit

Permalink
Update links to graphs
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 720749132
  • Loading branch information
cliveverghese authored and copybara-github committed Jan 29, 2025
1 parent 3fe152b commit 30cd3eb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
14 changes: 14 additions & 0 deletions frontend/app/components/op_profile/op_details/op_details.ng.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@
</button>
</a>
</div>
<div class="info" id="graph-viewer-link" [hidden]="isOss || !isCustomCall">
<a [href]="getCustomCallTextLink()" target="_blank" style="text-decoration:none;">
<button
mat-stroked-button
extended
type="button"
color="primary"
appearance="fill"
aria-label="go to custom call text"
i18n-aria-label="A button to corresponding custom call text page">
> Custom Call Text
</button>
</a>
</div>
<div class="info" [hidden]="!avgTimeMs">
<div class="title">Total Time Avg:</div>
<code class="expression">{{avgTimeMs}}</code>
Expand Down
9 changes: 9 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 @@ -64,6 +64,9 @@ export class OpDetails {
showUtilizationWarning = false;
deviceType = 'TPU';

get isCustomCall() {
return this.node?.xla?.category === 'custom-call';
}

constructor(
private readonly store: Store<{}>,
Expand Down Expand Up @@ -150,6 +153,12 @@ export class OpDetails {
return '';
}

getCustomCallTextLink() {
return `/graph_viewer.json?session_id=${this.sessionId}&module_name=${
this.getSelectedModuleName()}&node_name=${
this.getSelectedOpName()}&type=custom_call`;
}

dimensionColor(dimension?: Node.XLAInstruction.LayoutAnalysis.Dimension):
string {
if (!dimension || !dimension.alignment) {
Expand Down

0 comments on commit 30cd3eb

Please sign in to comment.