2. Quick start for experts
Ensure you have completed the steps described in the getting started guide for your system as defined in the Prerequisites section before completing the steps in this section.
2.1. Enable Poplar SDK
$ source [path-to-sdk]/enable
$ popc --version
where [path-to-sdk]
is the path to the Poplar SDK. Section 3.1, Enable Poplar SDK contains details of the SDK paths for different systems and what to do if you are using a version of the SDK earlier than 2.6.
2.2. Create and enable a Python virtual environment
$ virtualenv -p python[py_ver] ~/[base_dir]/[venv_name]
$ source ~/[base_dir]/[venv_name]/bin/activate
where [base_dir]
is a location of your choice and [venv_name]
is the name of the directory that will be created for the virtual environment. [py_ver]
is the version of Python you are using and it depends on your OS.
On Ubuntu 18 systems we support Python 3.6, but on Ubuntu 20 systems we support Python 3.8. You can get more information about the versions of tools supported in the Poplar SDK for different operating systems in the Poplar SDK 3.3.0 Release Notes. You can check which OS you are running with lsb_release -a
.
2.3. Clone Graphcore Tutorials repo
You need the Graphcore tutorials repository to run the example application and for convenience we set an environment variable to the tutorials directory.
$ cd ~/[base dir]
$ git clone https://github.com/graphcore/tutorials.git
$ cd tutorials
$ git checkout sdk-release-[poplar-ver]
$ export POPLAR_TUTORIALS_DIR=$(pwd)
where [base_dir]
is a location of your choice and [poplar-ver]
is the version of the Poplar SDK you enabled in Section 2.1, Enable Poplar SDK.
2.4. Run the application
$ cd ${POPLAR_TUTORIALS_DIR?}/simple_applications/popart/mnist/
$ pip install -r requirements.txt
$ ./get_data.sh
$ python3 popart_mnist.py
2.5. Try out other applications
Clone the examples repo so you can try out other examples. For convenience we set an environment variable to the examples directory
$ cd ~/[base dir]
$ git clone https://github.com/graphcore/examples.git
$ cd examples
$ export POPLAR_EXAMPLES_DIR=$(pwd)
where [base_dir]
is a location of your choice.
If you are using a Poplar SDK other than the current release, you will need to checkout the tag corresponding to the SDK version. For example:
$ git checkout v[poplar-ver] # select Poplar SDK version
Where [poplar-ver]
is the version of the Poplar SDK you enabled in Section 2.1, Enable Poplar SDK.
There may be changes that were made to the examples after the SDK release tag was created. If you want to access those, but still ensure compatibility with the version of the Poplar SDK you are using, then you will need to checkout the commit immediately prior to the tag for the following SDK version.
2.6. Exit the virtual environment
When you are done, exit the virtual environment with:
$ deactivate