2. Prerequisites
2.1. Access to a system with IPUs
Before you can start following the instructions in this Quick Start guide, you must be able to log into a system with access to IPUs. Details are given in the getting started guide for your system:
2.2. Enable Poplar
You must enable Poplar before you can use the IPU command line tools.
Note
It is best if you use the latest version of the Poplar SDK.
On some systems you must explicitly enable the Poplar SDK before you can use PyTorch or TensorFlow for the IPU, or the Poplar Graph Programming Framework. On other systems, the SDK is enabled as part of the login process.
Table 2.1 defines whether you have to explicitly enable the SDK and where to find it.
System |
Enable SDK? |
SDK location |
---|---|---|
Pod system |
Yes |
The SDK is in the directory where you extracted the SDK tarball. |
Graphcloud |
Yes |
where |
Gcore Cloud |
No |
The SDK has been enabled as part of the login process. |
To enable the Poplar SDK:
For SDK versions 2.6 and later, there is a single enable
script that determines whether you are using Bash or Zsh and runs the appropriate scripts to enable both Poplar and PopTorch/PopART.
Source the single script as follows:
$ source [path_to_SDK]/enable
where [path_to_SDK]
is the location of the Poplar SDK on your system.
For SDK versions earlier than 2.6, there are only Bash scripts available and you have to source the Poplar and PopART scripts separately.
Note
You only have to source the PopART enable
script if you are using PopTorch or PopART.
Source the scripts as follows:
$ source [path_to_SDK]/poplar-ubuntu_[os_ver]-[poplar_ver]+[build]/enable.sh
$ source [path_to_SDK]/popart-ubuntu_[os_ver]-[poplar_ver]+[build]/enable.sh
where [path_to_SDK]
is the location of the Poplar SDK on your system. [os_ver]
is the version of Ubuntu on your system, [poplar_ver]
is the software version number of the Poplar SDK and [build]
is the build information.
Note
You must source the Poplar enable script for each new shell. You can add this source
command to your .bashrc
(or .zshrc
for SDK versions later than 2.6) to do this on a more permanent basis.
If you attempt to run any Poplar software without having first sourced this script, you will get an error from the C++ compiler similar to the following (the exact message will depend on your code):
fatal error: 'poplar/Engine.hpp' file not found
If you try to source the script after it has already been sourced, then you will get an error similar to:
ERROR: A Poplar SDK has already been enabled.
Path of enabled Poplar SDK: /opt/gc/poplar_sdk-ubuntu_20_04-3.2.0-7cd8ade3cd/poplar-ubuntu_20_04-3.2.0-7cd8ade3cd
If this is not wanted then please start a new shell.
You can verify that Poplar has been successfully set up by running:
$ popc --version
This will display the version of the installed software.