Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tvm.relay.build() docs #6940

Merged
merged 2 commits into from
Nov 19, 2020
Merged

fix tvm.relay.build() docs #6940

merged 2 commits into from
Nov 19, 2020

Conversation

areusch
Copy link
Contributor

@areusch areusch commented Nov 19, 2020

Looks like some line breaks are corrupting the tvm.relay.build docs:

Parameters

  • mod (IRModule) – The IR module to build. Using relay.Function is deprecated.
  • target (str, tvm.target.Target, or dict of str(i.e. device/context) –
  • to str/tvm.target.Target (name)) – For heterogeneous compilation, it is a dictionary indicating context to target mapping. For homogeneous compilation, it is a build target.
  • optional – For heterogeneous compilation, it is a dictionary indicating context to target mapping. For homogeneous compilation, it is a build target.
  • target_host (str or tvm.target.Target, optional) – Host compilation target, if target is device. When TVM compiles device specific program such as CUDA, we also need host(CPU) side code to interact with the driver setup the dimensions and parameters correctly. target_host is used to specify the host side codegen target. By default, llvm is used if it is enabled, otherwise a stackvm intepreter is used.
  • params (dict of str to NDArray) – Input parameters to the graph that do not change during inference time. Used for constant folding.
  • mod_name (Optional[str]) – The module name we will build

@areusch
Copy link
Contributor Author

areusch commented Nov 19, 2020

@tqchen


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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need a # pylint: disable=line-too-long at the end of this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added around the comment.

@zhiics
Copy link
Member

zhiics commented Nov 19, 2020

Can we use black to format it?

@giuseros
Copy link
Contributor

Hi @zhiics ,
I don't think Black can format comments, but I might be wrong

@areusch
Copy link
Contributor Author

areusch commented Nov 19, 2020

@zhiics @giuseros I had tested this with git-black.sh and didn't see any changes, but added both black fmt: off and pylint pylint: disable=line-too-long comments around this docstring. we may want to consider some stricter validation of docstrings in the future.

@tqchen tqchen merged commit b00c1e0 into apache:main Nov 19, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 2, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 4, 2020
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants