]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - tidl/tidl-api.git/blobdiff - docs/source/viewer.rst
Report memory usage when device allocation fails
[tidl/tidl-api.git] / docs / source / viewer.rst
index c00114bde6d99ebfa15fe1457aca148e8422cf8d..bae591d1a8da0430f58bf983cdd4db65f0a1052a 100644 (file)
@@ -1,3 +1,27 @@
 **************
 Network Viewer
 **************
+
+The TIDL network viewer utility, ``tidl_viewer``, can be used to view the network graph. If the ``dot`` utility is available, ``tidl_viewer`` uses it to convert the dot file to svg. ``dot`` is included in the ``Graphviz`` Ubuntu package and typically installed to ``/usr/bin/dot``.
+
+For example, the following command will generate a dot graph description for the ``tidl_net_jdetNet_ssd.bin`` network binary in ``ssd.dot``.
+
+.. code-block:: bash
+
+    $ tidl_viewer examples/test/testvecs/config/tidl_models/tidl_net_jdetNet_ssd.bin -d ssd.dot
+
+On x86/Linux, if ``/usr/bin/dot`` is available, ``tidl_viewer`` also generates an svg file, ``ssd.dot.svg``.
+
+.. figure:: images/ssd.dot.svg
+    :align: center
+    :scale: 30
+    :width: 30%
+    :alt: SVG generated by dot
+
+    svg file generated by tidl_viewer (click to enlarge)
+
+.. note::
+    If ``dot`` is not installed in ``/usr/bin/dot``, ``tidl_viewer`` will not convert the dot to svg. The following command can be used to generate the svg file as a separate step: ``dot -Tsvg ssd.dot -o ssd.dot.svg``. Additional information on ``Graphviz`` and ``dot`` available at:
+
+    * `Graphviz <https://www.graphviz.org/>`_
+    * `Ubuntu Graphviz package <https://packages.ubuntu.com/search?keywords=graphviz>`_