111b2da137
Following https://github.com/apache/tvm/pull/10085, this PR adds a graphviz backend. It requires python `graphviz` package and `dot` executable in the PATH, similar to `tedd.py`. This implementation is much like a porting of `visualize` function in https://tvm.apache.org/2020/07/14/bert-pytorch-tvm, except that `node_attr_dict` is replaced with a callback `get_node_attr`. `get_node_attr` can be somehow used to emphasize a set of nodes. It might be useful if we encounter problems in inferences and want to find nodes with certain types and attributes. An example is provided in https://github.com/chiwwang/tvm/blob/graphviz_renderer_example/test_viz.py Its outputs are (conv2d with NCHW layout is green-colored): https://github.com/chiwwang/tvm/blob/graphviz_renderer_example/mod_with_subgraph.pdf https://github.com/chiwwang/tvm/blob/graphviz_renderer_example/mod_wo_subgraph.pdf