[DOCS][PY] Sphinx docs about tvm.ir
authortqchen <tianqi.tchen@gmail.com>
Wed, 12 Feb 2020 04:36:20 +0000 (20:36 -0800)
committerTianqi Chen <tqchen@users.noreply.github.com>
Wed, 12 Feb 2020 16:01:22 +0000 (08:01 -0800)
docs/api/python/container.rst [deleted file]
docs/api/python/index.rst
docs/api/python/ir.rst [new file with mode: 0644]
docs/api/python/runtime.rst
docs/conf.py
python/tvm/ir/__init__.py
python/tvm/ir/module.py

diff --git a/docs/api/python/container.rst b/docs/api/python/container.rst
deleted file mode 100644 (file)
index 5de9059..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-..  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.container
--------------
-.. automodule:: tvm.container
-    :members:
index c17f5c6865b01a83f292a8616f76be6f7faaefa3..2daebad4e6767971ab4bc089a6189a75339d1e79 100644 (file)
@@ -24,21 +24,18 @@ Python API
    tvm
    runtime
    ndarray
+   error
+   ir
    intrin
    tensor
    schedule
    target
    build
-   module
-   error
-   container
    function
    autotvm
-   graph_runtime
    rpc
-   bridge
    contrib
-   ffi
+   graph_runtime
    dev
    topi
    vta/index
diff --git a/docs/api/python/ir.rst b/docs/api/python/ir.rst
new file mode 100644 (file)
index 0000000..9e7df8f
--- /dev/null
@@ -0,0 +1,22 @@
+..  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.ir
+------
+.. automodule:: tvm.ir
+   :members:
+   :imported-members:
index 37b8606c81c84c059b6294b93af1dce49385e9d6..75523cf7b81dda01ddccfafba74ac66ca165927f 100644 (file)
@@ -20,9 +20,9 @@ tvm.runtime
 
 .. automodule:: tvm.runtime
 
-
 .. autoclass:: tvm.runtime.PackedFunc
    :members:
+   :inheritated-members:
 
 .. autofunction:: tvm.register_func
 
index a098ad4e4d55643047c88c65a53a6cec2401d590..0b29f2816c8b8487b08dc83721f039452fd075fe 100644 (file)
@@ -139,6 +139,9 @@ pygments_style = 'sphinx'
 # If true, `todo` and `todoList` produce output, else they produce nothing.
 todo_include_todos = False
 
+# sort autodoc order by the source file.
+autodoc_member_order = 'bysource'
+
 # -- Options for HTML output ----------------------------------------------
 
 # The theme is set by the make target
index e3552b5fe0470fd8ca93d64fa7a9de5d7246d970..d47e24054d0272a76057f7f3579fe3691ff9a6ec 100644 (file)
 # pylint: disable=unused-import
 """Common data structures across all IR variants."""
 from .base import SourceName, Span, Node, EnvFunc, load_json, save_json
-from .expr import BaseExpr, PrimExpr, RelayExpr, GlobalVar, BaseFunc, Range
 from .type import Type, TypeKind, TypeVar, GlobalTypeVar, TupleType
 from .type import TypeConstraint, FuncType, IncompleteType, RelayRefType
-from .type_relation import TypeCall, TypeRelation
 from .tensor_type import TensorType
+from .type_relation import TypeCall, TypeRelation
+from .expr import BaseExpr, PrimExpr, RelayExpr, GlobalVar, BaseFunc, Range
 from .adt import Constructor, TypeData
 from .module import IRModule
 from .attrs import Attrs
index ae1564b27105f33a7b9c04329b117b2f882a92f9..2d7481f29e00b8925f57a64a2d019597e730c8b0 100644 (file)
@@ -112,7 +112,7 @@ class IRModule(Node):
 
         Parameters
         ----------
-        other: Module
+        other: IRModule
             The module to merge into the current Module.
         """
         if isinstance(other, dict):
@@ -143,7 +143,7 @@ class IRModule(Node):
 
         Returns
         -------
-        global_vars: tvm.Array[GlobalVar]
+        global_vars: Array[GlobalVar]
             An array of global vars.
         """
         return _ffi_api.Module_GetGlobalVars(self)
@@ -153,7 +153,7 @@ class IRModule(Node):
 
         Returns
         -------
-        global_type_vars: tvm.Array[GlobalTypeVar]
+        global_type_vars: Array[GlobalTypeVar]
             An array of global type vars.
         """
         return _ffi_api.Module_GetGlobalTypeVars(self)