3. Preparing for running a program
Before you can run a program on the IPU-POD DA, you must:
Enable the Poplar SDK (Section 3.1, Enable the Poplar SDK).
3.1. Enable the Poplar SDK
To use the Graphcore tools and Poplar libraries, several environment variables (such as library and binary paths) need to be set up. Scripts are provided that simplify this task.
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 PopART.
Run the single script as:
$ 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 PyTorch or PopART.
Run the scripts as:
$ 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
Warning
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/sdk-2.5.1/poplar-ubuntu_20_04-2.5.0+3723-e94d646535
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.