OnnxRuntimeSessionOptions

OnnxRuntimeSessionOptions class

Configuration options for creating ONNX InferenceSession. We recommend keeping the optimized defaults unless you are absolutely certain about the modifications. For technical details, refer to ONNX Runtime documentation.

public static class OnnxRuntimeSessionOptions

Properties

NameDescription
static ExecutionMode { get; set; }Execution mode for the session. By default, operators are executed concurrently, whenever possible.
static GraphOptimizationLevel { get; set; }Graph optimization level for the session. By default, all available optimizations are enabled for maximum performance.
static InterOpNumThreads { get; set; }Number of threads for running multiple operations in parallel. If sequential execution (ExecutionModeOnnx.ORT_SEQUENTIAL) is enabled in ExecutionMode property, this value is ignored.
static IntraOpNumThreads { get; set; }Number of threads for a single operations.

See Also