3. PyTorch setupΒΆ

Note

You should activate the Python virtual environment you created for PyTorch (Section 2.6, Working with a Python virtual environment) before performing the setup in this section.

This section describes how to install a wheel file containing PopTorch, a set of extensions to enable PyTorch models to run on the IPU.

Install the PopTorch wheel file using a command similar to the following:

$ cd $SDKDIR
$ python -m pip install poptorch-X+X_X.whl

Section 2.1, Define SDK location describes how to define the SDKDIR environment variable.

An example of the filename for the PopTorch wheel file is:

poptorch-2.5.0+62288_0f4af0bf32_ubuntu_18_04-cp36-cp36m-linux_x86_64.whl

To confirm that PopTorch has been installed, you can use pip list, which should include the poptorch package in the output.

  Package        Version
  -------------  ----------
  numpy          1.19.5
  packaging      21.3
  Pillow         8.4.0
  pip            21.3.1
  pkg_resources  0.0.0
  pluggy         0.13.1
  poptorch       2.3.0+30608
  wheel          0.37.0

You can also test that the module has been installed correctly by attempting to import it in Python, for example:

$ python3 -c "import poptorch; print(poptorch.__version__)"