Options
All
  • Public
  • Public/Protected
  • All
Menu

A set of configurations for session behavior.

Hierarchy

  • SessionOptions

Index

Properties

Optional enableCpuMemArena

enableCpuMemArena?: boolean

Whether enable CPU memory arena.

This setting is available only in ONNXRuntime (Node.js binding and react-native) or WebAssembly backend

Optional enableMemPattern

enableMemPattern?: boolean

Whether enable memory pattern.

This setting is available only in ONNXRuntime (Node.js binding and react-native) or WebAssembly backend

Optional enableProfiling

enableProfiling?: boolean

Wether enable profiling.

This setting is a placeholder for a future use.

Optional executionMode

executionMode?: "sequential" | "parallel"

Execution mode.

This setting is available only in ONNXRuntime (Node.js binding and react-native) or WebAssembly backend

Optional executionProviders

executionProviders?: readonly ExecutionProviderConfig[]

An array of execution provider options.

An execution provider option can be a string indicating the name of the execution provider, or an object of corresponding type.

Optional extra

extra?: Record<string, unknown>

Store configurations for a session. See https://github.com/microsoft/onnxruntime/blob/master/include/onnxruntime/core/session/ onnxruntime_session_options_config_keys.h

This setting is available only in WebAssembly backend. Will support Node.js binding and react-native later

example
extra: {
session: {
set_denormal_as_zero: "1",
disable_prepacking: "1"
},
optimization: {
enable_gelu_approximation: "1"
}
}

Optional graphOptimizationLevel

graphOptimizationLevel?: "disabled" | "basic" | "extended" | "all"

The optimization level.

This setting is available only in ONNXRuntime (Node.js binding and react-native) or WebAssembly backend

Optional interOpNumThreads

interOpNumThreads?: number

The inter OP threads number.

This setting is available only in ONNXRuntime (Node.js binding and react-native).

Optional intraOpNumThreads

intraOpNumThreads?: number

The intra OP threads number.

This setting is available only in ONNXRuntime (Node.js binding and react-native).

Optional logId

logId?: string

Log ID.

This setting is available only in ONNXRuntime (Node.js binding and react-native) or WebAssembly backend

Optional logSeverityLevel

logSeverityLevel?: 0 | 1 | 2 | 3 | 4

This setting is available only in ONNXRuntime (Node.js binding and react-native) or WebAssembly backend

Optional logVerbosityLevel

logVerbosityLevel?: number

Log verbosity level.

This setting is available only in WebAssembly backend. Will support Node.js binding and react-native later

Optional profileFilePrefix

profileFilePrefix?: string

File prefix for profiling.

This setting is a placeholder for a future use.

Generated using TypeDoc