SmartEngine  1.6.0
Public Attributes | List of all members
SmartEngine.EngineSettings Struct Reference

The list of global engine settings. Affects all contexts. More...

Public Attributes

int ThreadCount
 The maximum number of threads that will be used to evaluate graphs. Set to 0 or 1 to disable multithreading. More...
 
long MaxGpuWorkloadSize
 The maximum amount of work to be done in a single GPU packet. Graphs that don't fit into a single packet will be split into multiple packets in a way transparent to users. More...
 
MatrixInitializationSetting MatrixInitialization
 Defines how to initialize matrices More...
 
CheckForNaNFlags CheckForNaNs
 Defines where to check for NaNs. More...
 

Detailed Description

The list of global engine settings. Affects all contexts.

Member Data Documentation

◆ CheckForNaNs

CheckForNaNFlags SmartEngine.EngineSettings.CheckForNaNs

Defines where to check for NaNs.

◆ MatrixInitialization

MatrixInitializationSetting SmartEngine.EngineSettings.MatrixInitialization

Defines how to initialize matrices

◆ MaxGpuWorkloadSize

long SmartEngine.EngineSettings.MaxGpuWorkloadSize

The maximum amount of work to be done in a single GPU packet. Graphs that don't fit into a single packet will be split into multiple packets in a way transparent to users.

GPUs are not interruptable the way the CPU is. It is possible to stall the GPU for long periods of time by feeding large packets. On Windows, the OS will terminate the GPU device in a way that may not be recoverable without restarting the app if too much time is spent on one piece of work.

Tweaking this value can prevent the OS from terminating the device at the cost of performance. There is overhead when talking to the GPU and more communication will happen with lower values. An alternative to avoid device loss is to disable stall termination at the OS level.

The workload calculation varies from graph node to graph node, but is generally the number of matrix values in the node's output. Ex: Adding [2x2] and [1x2] is a workload size of 2 * 2 = 4. Multiplying [2x3] and [3x4] is a workload size of 2 * 4 = 8.

◆ ThreadCount

int SmartEngine.EngineSettings.ThreadCount

The maximum number of threads that will be used to evaluate graphs. Set to 0 or 1 to disable multithreading.