2. Quick start for experts

Complete any necessary setup to use your IPU system (see Section 1.1, IPU systems) before the following steps.

2.1. Enable the Poplar SDK

$ source [path-to-sdk]/enable
$ popc --version

where [path-to-sdk] is the path to the Poplar SDK.

2.2. Create and enable a Python virtual environment

$ virtualenv -p python3 [venv_name]
$ source [venv_name]/bin/activate

where [venv_name] is the location of the virtual environment.

2.3. Install the PopTorch wheel and validate

$ pip install ${POPLAR_SDK_ENABLED?}/../poptorch-*.whl
$ python3 -c "import poptorch; print(poptorch.__version__)"

See Section 3.3, Install the PopTorch wheel and validate for details.

2.4. Clone the Graphcore examples

You may need to clone the Graphcore examples GitHub repository in order to run the example application. For convenience we set an environment variable to the tutorials directory.

To clone the examples repository for the latest version of the Poplar SDK:

$ cd ~/[base dir]
$ git clone https://github.com/graphcore/examples.git
$ cd examples/tutorials
$ export POPLAR_TUTORIALS_DIR=$(pwd)

where [base_dir] is a location of your choice.

Note

If you are using a version of the Poplar SDK prior to version 3.2, then refer to Section A, Install examples and tutorials for older Poplar SDK versions for how to install examples and tutorials.

2.5. Run the application

$ cd ${POPLAR_TUTORIALS_DIR?}/simple_applications/pytorch/mnist
$ pip install -r requirements.txt
$ python mnist_poptorch.py

2.6. Exit the virtual environment

When you are done, exit the virtual environment.

The examples repo contains other tutorials and applications you can try. See Section 4, Next steps for more information.