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] Update stale relay.Module API in docs/comments #8411

Merged
merged 1 commit into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/dev/pass_infra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ Users can build a pass through decoration like the following:
x = relay.var("x", tp)
gv = relay.GlobalVar("abs")
func = relay.Function([x], relay.abs(x))
new_mod = relay.Module({gv: func})
new_mod = tvm.IRModule({gv: func})
new_mod.update(mod)
return new_mod

Expand All @@ -494,7 +494,7 @@ function.

.. code:: python

mod = relay.Module()
mod = tvm.IRModule()
mod = module_pass(mod)

Correspondingly, we also offer such functionality for ``function_pass``. For
Expand Down
2 changes: 1 addition & 1 deletion docs/langref/relay_expr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ This definition would result in a module entry mapping the identifier :code:`@ac
with the parameters, return type, and body above. Any reference to the identifier :code:`@ackermann` elsewhere in the
code could then look up the identifier in the module and replace the function definition as needed.

See :py:class:`~tvm.relay.Module` for the definition and documentation of a module.
See :py:class:`~tvm.IRModule` for the definition and documentation of a module.

Constant
========
Expand Down
4 changes: 2 additions & 2 deletions python/tvm/driver/tvmc/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ def convert_graph_layout(mod, desired_layout):

Parameters
----------
mod : tvm.relay.Module
mod : tvm.IRModule
The relay module to convert.
desired_layout : str
The layout to convert to.

Returns
-------
mod : tvm.relay.Module
mod : tvm.IRModule
The converted module.
"""

Expand Down
2 changes: 1 addition & 1 deletion python/tvm/driver/tvmc/frontends.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def load(self, path, shape_dict=None, **kwargs):
Returns
-------
mod : tvm.relay.Module
mod : tvm.IRModule
The produced relay module.
params : dict
The parameters (weights) for the relay module.
Expand Down
2 changes: 1 addition & 1 deletion python/tvm/relay/analysis/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def extract_fused_functions(mod):
Parameters
----------
mod : tvm.relay.IRModule
mod : tvm.IRModule
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion python/tvm/relay/frontend/caffe.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ def from_caffe(init_net, predict_net, shape_dict, dtype_dict):

Returns
-------
mod : tvm.relay.Module
mod : tvm.IRModule
The relay module for compilation.

params : dict of str to tvm.NDArray
Expand Down
2 changes: 1 addition & 1 deletion python/tvm/relay/frontend/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3268,7 +3268,7 @@ def from_pytorch(script_module, input_infos, custom_convert_map=None, default_dt

Returns
-------
mod : tvm.relay.Module
mod : tvm.IRModule
The module that optimizations will be performed on.

params : dict of str to tvm.runtime.NDArray
Expand Down