From 135ad2747ddc1dcc4930e9cf4962a5d1bf1ffc3a Mon Sep 17 00:00:00 2001 From: Yong Wu Date: Sun, 10 Mar 2019 11:32:18 -0700 Subject: [PATCH 1/2] update relay python api doc --- docs/api/python/relay/backend.rst | 3 --- docs/api/python/relay/base.rst | 3 +++ docs/api/python/relay/build_module.rst | 2 ++ docs/api/python/relay/expr.rst | 14 ++++++++--- docs/api/python/relay/frontend.rst | 8 ++++++ docs/api/python/relay/image.rst | 2 +- docs/api/python/relay/op.rst | 35 +++++++++++++++----------- python/tvm/relay/op/__init__.py | 5 ++-- 8 files changed, 47 insertions(+), 25 deletions(-) diff --git a/docs/api/python/relay/backend.rst b/docs/api/python/relay/backend.rst index 5cbc250b55ba..a6085c3232ef 100644 --- a/docs/api/python/relay/backend.rst +++ b/docs/api/python/relay/backend.rst @@ -3,9 +3,6 @@ tvm.relay.backend .. automodule:: tvm.relay.backend -Interpreter ------------ - .. automodule:: tvm.relay.backend.interpreter :members: diff --git a/docs/api/python/relay/base.rst b/docs/api/python/relay/base.rst index 72315dca0193..f2d0db409100 100644 --- a/docs/api/python/relay/base.rst +++ b/docs/api/python/relay/base.rst @@ -12,5 +12,8 @@ tvm.relay.base .. autoclass:: tvm.relay.base.Span :members: +.. autoclass:: tvm.relay.base.SourceName + :members: + .. autoclass:: tvm.relay.base.Id :members: diff --git a/docs/api/python/relay/build_module.rst b/docs/api/python/relay/build_module.rst index a278940f0fd5..b33f1870d5a5 100644 --- a/docs/api/python/relay/build_module.rst +++ b/docs/api/python/relay/build_module.rst @@ -5,6 +5,8 @@ tvm.relay.build_module .. autofunction:: tvm.relay.build_module.build +.. autofunction:: tvm.relay.build_module.build_config + .. autofunction:: tvm.relay.build_module.optimize .. autofunction:: tvm.relay.build_module.create_executor diff --git a/docs/api/python/relay/expr.rst b/docs/api/python/relay/expr.rst index 540d6bfbab65..c21e583f042b 100644 --- a/docs/api/python/relay/expr.rst +++ b/docs/api/python/relay/expr.rst @@ -39,15 +39,21 @@ tvm.relay.expr .. autoclass:: tvm.relay.expr.TupleGetItem :members: -.. autoclass:: tvm.relay.expr.TempExpr +.. autoclass:: tvm.relay.expr.RefCreate + :members: + +.. autoclass:: tvm.relay.expr.RefRead + :members: + +.. autoclass:: tvm.relay.expr.RefWrite :members: -.. autoclass:: tvm.relay.expr.ExprFunctor +.. autoclass:: tvm.relay.expr.TupleGetItem :members: -.. autoclass:: tvm.relay.expr.ExprMutator +.. autoclass:: tvm.relay.expr.TempExpr :members: .. autoclass:: tvm.relay.expr.TupleWrapper - :members + :members: diff --git a/docs/api/python/relay/frontend.rst b/docs/api/python/relay/frontend.rst index 054d3cecc1c5..2a22982a1cdf 100644 --- a/docs/api/python/relay/frontend.rst +++ b/docs/api/python/relay/frontend.rst @@ -9,3 +9,11 @@ tvm.relay.frontend .. autofunction:: tvm.relay.frontend.from_keras .. autofunction:: tvm.relay.frontend.from_onnx + +.. autofunction:: tvm.relay.frontend.from_tflite + +.. autofunction:: tvm.relay.frontend.from_coreml + +.. autofunction:: tvm.relay.frontend.from_caffe2 + +.. autofunction:: tvm.relay.frontend.from_tensorflow diff --git a/docs/api/python/relay/image.rst b/docs/api/python/relay/image.rst index 223213eca8e3..862dcbbd1fc7 100644 --- a/docs/api/python/relay/image.rst +++ b/docs/api/python/relay/image.rst @@ -5,5 +5,5 @@ tvm.relay.image .. automodule:: tvm.relay.image :members: -.. automodule:: tvm.relay.op.image.image +.. automodule:: tvm.relay.op.image :members: diff --git a/docs/api/python/relay/op.rst b/docs/api/python/relay/op.rst index 7413a818f73f..6da740202f18 100644 --- a/docs/api/python/relay/op.rst +++ b/docs/api/python/relay/op.rst @@ -3,23 +3,30 @@ tvm.relay.op .. automodule:: tvm.relay.op :members: -.. automodule:: tvm.relay.op.op - :members: +.. autofunction:: tvm.relay.op.Op -.. automodule:: tvm.relay.op.reduce - :members: +.. autofunction:: tvm.relay.op.OpPattern -.. automodule:: tvm.relay.op.tensor - :members: +.. autofunction:: tvm.relay.op.get -.. automodule:: tvm.relay.op.transform - :members: +.. autofunction:: tvm.relay.op.register -.. automodule:: tvm.relay.op.nn.nn - :members: +.. autofunction:: tvm.relay.op.register_schedule -.. automodule:: tvm.relay.op.vision.multibox - :members: +.. autofunction:: tvm.relay.op.register_pattern -.. automodule:: tvm.relay.op.vision.nms - :members: +.. autofunction:: tvm.relay.op.register_compute + +.. autofunction:: tvm.relay.op.register_gradient + +.. autofunction:: tvm.relay.op.register_alter_op_layout + +.. autofunction:: tvm.relay.op.schedule_injective + +.. autofunction:: tvm.relay.op.debug + + +.. toctree:: + :maxdepth: 2 + + langref/relay_op diff --git a/python/tvm/relay/op/__init__.py b/python/tvm/relay/op/__init__.py index 84b0ceef8524..9dd2bf88c934 100644 --- a/python/tvm/relay/op/__init__.py +++ b/python/tvm/relay/op/__init__.py @@ -1,9 +1,8 @@ #pylint: disable=wildcard-import, redefined-builtin """Relay core operators.""" # operator defs -from .op import get, register, register_schedule, register_compute, register_alter_op_layout, \ - Op -from .op import debug +from .op import get, register, register_schedule, register_compute, register_gradient, \ + register_pattern, register_alter_op_layout, schedule_injective, Op, OpPattern, debug # Operators from .reduce import * From 71ed4611b1e3c66d8f04c6fa27d7a1a728580159 Mon Sep 17 00:00:00 2001 From: Yong Wu Date: Sun, 10 Mar 2019 16:28:15 -0700 Subject: [PATCH 2/2] Incorporate comments --- docs/api/python/relay/op.rst | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/api/python/relay/op.rst b/docs/api/python/relay/op.rst index 6da740202f18..36a7aa00d7b7 100644 --- a/docs/api/python/relay/op.rst +++ b/docs/api/python/relay/op.rst @@ -25,8 +25,19 @@ tvm.relay.op .. autofunction:: tvm.relay.op.debug +.. automodule:: tvm.relay.op.reduce + :members: + +.. automodule:: tvm.relay.op.tensor + :members: + +.. automodule:: tvm.relay.op.transform + :members: + +.. automodule:: tvm.relay.op.nn + :members: -.. toctree:: - :maxdepth: 2 +.. automodule:: tvm.relay.op.vision.multibox + :members: - langref/relay_op +.. autofunction:: tvm.relay.vision.nms