From: tqchen Date: Wed, 12 Feb 2020 04:36:20 +0000 (-0800) Subject: [DOCS][PY] Sphinx docs about tvm.ir X-Git-Tag: upstream/0.7.0~1259 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=176ffe5058e3f086d4618150ffd2445b6ef921f1;p=platform%2Fupstream%2Ftvm.git [DOCS][PY] Sphinx docs about tvm.ir --- diff --git a/docs/api/python/container.rst b/docs/api/python/container.rst deleted file mode 100644 index 5de9059a7..000000000 --- a/docs/api/python/container.rst +++ /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: diff --git a/docs/api/python/index.rst b/docs/api/python/index.rst index c17f5c686..2daebad4e 100644 --- a/docs/api/python/index.rst +++ b/docs/api/python/index.rst @@ -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 index 000000000..9e7df8ffc --- /dev/null +++ b/docs/api/python/ir.rst @@ -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: diff --git a/docs/api/python/runtime.rst b/docs/api/python/runtime.rst index 37b8606c8..75523cf7b 100644 --- a/docs/api/python/runtime.rst +++ b/docs/api/python/runtime.rst @@ -20,9 +20,9 @@ tvm.runtime .. automodule:: tvm.runtime - .. autoclass:: tvm.runtime.PackedFunc :members: + :inheritated-members: .. autofunction:: tvm.register_func diff --git a/docs/conf.py b/docs/conf.py index a098ad4e4..0b29f2816 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 diff --git a/python/tvm/ir/__init__.py b/python/tvm/ir/__init__.py index e3552b5fe..d47e24054 100644 --- a/python/tvm/ir/__init__.py +++ b/python/tvm/ir/__init__.py @@ -17,11 +17,11 @@ # 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 diff --git a/python/tvm/ir/module.py b/python/tvm/ir/module.py index ae1564b27..2d7481f29 100644 --- a/python/tvm/ir/module.py +++ b/python/tvm/ir/module.py @@ -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)