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 committed Dec 19, 2023
1 parent 32fcf73 commit 21ea4f1
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 @@ -129,7 +129,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 21ea4f1

Please sign in to comment.