Disable multiple threads for emscripten single-thread builds in ggml_graph_plan
This commit is contained in:
parent
5bcd57722f
commit
f9ba81953b
|
|
@ -2701,6 +2701,11 @@ struct ggml_cplan ggml_graph_plan(
|
|||
n_threads = threadpool ? threadpool->n_threads_max : GGML_DEFAULT_N_THREADS;
|
||||
}
|
||||
|
||||
#if defined(__EMSCRIPTEN__) && !defined(__EMSCRIPTEN_PTHREADS__)
|
||||
// Emscripten without pthreads support can only use a single thread
|
||||
n_threads = 1;
|
||||
#endif
|
||||
|
||||
size_t work_size = 0;
|
||||
|
||||
struct ggml_cplan cplan;
|
||||
|
|
|
|||
Loading…
Reference in New Issue