Skip to content

Commit

Permalink
Disable per-session thread pool for web
Browse files Browse the repository at this point in the history
  • Loading branch information
snnn authored Nov 16, 2023
1 parent adb56df commit fa12a3a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions onnxruntime/core/framework/session_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ struct SessionOptions {

// By default the session uses its own set of threadpools, unless this is set to false.
// Use this in conjunction with the CreateEnvWithGlobalThreadPools API.
#if defined(__wasm__)
bool use_per_session_threads = false;
#else
bool use_per_session_threads = true;
#endif
bool thread_pool_allow_spinning = true;

// Deterministic compute is likely not as performant. This option is default to false.
Expand Down

0 comments on commit fa12a3a

Please sign in to comment.