Commit f4a15334 by Tianqi Chen Committed by GitHub

[DOC] move comments to file header (#91)

parent b8234498
......@@ -8,5 +8,9 @@
[Release Notes](NEWS.md)
# TVM
TVM is a domain specific language(DSL) for tensor computations.
The goal of the project is to generate efficient kernels for deep learning workloads.
TVM is a low level domain specific language(DSL) for compiling tensor computation pipelines.
It is designed to compile multi-dimensional tensor algebra pipelines which
are crucial to deep learning frameworks.
## Documentation
The current documentation can be build locally via sphinx. See [docs](docs) folder for details.
tvm.collections
---------------
Collections contains data structures used in TVM DSL.
.. automodule:: tvm.collections
:members:
Developer API
-------------
This page contains modules that are used by developers of TVM.
Many of these APIs are PackedFunc registered in C++ backend.
tvm.node
~~~~~~~~
Node is the base class of all TVM AST. Normally user do not
need to touch this api.
.. automodule:: tvm.node
.. autoclass:: tvm.node.NodeBase
:members:
......
......@@ -11,6 +11,5 @@ Python API
module
ndarray
collection
node
function
dev
tvm.module
----------
.. autoclass:: tvm.module.Module
.. automodule:: tvm.module
:members:
:inherited-members:
.. autofunction:: tvm.module.load
.. autofunction:: tvm.module.enabled
tvm.ndarray
-----------
tvm.ndarray provides a minimum runtime array API to testing out
the correctness of the program.
.. automodule:: tvm.ndarray
.. autoclass:: tvm.ndarray.TVMContext
:members:
......
tvm.schedule
------------
The `tvm.schedule` module contains classes of scheduling
structure of tvm.
.. automodule:: tvm.schedule
.. autoclass:: tvm.schedule.IterVar
:members:
......
tvm.tensor
----------
The `tvm.tensor` module contains declaration of Tensor
and Operation class for computation declaration.
.. automodule:: tvm.tensor
.. autoclass:: tvm.tensor.Tensor
:members:
......
tvm
---
tvm is a library root namespace contains functions for
declaring computation.
The user facing API for computation declaration.
.. autosummary::
......
......@@ -156,7 +156,10 @@ latex_documents = [
def run_doxygen(folder):
"""Run the doxygen make command in the designated folder."""
try:
retcode = subprocess.call("cd %s; make doc" % folder, shell=True)
#retcode = subprocess.call("cd %s; make doc" % folder, shell=True)
retcode = subprocess.call("rm -rf _build/html/doxygen", shell=True)
retcode = subprocess.call("mkdir -p _build/html", shell=True)
retcode = subprocess.call("cp -rf doxygen/html _build/html/doxygen", shell=True)
if retcode < 0:
sys.stderr.write("doxygen terminated by signal %s" % (-retcode))
except OSError as e:
......@@ -174,9 +177,7 @@ gallery_dirs = ['tutorials']
def generate_doxygen_xml(app):
"""Run the doxygen make commands if we're on the ReadTheDocs server"""
read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
if read_the_docs_build:
run_doxygen('..')
run_doxygen('..')
def setup(app):
# Add hook for building doxygen xml when needed
......
......@@ -9,7 +9,9 @@ Contents
.. toctree::
:maxdepth: 1
self
how_to/install
tutorials/index
api/python/index
how_to/contribute
genindex
# pylint: disable=redefined-builtin, wildcard-import
"""C++ backend related python scripts"""
"""TVM: a DSL for tensor kernel compilation"""
from __future__ import absolute_import as _abs
from . import tensor
......
"""The build pipeline in python.
"""The build utils in python.
Eventually some of these pipelines will be moved to C++.
But the first pipeline will be kept in python for ease of change and evolving.
This module provides the functions to transform schedule to
LoweredFunc and compiled Module.
"""
from __future__ import absolute_import as _abs
from . import api
from . import tensor
from . import schedule
......
"""Collection structure in the high level DSL."""
"""Collections contains data structures used in TVM DSL."""
from __future__ import absolute_import as _abs
from ._ctypes._node import NodeBase, register_node
from . import _api_internal
......
"""Runtime module related stuffs"""
"""Container of compiled functions of TVM."""
from __future__ import absolute_import as _abs
from ._ctypes._function import ModuleBase, _init_module_module
from ._ctypes._function import _init_api
......@@ -21,6 +21,11 @@ class Module(ModuleBase):
----------
fmt : str, optional
The specified format.
Returns
-------
source : str
The result source code.
"""
return _GetSource(self, fmt)
......
"""TVM Runtime API.
"""TVM Runtime NDArray API.
This is a simplified runtime API for quick testing and proptyping.
tvm.ndarray provides a minimum runtime array API to test
the correctness of the program.
"""
# pylint: disable=invalid-name,unused-import
from __future__ import absolute_import as _abs
......
"""Namespace for base node class"""
"""Node is the base class of all TVM AST.
Normally user do not need to touch this api.
"""
# pylint: disable=unused-import
from __future__ import absolute_import as _abs
from ._ctypes._node import NodeBase, register_node
......
"""Collection structure in the high level DSL."""
"""The computation schedule api of TVM."""
from __future__ import absolute_import as _abs
from ._ctypes._node import NodeBase, register_node
from . import _api_internal
......
"""Tensor and Computation abstraction objects"""
"""Tensor and Operation class for computation declaration."""
# pylint: disable=invalid-name
from __future__ import absolute_import as _abs
from ._ctypes._node import NodeBase, SliceBase, register_node, convert_to_node
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment