Skip to content

Commit

Permalink
[Fix] Update stale relay.Module API in docs/comments (#8411)
Browse files Browse the repository at this point in the history
YuchenJin authored Jul 7, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent bbfc52c commit bd5cd9f
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/dev/pass_infra.rst
Original file line number Diff line number Diff line change
@@ -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
@@ -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
2 changes: 1 addition & 1 deletion docs/langref/relay_expr.rst
Original file line number Diff line number Diff line change
@@ -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
========
4 changes: 2 additions & 2 deletions python/tvm/driver/tvmc/common.py
Original file line number Diff line number Diff line change
@@ -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.
"""

2 changes: 1 addition & 1 deletion python/tvm/driver/tvmc/frontends.py
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion python/tvm/relay/analysis/analysis.py
Original file line number Diff line number Diff line change
@@ -370,7 +370,7 @@ def extract_fused_functions(mod):
Parameters
----------
mod : tvm.relay.IRModule
mod : tvm.IRModule
Returns
-------
2 changes: 1 addition & 1 deletion python/tvm/relay/frontend/caffe.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion python/tvm/relay/frontend/pytorch.py
Original file line number Diff line number Diff line change
@@ -3290,7 +3290,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

0 comments on commit bd5cd9f

Please sign in to comment.