Skip to content

Commit

Permalink
Make graph viewer link generation base on hlo expression instead of p…
Browse files Browse the repository at this point in the history
…rovenance (tf op name)

PiperOrigin-RevId: 567088287
  • Loading branch information
zzzaries authored and copybara-github committed Sep 20, 2023
1 parent fb23689 commit 94f014a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<div class="title"> Hardware Computation Size:</div>
<code class="expression">{{computationPrimitiveSize}}</code>
</div>
<div [hidden]="selectedOpNodeChain.length < 2 || selectedOpNodeChain[0] !== 'by_program' || !provenance">
<div [hidden]="selectedOpNodeChain.length < 2 || selectedOpNodeChain[0] !== 'by_program' || !expression">
<a [href]="getGraphViewerLink()" target="_blank" style="text-decoration:none;">
<button
mat-stroked-button
Expand Down
5 changes: 4 additions & 1 deletion frontend/app/components/op_profile/op_details/op_details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ export class OpDetails {
}

getGraphViewerLink() {
return `/graph_viewer/${this.sessionId}?module_name=${this.selectedOpNodeChain[1]}&node_name=${this.name}`;
// expression format assumption: '%<op_name> = ...'
const opName = this.expression.split('=')[0].trim().slice(1);
return `/graph_viewer/${this.sessionId}?module_name=${
this.selectedOpNodeChain[1]}&node_name=${opName}`;
}

dimensionColor(dimension?: Node.XLAInstruction.LayoutAnalysis.Dimension):
Expand Down

0 comments on commit 94f014a

Please sign in to comment.