Skip to content

Commit

Permalink
fix tvm.relay.build() docs (apache#6940)
Browse files Browse the repository at this point in the history
  • Loading branch information
areusch authored and Trevor Morris committed Dec 4, 2020
1 parent 8e1deb0 commit 4e238e8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions python/tvm/relay/build_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,16 @@ def get_params(self):


def build(mod, target=None, target_host=None, params=None, mod_name="default"):
"""Helper function that builds a Relay function to run on TVM graph
runtime.
# fmt: off
# pylint: disable=line-too-long
"""Helper function that builds a Relay function to run on TVM graph runtime.
Parameters
----------
mod : :py:class:`~tvm.IRModule`
The IR module to build. Using relay.Function is deprecated.
target : str, :any:`tvm.target.Target`, or dict of str(i.e. device/context
name) to str/tvm.target.Target, optional
target : str, :any:`tvm.target.Target`, or dict of str(i.e. device/context name) to str/tvm.target.Target, optional
For heterogeneous compilation, it is a dictionary indicating context to
target mapping. For homogeneous compilation, it is a build target.
Expand Down Expand Up @@ -241,6 +241,8 @@ def build(mod, target=None, target_host=None, params=None, mod_name="default"):
params : dict
The parameters of the final graph.
"""
# pylint: enable=line-too-long
# fmt: on
if not isinstance(mod, (IRModule, _function.Function)):
raise ValueError("Type of input parameter mod must be tvm.IRModule")

Expand Down

0 comments on commit 4e238e8

Please sign in to comment.