Files
apache--tvm/docs/reference/api/python/contrib.rst
T
chiwwang 111b2da137 RelayViz Graphviz renderer (#10400)
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
2022-03-01 12:50:33 +09:00

147 lines
2.8 KiB
ReStructuredText

.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
tvm.contrib
-----------
.. automodule:: tvm.contrib
tvm.contrib.cblas
~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.cblas
:members:
tvm.contrib.clang
~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.clang
:members:
tvm.contrib.cc
~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.cc
:members:
tvm.contrib.cublas
~~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.cublas
:members:
tvm.contrib.dlpack
~~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.dlpack
:members:
tvm.contrib.emcc
~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.emcc
:members:
tvm.contrib.miopen
~~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.miopen
:members:
tvm.contrib.mxnet
~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.mxnet
:members:
tvm.contrib.ndk
~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.ndk
:members:
tvm.contrib.nnpack
~~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.nnpack
:members:
tvm.contrib.nvcc
~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.nvcc
:members:
tvm.contrib.pickle_memoize
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.pickle_memoize
:members:
tvm.contrib.random
~~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.random
:members:
tvm.contrib.relay_viz
~~~~~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.relay_viz
:members:
.. automodule:: tvm.contrib.relay_viz.dot
:members:
.. automodule:: tvm.contrib.relay_viz.terminal
:members:
.. automodule:: tvm.contrib.relay_viz.interface
:members:
tvm.contrib.rocblas
~~~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.rocblas
:members:
tvm.contrib.rocm
~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.rocm
:members:
tvm.contrib.sparse
~~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.sparse
:members:
tvm.contrib.spirv
~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.spirv
:members:
tvm.contrib.tar
~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.tar
:members:
tvm.contrib.utils
~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.utils
:members:
tvm.contrib.xcode
~~~~~~~~~~~~~~~~~
.. automodule:: tvm.contrib.xcode
:members: