There are two ways to run examples.
- IPU model (Simulator)
- On IPU Hardware
-
Poplar SDK should be enabled by default, if its not, enable it.
> source /software/graphcore/poplar_sdk/3.3.0/enable > popc --version POPLAR version 3.3.0 (de1f8de2a7) clang version 16.0.0 (2fce0648f3c328b23a6cbc664fc0dd0630122212)
-
Go to directory with GEMV code.
cd examples/tutorials/tutorials/poplar/tut5_matrix_vector/complete
-
Compile
tut5_complete.cppwith the providedMakefilemake tut5
-
Run executable on the CPU.
./tut5 1000 100
Sample Output
./tut5 1000 100 Multiplying matrix of size 1000x100 by vector of size 100 Creating new graph object and compiling vertex program additions Constructing full compute graph and control program Running graph program to multiply matrix by vector Multiplication result OK
-
Compile
tut5_ipu_hardware_complete.cppwith the providedMakefilemake tut5_ipu
-
Run executable on IPU using scheduler.
srun --ipus=1 ./tut5_ipu 10000 1000 --device ipu
Sample Output
srun --ipus=1 ./tut5_ipu 1000 100 srun: job 26636 queued and waiting for resources srun: job 26636 has been allocated resources Multiplying matrix of size 1000x100 by vector of size 100 Trying to attach to IPU Attached to IPU 0 Creating environment (compiling vertex programs) Constructing compute graph and control program Running graph program to multiply matrix by vector Multiplication result OK
Follow Poplar Tutorial for optimized implementation of GEMV.