Skip to content

[upd] GraphView Mermaid visualization

Maxence Naud requested to merge improve-format_GraphView into dev

Context

Improve appearance of GraphView:

  • Add details about input connections if any available (if an input Tensor is connected to the input)
  • Add details about out connections if any available (if they were computed)
  • Change right arrow for down arrow

Before:

%%{init: {'flowchart': { 'curve': 'monotoneY'}, 'fontFamily': 'Verdana' } }%%
flowchart TB

Pad2D_0("myPaddedConv_pad<br/><sub><em>(Pad2D#0)</em></sub>"):::rootCls
Conv2D_0("myPaddedConv_conv<br/><sub><em>(Conv2D#0)</em></sub>")
Pad2D_0-->|"0 [2, 3, 5, 5] Int32<br/>&rarr; 0"|Conv2D_0
input0((in#0)):::inputCls--->|"&rarr; 0"|Pad2D_0
input1((in#1)):::inputCls--->|"&rarr; 1"|Conv2D_0
input2((in#2)):::inputCls--->|"&rarr; 2"|Conv2D_0
Conv2D_0--->|"0 &rarr;"|output0((out#0)):::outputCls
classDef inputCls fill:#afa
classDef outputCls fill:#ffa
classDef externalCls fill:#ccc
classDef producerCls fill:#ccf
classDef genericCls fill:#f9f9ff,stroke-width:1px,stroke-dasharray: 5 5
classDef metaCls stroke-width:5px
classDef rootCls stroke:#f00
classDef producerCls_rootCls stroke:#f00,fill:#ccf
classDef genericCls_rootCls stroke:#f00,fill:#f9f9ff,stroke-width:1px,stroke-dasharray: 5 5
classDef metaCls_rootCls stroke:#f00,stroke-width:5px

After

%%{init: {'flowchart': { 'curve': 'monotoneY'}, 'fontFamily': 'Verdana' } }%%
flowchart TB

Pad2D_0("myPaddedConv_pad<br/><sub><em>(Pad2D#0)</em></sub>"):::rootCls
Conv2D_0("myPaddedConv_conv<br/><sub><em>(Conv2D#0)</em></sub>")
Pad2D_0-->|"0 [2, 3, 5, 5] Int32<br/>&darr;<br/>0"|Conv2D_0
input0((in#0)):::inputCls--->|" [2, 3, 5, 5] Int32<br/>&darr;<br/>0"|Pad2D_0
input1((in#1)):::inputCls--->|" [4, 3, 3, 3] Int32<br/>&darr;<br/>1"|Conv2D_0
input2((in#2)):::inputCls--->|" [4] Int32<br/>&darr;<br/>2"|Conv2D_0
Conv2D_0--->|"0 [2, 4, 3, 3] Int32<br/>&darr;"|output0((out#0)):::outputCls
classDef inputCls fill:#afa
classDef outputCls fill:#ffa
classDef externalCls fill:#ccc
classDef producerCls fill:#ccf
classDef genericCls fill:#f9f9ff,stroke-width:1px,stroke-dasharray: 5 5
classDef metaCls stroke-width:5px
classDef rootCls stroke:#f00
classDef producerCls_rootCls stroke:#f00,fill:#ccf
classDef genericCls_rootCls stroke:#f00,fill:#f9f9ff,stroke-width:1px,stroke-dasharray: 5 5
classDef metaCls_rootCls stroke:#f00,stroke-width:5px

Also fix some log functions (used for MetaOp implementations) and add more details.

Modified files

  • GraphView.cpp
  • OperatorImpl.cpp
Edited by Maxence Naud

Merge request reports

Loading