[DOCS] Sphinx -- Introduce alias detection. (#4954)
authorTianqi Chen <tqchen@users.noreply.github.com>
Thu, 27 Feb 2020 22:27:37 +0000 (14:27 -0800)
committerGitHub <noreply@github.com>
Thu, 27 Feb 2020 22:27:37 +0000 (14:27 -0800)
commit1dbdcfb5e0542dbe43a468ad31a71a674a13e1fa
treea4e9d9329501b7fb4746abfa17206769027f7f0e
parent9db632fb75e4c7e505316baed7523117c7c4bf90
[DOCS] Sphinx -- Introduce alias detection. (#4954)

* [DOCS] Sphinx -- Introduce alias detection.

Background: some of our namespaces import function from another
namespace. For example tvm.te imports most of the operators from tvm.tir.

Previously we manually exclude these aliases from the doc.
However that means we can not link them by the alias name.

This PR adds a sphinx callback plugin to detect such aliases, and create a rubric block
on the button of its current docstring `Alias of the original class`.
It is done in a way so that we can refer to the generated docs.

We also fixed a few docs errors.

* Fix most of the issues
13 files changed:
docs/api/python/index.rst
docs/api/python/relay/op.rst
docs/api/python/te.rst
docs/api/python/tvm.rst [deleted file]
docs/conf.py
python/tvm/ir/base.py
python/tvm/relay/op/transform.py
python/tvm/relay/op/vision/__init__.py
python/tvm/relay/op/vision/multibox.py
python/tvm/relay/op/vision/nms.py
python/tvm/target/generic_func.py
tutorials/language/intrin_math.py
vta/tutorials/frontend/deploy_detection.py