Enum GpuExecutionModeConfig
GPU execution mode controlling how operations are scheduled and executed.
public enum GpuExecutionModeConfig
Fields
Auto = 0Automatically select best execution mode based on GPU capabilities. Uses deferred execution if supported, falls back to eager otherwise.
Deferred = 2Deferred execution - operations are recorded and executed as optimized graphs. Enables kernel fusion, stream parallelism, and scheduling optimization. Highest performance (10-50x speedup) but requires GPU with async support.
Eager = 1Eager execution - each operation runs immediately and synchronously. Maximum compatibility, easiest debugging, but lowest performance.
ScopedDeferred = 3Scoped deferred execution - operations within explicit scopes are batched. Provides multi-stream parallelism without full graph compilation. Good balance between performance and control.
Remarks
For Beginners: This controls how GPU operations are executed: - **Auto**: Automatically select best mode based on GPU capabilities (recommended) - **Eager**: Execute each operation immediately (most compatible, simplest debugging) - **Deferred**: Batch operations for optimization (highest performance, 10-50x faster) - **ScopedDeferred**: Batch within explicit scopes (balanced performance and control)