Poplar and PopLibs
|
A group of properties that are reconfigurable in each engine execution. More...
#include <RuntimeOptions.hpp>
A group of properties that are reconfigurable in each engine execution.
Passing a RuntimeOptions reference to some of the Engine member functions will override the respective properties configured during the creation of that engine.
RuntimeOptions can also be overridden with the environment variable POPLAR_RUNTIME_OPTIONS
. For example:
POPLAR_RUNTIME_OPTIONS='{"target.syncMethod":"polling"}'
Engine runtime options: Target
target.syncMethod
(polling, hybrid, default) [=default]
Controls how the host determines when an IPU wants to sync.
target.syncPollPeriodUs
Integer [=0]
The period to use when polling for a host sync, in microseconds.
target.exceptionPollPeriodUs
Integer [=250000]
The period to use to poll for possible exceptions in the device, while waiting for the host sync, in microseconds.
target.hostSyncTimeout
Float [=300.00]
The amount of time to wait for a response from the IPU after running a program, in seconds. "0" means no timeout.
Engine runtime options: Stream Callbacks
streamCallbacks.multiThreadMode
(singleThread, collaborative, dedicated) [=singleThread]
Specifies how the invocation of stream callbacks is parallelised. Be aware that using a multithreading mode other than singleThread requires that the stream callbacks connected to the engine are thread-safe.
streamCallbacks.numaAware
(true, false) [=false]
Can only be enabled in a multithread mode. Creates a separate thread pool for each NUMA node used by the devices the application is using.
streamCallbacks.numWorkerThreads
Integer or "auto" [=0]
The maximum number of threads to execute stream callbacks. A value of 0 means the main thread will execute all of the callbacks.
Specifying the value auto will create as many threads as necessary to fill all the available CPU resources. This typically means one thread per CPU core.
If the value of multiThreadMode
is singleThread then the only allowed value is 0. All other values of multiThreadMode
require a value greater than 0.
If you enable the option streamCallbacks.numaAware
, the worker threads are distributed as evenly as possible to multiple thread pools: one thread pool per NUMA node in use by the attached IPU devices.
Engine runtime options: Debug
debug.exceptOnSOCError
(true, false) [=true]
If true, throw an exception on a SoC error. If false the error will be reported in the log instead.
debug.checkForSOCErrorAtRun
(true, false) [=false]
If true, check for SoC errors before and after program execution.
Engine runtime options: Profiler
The profiler options control how Poplar generates the reports that can be viewed in the PopVision Graph Analyser (the graph and execution profiles)
profiler.replicaToProfile
Integer [=All replicas]
Specifies which replica (0-based index) will be profiled. Note that a high-level summary of several metrics and timings will still be provided for the whole execution. If not specified, all replicas will be profiled.