Skip to content

Commit

Permalink
Extend TVM tutorials in Colab
Browse files Browse the repository at this point in the history
  • Loading branch information
guberti committed Dec 14, 2022
1 parent 1c4cdfd commit 0f6037c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
7 changes: 7 additions & 0 deletions gallery/how_to/extend_tvm/bring_your_own_datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
Note that the Bring Your Own Datatypes framework currently only handles **software emulated versions of datatypes**.
The framework does not support compiling for custom accelerator datatypes out-of-the-box.
To start, we must install TVM and MXNet (we will use a model from MXNet's model zoo):
.. code-block:: bash
%%shell
pip install apache-tvm mxnet
Datatype Libraries
------------------
Expand Down
7 changes: 7 additions & 0 deletions gallery/how_to/extend_tvm/low_level_custom_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
- How a Schedule is lowered to either an IRModule class or a LLVM module. Otherwise,
take a look at ``python/tvm/build_module.py`` to get some basics.
TVM must also be installed, either from source or with a package manager:
.. code-block:: bash
%%shell
pip install apache-tvm
"""

# sphinx_gallery_start_ignore
Expand Down
8 changes: 8 additions & 0 deletions gallery/how_to/extend_tvm/use_pass_infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@
This tutorial mainly demonstrates how developers can use the pass infra to perform
a certain optimization and create an optimization pipeline for a Relay program.
The same approach can be used for tir as well.
To start, we'll install TVM:
.. code-block:: bash
%%shell
pip install apache-tvm
"""

# sphinx_gallery_start_ignore
Expand Down
8 changes: 7 additions & 1 deletion gallery/how_to/extend_tvm/use_pass_instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@
but an extension mechanism is available via the :py:func:`tvm.instrument.pass_instrument` decorator.
This tutorial demonstrates how developers can use ``PassContext`` to instrument
passes. Please also refer to the :ref:`pass-infra`.
passes. Please also refer to the :ref:`pass-infra`. To start, we'll install TVM:
.. code-block:: bash
%%shell
pip install apache-tvm
"""

# sphinx_gallery_start_ignore
Expand Down

0 comments on commit 0f6037c

Please sign in to comment.