Skip to content

Runtime settings#

Runtime configuration file provides parameters that user can tweak to achieve optimal performance of their app.

The name of runtime configuration file is runtime.conf and its placed in data directory. Its settings are described below:

Parameter Type Default value
cpuClass "Value::String" "auto"
deviceClass "Value::String" "cpu"
numThreads "Value::Int1" -1
verboseLogging "Value::Int1" 0
numComputeStreams "Value::Int1" 4
programCacheSize "Value::Int1" 128
defaultGpuDevice "Value::Int1" 0

Parameters description:

cpuClass - class of cpu by supported instructions - cpu, sse4, avx, avx2, arm, auto.

deviceClass - execution device type - cpu, gpu.

numThreads - number of worker threads. Default: number of CPU logical cores.

verboseLogging - level of log verbosity. 1 - Errors, 2 - Warnings, 3 - Info, 4 - Debug.

numComputeStreams - number of streams; Increases performance, but works only with new versions of NVIDIA drivers (375.82, 384.59 and more recent). Don't increase it with older version of NVIDIA driver.

programCacheSize - maximum number of Program objects in cache. Should be less than 10000.

defaultGpuDevice - default GPU device number.

Verbosity level sets the upper limit of what type of messages may be printed out. For example, if user set verboseLogging to 3, it means that Errors, Warnings and Info messages will be printed out to the console. Verbose level of 0 indicates that there are no logging messages printed out at all.

In case of GPU usage the numThreads value should be at least == 2 or -1. If this requirement is violated, further behavior is undefined.

Increasing the programCacheSize increases memory usage and potentially improves performance. Be careful, too large a value of this parameter can lead to a crash due to insufficient memory.

Example:

<section name="Runtime">
    <param name="cpuClass" type="Value::String" text="auto" />
    <param name="deviceClass" type="Value::String" text="cpu" />
    <param name="numThreads" type="Value::Int1" x="-1" />
    <param name="verboseLogging" type="Value::Int1" x="0" />
    <param name="numComputeStreams" type="Value::Int1" x="4" />
    <param name="programCacheSize" type="Value::Int1" x="128" />
    <param name="defaultGpuDevice" type="Value::Int1" x="0" />
</section>

Note: Setting <param name="numThreads" type="Value::Int1" x="-1" /> means that will be taken the maximum number of available threads. This number of threads is equal to according number of available processor cores.

Note: Setting <param name="defaultGpuDevice" type="Value::Int1" x="-1" /> means disable GPU runtime initialisation. Set it only with deviceClass == cpu.