Skip to content

Commit

Permalink
Get Relay tutorials working with Colab
Browse files Browse the repository at this point in the history
  • Loading branch information
guberti committed Dec 14, 2022
1 parent 0367b41 commit 1c4cdfd
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
9 changes: 9 additions & 0 deletions gallery/how_to/work_with_relay/build_gcn.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@
Cora dataset is a common benchmark for Graph Neural Networks (GNN) and frameworks that support GNN training and inference.
We directly load the dataset from DGL library to do the apples to apples comparison against DGL.
To start, we'll install Apache TVM, DGL, and PyTorch using Pip:
.. code-block:: bash
%%shell
pip install apache-tvm
pip install torch==1.9.0
pip install dgl==v0.7.2 -f https://data.dgl.ai/wheels/repo.html
Please refer to DGL doc for DGL installation at
https://docs.dgl.ai/install/index.html.
Expand Down
8 changes: 7 additions & 1 deletion gallery/how_to/work_with_relay/using_external_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@
Before we can use external libraries from Relay, your TVM needs to be built with libraries you want to use.
For example, to use cuDNN, USE_CUDNN option in `cmake/config.cmake` needs to be enabled, and cuDNN include and library directories need to be specified if necessary.
To begin with, we import Relay and TVM.
To start, we'll install Apache TVM and import it:
.. code-block:: bash
%%shell
pip install apache-tvm
"""

# sphinx_gallery_start_ignore
Expand Down
6 changes: 6 additions & 0 deletions gallery/how_to/work_with_relay/using_pipeline_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
**Author**: `Hua Jiang <https://github.com/huajsj>`_
This is a short tutorial on how to use "Pipeline Executor" with Relay.
.. code-block:: bash
%%shell
pip install apache-tvm
"""
import tvm
from tvm import te
Expand Down
6 changes: 6 additions & 0 deletions gallery/how_to/work_with_relay/using_relay_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
We will introduce how to implement customized parsers and renderers through interface classes.
For more details, please refer to :py:mod:`tvm.contrib.relay_viz`.
.. code-block:: bash
%%shell
pip install apache-tvm
"""

# sphinx_gallery_start_ignore
Expand Down

0 comments on commit 1c4cdfd

Please sign in to comment.