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
  • Loading branch information
YuchenJin authored Jul 7, 2021
1 parent bbfc52c commit bd5cd9f
Show file tree
Hide file tree
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
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 @@ -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
Expand Down

0 comments on commit bd5cd9f

Please sign in to comment.